Skip to content

U Gate

Single-qubit gate which applies phase and rotation with 3 Euler angles.

Matrix representation:

\[ U(\gamma,\phi,\theta,\lambda) = e^{i\gamma}\begin{pmatrix} \cos(\frac{\theta}{2}) & -e^{i\lambda}\sin(\frac{\theta}{2}) \\ e^{i\phi}\sin(\frac{\theta}{2}) & e^{i(\phi+\lambda)}\cos(\frac{\theta}{2}) \\ \end{pmatrix} \]

Syntax

Function: UGate

Parameters:

  • theta: Union[float, Parameter]
  • phi: Union[float, Parameter]
  • lam: Union[float, Parameter]
  • gam: Union[float, Parameter]

Example

{
  "logic_flow": [
    {
      "function": "UGate",
      "function_params": {
        "theta": "theta",
        "phi": "phi",
        "lam": "lam",
        "gam": "gam"
      }
    }
  ]
}
from classiq.interface.generator.standard_gates.u_gate import UGate
from classiq import ModelDesigner

model_designer = ModelDesigner()
u_params = UGate(theta="theta", phi="phi", lam="lam", gam="gam")
model_designer.UGate(u_params)

 U_example