# What is the relation between these two forms of a single-qubit unitary operation?

I want to understand the relation between the following two ways of deriving a (unitary) matrix that corresponds to the action of a gate on a single qubit:

1) HERE, in IBM's tutorial, they represent the general unitary matrix acting on a qubit as: $$U = \begin{pmatrix} \cos(\theta/2) & -e^{i\lambda}\sin(\theta/2) \\ e^{i\phi}\sin(\theta/2) & e^{i\lambda+i\phi}\cos(\theta/2) \end{pmatrix},$$ where $0\leq\theta\leq\pi$, $0\leq \phi<2\pi$, and $0\leq \lambda<2\pi$.

This is derived algebraically using the definition of a unitary operator $U$ to be: $UU^{\dagger}=I$.

2) HERE (pdf), similar to Kaye's book An Introduction Quantum Computing, the same operator is calculated to be: $$U=e^{i\gamma}\,R_{\hat n}(\alpha).$$ Here, $R_{\hat n}(\alpha)$ is the rotation matrix around an arbitrary unit vector (a vector on the Bloch sphere) as the axis of rotation for an angle $\alpha$. Also, $e^{i\gamma}$ gives the global phase factor to the formula(which is not observable after all). The matrix corresponding to this way of deriving $U$ is: $$e^{i\gamma}\cdot\begin{pmatrix} cos\frac{\alpha}{2}-i\,sin\frac{\alpha}{2}\,cos\frac{\theta}{2}&-i\,sin\frac{\alpha}{2}\,e^{-i\phi}\\ -i\,sin \frac{\alpha}{2}e^{i\phi}&cos\frac{\alpha}{2}+i\,sin\frac{\alpha}{2}\,cos\theta\end{pmatrix}.$$

This derivation is clearer to me since it gives a picture of these gates in terms of rotating the qubits on the Bloch sphere, rather than just algebraic calculations as in 1.

Question: How do these angles correlate in 1 and 2? I was expecting these two matrix to be equal to each other up to a global phase factor.

P.S.: This correspondence seems instrumental to me for understanding the U-gates defined in the tutorial (IBM).

Your second unitary isn't quite right, it's not even unitary! I think it should be: $$e^{i\gamma}\cdot\begin{pmatrix} \cos\frac{\alpha}{2}-i\,\sin\frac{\alpha}{2}\,\cos\frac{\theta}{2}&-i\,\sin\frac{\alpha}{2}\sin\frac{\theta}{2}\,e^{-i\phi}\\ -i\,\sin \frac{\alpha}{2}\sin\frac{\theta}{2}e^{i\phi}&\cos\frac{\alpha}{2}+i\,\sin\frac{\alpha}{2}\,\cos\frac{\theta}{2}\end{pmatrix}.$$
This may make is easier to find the correspondence. Let me put $\tilde\$ over the entities from the first unitary in order to distinguish them.

Let's define $\tan(\beta)=\tan\frac{\alpha}{2}\cos\frac{\theta}{2}$. This is the phase of the first matrix element, so $$\cos\frac{\alpha}{2}-i\,\sin\frac{\alpha}{2}\,\cos\frac{\theta}{2}=e^{i\beta}\cos\frac{\tilde\theta}{2},$$ where we're allowing equality between the two unitaries to be up to a global phase $e^{i(\gamma+\beta)}$. In other words, $$\cos^2\frac{\tilde\theta}{2}=\cos^2\frac{\alpha}{2}+\sin^2\frac{\alpha}{2}\cos^2\frac{\theta}{2}=\cos^2\frac{\alpha}{2}\sec^2\beta.$$

For the off-diagonal entries, recall that a unitary matrix must have columns whose sum-mod-square must be 1. Thus, the off-diagonal entries must be $\sin\frac{\tilde\theta}{2}$ up to some phase which we have to fix. We need $$-\beta+\phi-\frac{\pi}{2}=\tilde\phi\qquad -\beta-\phi-\frac{\pi}{2}=\tilde\lambda+\pi,$$ where I've incorporated the $i$ and $-1$ factors using phases $\pi/2$ and $\pi$. That perfectly fixes the relations between those two.

Now we only have to get the bottom-right matrix element correct. Again, we've already got the weight correct by unitarity, it's just the phase that we need. This is $-2\beta$, which from adding together the above two relations gives $\tilde\phi+\tilde\lambda+2\pi\equiv\tilde\phi+\tilde\lambda$, exactly as required.

• Yes, thank you. The correct version of the second matrix is what you wrote, just with $\theta$ instead of $\theta/2$, which is not that important. Aside from that, I don't understand this: If $-\beta+\phi-\frac{\pi}{2}=\tilde\phi$, then comparing the third entries of the matrices: $e^{i\tilde\phi}\,sin(\tilde\theta/2)=e^{i(-\beta+\phi-\frac{\pi}{2})}\,sin(\frac{\tilde\theta}{2})=(-i)e^{i\phi}\,e^{-i\beta}\,sin(\frac{\tilde\theta}{2})$ equals to $-i\,\sin \frac{\alpha}{2}\sin\frac{\theta}{2}e^{i\phi}$, which implies: $e^{-i\beta}=sin\frac{\alpha}{2}$, which is not right. Where is the issue? Jun 29, 2018 at 15:51
• The $e^{-i\beta}$ cancels with the $e^{i\beta}$ that needs to be a global phase in order to get the top-left entry correct, so you just end up with $\sin\frac{\tilde\theta}{2}=\sin\frac{\alpha}{2}\sin\frac{\theta}{2}$ (you cancelled two $\sin\frac{\theta}{2}$ terms, but one had a $\tilde\$ which means you can't cancel them directly). Jun 29, 2018 at 15:58

IBM tutorial's representation of a general unitary matrix $$U(\theta,\phi,\lambda)$$ can be derived as rotation of qubit on the Bloch sphere, in much the same way as the pdf reference has derived $$R_{\hat{n}}(\alpha)$$. But, these are two different ways of doing the same operation, requiring different user inputs. $$R_{\hat{n}}(\alpha)$$ considers rotation of qubit $$|\psi\rangle$$ about an arbitrary axis $$\hat{n}$$, whereas, $$U(\theta,\phi,\lambda)$$ is directly manipulating initial qubit state $$|\psi\rangle$$ to $$|\psi '\rangle$$. The above figure shows qubit manipulation as rotation in a Bloch sphere representation in both ways. Either-

1. The initial qubit state can be rotated about $$Z$$ axis by angle $$\lambda$$, then about $$Y$$ axis by angle $$\theta$$, and finally about $$Z$$ axis by angle $$\phi$$, to achieve $$|\psi '\rangle$$. In matrix form, this can be written as:

$$\begin{array} \ U(\theta , \phi , \lambda) &= R_{Z}(\phi)R_{Y}(\theta)R_{Z}(\lambda) \\ &= \begin{bmatrix} e^{-i\phi/2} & 0\\ 0 & e^{i\phi/2} \end{bmatrix} \begin{bmatrix} cos(\theta/2) & -sin(\theta/2)\\ sin(\theta/2) & cos(\theta/2)\end{bmatrix} \begin{bmatrix} e^{-i\lambda/2} & 0\\ 0 & e^{i\lambda/2} \end{bmatrix}\\ &= \begin{bmatrix} cos(\theta/2)e^{-i\phi/2} & -sin(\theta/2)e^{-i\phi}\\ sin(\theta/2)e^{i\phi/2} & cos(\theta/2)e^{i\phi/2} \end{bmatrix} \begin{bmatrix} e^{-i\lambda/2} & 0\\ 0 & e^{i\lambda/2} \end{bmatrix}\\ &=e^{-i(\phi+\lambda)/2} \begin{bmatrix} cos(\theta/2) & -sin(\theta/2)e^{-i\lambda}\\ sin(\theta/2)e^{-i\phi} & cos(\theta/2)e^{i\{\phi+\lambda\}} \end{bmatrix}\\ &= \begin{bmatrix} cos(\theta/2) & -sin(\theta/2)e^{-i\lambda}\\ sin(\theta/2)e^{-i\phi} & cos(\theta/2)e^{i\{\phi+\lambda\}} \end{bmatrix}\mbox{, equal upto the global phase factor} \end{array}$$

1. Or, the operation of single qubit unitary gate can be visualized as rotation about arbitrary axis $$\hat{n}$$, i.e., first bringing $$\hat{n}$$ parallel to $$|Z\rangle$$, and then, rotating $$|\psi\rangle$$ by an angle $$\alpha$$ about $$|Z\rangle$$ axis, followed by bringing $$\hat{n}$$ back to its original position, as follows:

$$\begin{array} \ R_{\hat{n}}(\alpha) &= f(\alpha, n_{\theta}, n_{\phi}) \\ &= R_Z(n_{\phi})R_Y(n_{\theta})R_Z(\alpha)R_Y(-n_{\theta})R_Z(-n_{\phi}) \\ &= \begin{bmatrix} cos(\alpha/2)-isin(\alpha/2)cos(n_{\theta}) & -isin(\alpha/2)sin(n_{\theta})e^{-i\phi}\\ -isin(\alpha/2)sin(n_{\theta})e^{i\phi} & cos(\alpha/2)+isin(\alpha/2)cos(n_{\theta}) \end{bmatrix} \end{array}$$

I guess, the reason $$U(\theta,\phi,\lambda)$$ is an easier choice over $$R_{\hat{n}}(\alpha)$$ is because:

1. For a given initial and final qubit states, there is a unique magnitude of $$(\theta, \phi, \lambda)$$ representating unitary qubit gate, but, the same cannot be said about combination $$(\alpha, \hat{n})$$. This is because, any of the axis present on the perpendicular angle bisector plane, bisecting the angle between initial and final qubit Bloch vector, can represent that unitary gate. Off course, $$\alpha$$ will be decided on the choice of rotation axis chosen. $$\alpha$$ can be found out by noting the angle between projections of $$|\psi\rangle$$ and $$|\psi '\rangle$$ on plane normal to axis $$\hat{n}$$. (not shown in the figure).

2. Given a 2x2 unitary matrix, its much easier to find $$(\theta, \phi, \lambda)$$ than finding $$(\alpha, n_{\theta}, n_{\phi})$$. Though, one may argue that, finding $$(\alpha, n_{x}, n_{y}, n_{z})$$ is much easier. But, that's besides the point, and

3. Its far more initiative to think of directly rotating initial qubit to final state, then bringing a third vector into picture to do the job.

One may try finding relation between the two matrices which, in this analysis, essentially boils down to finding the relations between $$(\theta, \phi, \lambda)$$ and $$(\alpha, n_{\theta}, n_{\phi})$$.

• Hi and welcome to Quantum Computing SE. Very nice answer. +1 May 17, 2021 at 13:52
• @MartinVesely Thankyou. May 18, 2021 at 14:35
• Hi, please see my question: quantumcomputing.stackexchange.com/questions/26614/… I am not sure about how to extract the rotation angles around each axis May 29 at 14:14