I'm looking for a representation of Hadamard gate that uses only $R_x(x)$ and $R_y(y)$ gates. The values $x$ and $y$ may be the same, but they don't necessarily need to be.


1 Answer 1


If you're not concerned with global phase then the following works using only two rotation gates: \begin{align} R_y\left(-\frac{\pi}{2}\right) R_x\left(\pi\right) &= \exp \left(i\frac{\pi}{4}Y\right) \exp \left(-i\frac{\pi}{2}X\right) \\&= \left(\cos \frac{\pi}{4} I + i\sin \frac{\pi}{4} Y\right) \left(-iX\right) \\&=\begin{pmatrix} \cos \frac{\pi}{4} & \sin\frac{\pi}{4} \\ -\sin \frac{\pi}{4} & \cos \frac{\pi}{4} \end{pmatrix} \begin{pmatrix} 0 & -i \\ -i & 0 \end{pmatrix} \\&= -\frac{i}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \\&= -iH \end{align} where $R_x(\theta) = \exp(-i\theta X/2)$ and $R_y(\theta) = \exp(-i\theta Y/2)$.

  • 1
    $\begingroup$ Nice answer! Just a quick addition: if you do care about the global phase then it is actually not possible $\endgroup$ Jul 8, 2021 at 9:43

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.