# How to obtain Y rotation with only X and Z rotations gates?

Let's say you have a system with which you can perform arbitrary rotations around the X and Z axis. How would you then be able to use these rotations to obtain an arbitrary rotation around the Y axis?

I have seen somewhere that rotation around an arbitrary axis can be achieved by doing three rotations around two fixed axis, that is, $$\hat{R}_\vec{n}(\theta)=R_Z(\gamma)R_X(\beta)R_Z(\alpha)$$ for some angles $$\gamma, \alpha, \beta$$. But how do you actually use this? What if I want to rotate around the Y axis with an angle of $$\theta$$ i.e. $$\hat{R}_Y(\theta)$$? Then how do I figure out what $$\gamma,\alpha,\beta$$ to use?

Edit: I've found a nice answer on Physics SE.

Try selecting $$\gamma$$ and $$\alpha$$ so that you get the rotation $$\sqrt{Z}R_X(\beta)\sqrt{Z}^\dagger.$$ There's two little tricks here that make this work. Firstly, the $$R_X(\beta)$$ has an $$\mathbb{I}$$ component and an $$X$$ component (I always get factors of $$1/2$$ wrong here, so I won't write out the cos and sin functions explicitly unless you define your $$R_x$$ function). Now, $$\sqrt{Z}\mathbb{I}\sqrt{Z}^\dagger=\mathbb{I}$$ while there's some funky anti-commutation that goes on with $$X$$: $$\sqrt{Z}X\sqrt{Z}^\dagger=ZX=iY,$$ so you've managed to effectively change the $$X$$ into a $$Y$$, so you're getting $$Y$$ rotations.
• Could you explain what $\sqrt{Z}$ means? If $Z=\begin{bmatrix}1&0\\0&-1\end{bmatrix}$ then is $\sqrt{Z} = \begin{bmatrix}1&0\\0&i\end{bmatrix}$? Nov 20, 2018 at 12:18
• $\sqrt{Z}=\left(\begin{array}{cc} e^{i\pi/2} & 0 \\ 0 & e^{-i\pi/2} \end{array}\right)$. Nov 20, 2018 at 13:25
• Well actually, $\sqrt Z$ is indeed $\mathrm{diag} (1,i)$, but it is proportional to $\mathrm{diag} (\exp(-i\pi/2), \exp(i\pi/2)) = \exp(-i \pi Z/2)$, which more closely corresponds to how physicists might realise it or analyst processes involving it. Dec 19, 2018 at 16:01