# How to derive the rotations caused by the H gate?

In Nielsen and Chuang, there's the following paragraph:

The Hadamard operation is just a rotation of the sphere about the ˆy axis by 90◦, followed by a rotation about the ˆx axis by 180◦.

I am wondering how we were able to know that this is the transformation that the H gate creates? Is it implied from the matrix representation of the H gate? If so, how?

We start with definition of $$Rx(\theta_x)$$ and $$Ry(\theta_y)$$ rotations: $$Rx(\theta_x)= \begin{pmatrix} \cos(\theta_x/2) & -i\sin(\theta_x/2)\\ -i\sin(\theta_x/2) & \cos(\theta_x/2) \end{pmatrix}$$
$$Ry(\theta_y)= \begin{pmatrix} \cos(\theta_y/2) & -\sin(\theta_y/2)\\ \sin(\theta_y/2) & \cos(\theta_y/2) \end{pmatrix}$$
Setting $$\theta_x = \pi$$ we have $$Rx(\pi)= \begin{pmatrix} 0 & -i\\ -i & 0 \end{pmatrix} =-i \begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix} =-iX,$$ which is NOT gate ($$X$$), up to global phase represented by $$-i$$. However, the global phase can be neglected and we are left with $$X$$ gate.
If we put $$\theta_y = \pi/2$$ we get $$Ry(\pi/2)= \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & -1\\ 1 & 1 \end{pmatrix}$$ Multiplying $$XRy(\pi/2)$$ we get $$XRy(\pi/2)= \begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix} \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & -1\\ 1 & 1 \end{pmatrix} =\frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1\\ 1 & -1 \end{pmatrix} =H$$
• I think this should answers the OP question (+1). Also you probably meant to put $\theta_x$ instead of $\theta$ in your $R_X$ gate, similar with $R_Y$. Not a big deal but just thought I should mention it. Aug 3, 2021 at 14:37