A qubit is given in the following form:

$\left|\psi\right\rangle = \cos\left(\dfrac{\theta}{2}\right)\left|0\right\rangle + e^{i\phi}\sin\left(\dfrac{\theta}{2}\right)\left|1\right\rangle$.

Let's us start at $\left|0\right\rangle$ and rotate about the $x$-axis $180^{\circ}$ (we should end up at $\left|1\right\rangle$). Mathematically, it could be shown easily:

Let $\theta = 180^{\circ}$ and $\phi = 0^{\circ}$:

$\left|\psi\right\rangle = \cos\left(\dfrac{180}{2}\right)\left|0\right\rangle + e^{i(0)}\sin\left(\dfrac{180}{2}\right)\left|1\right\rangle\\ \left|\psi\right\rangle = \cos\left(90\right)\left|0\right\rangle + \sin\left(90\right)\left|1\right\rangle\\ \left|\psi\right\rangle = \left|1\right\rangle $

Now, let's use the rotation matrix instead. The matrix is given as: $R_x(\theta) \equiv e^{-i \theta \mathbb{X}/2} = \cos(\theta/2)\mathbb{I} -i\sin(\theta/2)\mathbb{X} = \begin{bmatrix} \cos(\theta/2) & -i\sin(\theta/2) \\ -i\sin(\theta/2) & \cos(\theta/2)\end{bmatrix}$, where $\mathbb{I} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$ and $\mathbb{X} = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$.

Using $R_x(\theta)$, we get

$R_x(180) = \begin{bmatrix} \cos(180/2) & -i\sin(180/2) \\ -i\sin(180/2) & \cos(180/2)\end{bmatrix}\begin{bmatrix}1\\0\end{bmatrix}\\ R_x(180) = \begin{bmatrix}0 & -i\\ -i & 0\end{bmatrix}\begin{bmatrix}1\\0\end{bmatrix}\\ R_x(180) = \begin{bmatrix}0\\-i\end{bmatrix}\\ R_x(180) = -i\begin{bmatrix}0\\1\end{bmatrix}. $

Of course, I feel that I am missing something. The vector obtained is correct but with a phase shift of $-i$.

Also, I am wondering why it is okay to let $\phi = 0$ (if it is not correct, then what should be the value?).

Lastly, I would like to know why the rotation matrix only have $\theta$ but not $\phi$.

Thank you in advance!

  • $\begingroup$ You could use a $R_y$ gate instead $\endgroup$
    – Mauricio
    Oct 3, 2021 at 17:36

1 Answer 1


Be careful with your choice of notation. You're using $(\theta,\phi)$ to describe the input state, and you're using $\theta$ as the angle of rotation. These two are different $\theta$s.

Now $\theta=\pi$ and $\phi=0$ simply because you chose your initial state to be $|0\rangle$. (Actually, $\phi$ could be arbitrary, so you pick it to be 0 for simplicity.)

It perhaps helps to think about a picture of the Bloch sphere. An arbitrary pure state (on the surface of the sphere) requires two parameters to describe it, $(\theta,\phi)$. An arbitrary rotation requires three parameters - an axis (which is two parameters, entirely equivalent to the $(\theta,\phi)$ of the pure state), and an angle of rotation about that axis. Now, in your example, you have selected a fixed axes, $X$, and the $\theta$ you're using describes the angle of rotation about that axis. See, it's really incomparable to the other $\theta$ you're using.

Finally, you are correct that the $R_x$ operation gives you the answer that you want only up to a global phase factor. But global phase factors make no difference, and can be neglected.

Also, the -i you see outside the state vector is part of global phase. Those are not considered phase shifts (only relative phase shifts are). And since $R_x$ does not introduce any phase shift, $\phi$ is not in its rotation matrix.

PS: As @DaftWullie pointed out, axis needs two parameters.

  • $\begingroup$ I appreciate your feedback! Can you please elaborate further on the difference between the input state and angle of rotation. Also, you mentioned that "An arbitrary rotation requires three parameters - an axis, and an angle of rotation about that axis". What is the third parameter? $\endgroup$ Aug 14, 2019 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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