bloqade.qasm2.cu
← Module overview
function
source
functioncu¶source
bloqade.qasm2.cu
Signature
def cu(ctrl: Qubit, qarg: Qubit, theta: float, phi: float, lam: float, gamma: float) -> NoneControlled 4-parameter unitary gate.
This is equal to:
gate cu(theta,phi,lambda,gamma) c, t{ p(gamma) c; p((lambda+phi)/2) c; p((lambda-phi)/2) t; cx c,t; u(-theta/2,0,-(phi+lambda)/2) t; cx c,t; u(theta/2,phi,0) t; }
Parameters
| Name | Type | Description |
|---|---|---|
ctrl | Qubit | The control qubit. |
qarg | Qubit | The target qubit. |
theta | float | The angle of rotation. |
phi | float | The angle of rotation. |
lam | float | The angle of rotation. |
gamma | float | The angle of rotation. |