6
$\begingroup$

I was reading the documentation for qiskit.QuantumCircuit and came across the functions cu1(theta, ctl, tgt) and cu3(theta, phi, lam, ctl, tgt). Looking at the names they seem to be controlled rotations. ctrl represents the controlled qubit and tgt represents the target qubit. However, what are theta, lambda and phi? They're rotations about which axes? Also, which rotation matrices are being used for cu1 and cu3?

$\endgroup$
6
$\begingroup$

From IBM Q Documentation (the link is hard to find) here is the definition of the generic gate: $$ U(\theta, \phi, \lambda) = \begin{pmatrix} \cos\left(\frac{\theta}{2}\right) & -e^{i\lambda} \sin\left(\frac{\theta}{2}\right) \\ e^{i\phi} \sin\left(\frac{\theta}{2}\right) & e^{i(\lambda + \phi)} \cos\left(\frac{\theta}{2}\right) \end{pmatrix} $$

With this gate, they define the following gates: $$ \begin{split} U_1(\lambda) &= U(0, 0, \lambda) = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\lambda} \end{pmatrix} \\ U_2(\phi, \lambda) &= U\left(\frac{\pi}{2}, \psi, \lambda\right) = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & -e^{i\lambda} \\ e^{i\phi} & e^{i(\lambda+\phi)} \end{pmatrix} \\ U_3(\theta, \phi, \lambda) &= U(\theta, \phi, \lambda) = \text{see above} \end{split} $$

These gates are the basis (with CX) of the IBM Q online backends (i.e. the real chips).

The cu1 and cu3 are the controlled operations associated with the matrices above.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.