Skip to content

bloqade.qasm2.cu

← Module overview

functioncusource

bloqade.qasm2.cu

Signature
def cu(ctrl: Qubit, qarg: Qubit, theta: float, phi: float, lam: float, gamma: float) -> None

Controlled 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

NameTypeDescription
ctrlQubitThe control qubit.
qargQubitThe target qubit.
thetafloatThe angle of rotation.
phifloatThe angle of rotation.
lamfloatThe angle of rotation.
gammafloatThe angle of rotation.
source