# Rotation-Y gate **$R_y(\theta)$ gate** rotates a qubit by angle $\theta$ about the $y$-axis of the [[bloch-sphere|Bloch sphere]]. It is one of the three [[rotation-gates|rotation gates]] and is defined as the matrix exponential of the [[pauli-gates|Pauli-Y]] operator: $$R_y(\theta) = e^{-i\theta Y/2} = \begin{pmatrix}\cos\dfrac{\theta}{2} & -\sin\dfrac{\theta}{2}\\[6pt] \sin\dfrac{\theta}{2} & \cos\dfrac{\theta}{2}\end{pmatrix}$$ Applied to the computational basis states: $$R_y(\theta)\lvert 0\rangle = \cos\tfrac{\theta}{2}\lvert 0\rangle + \sin\tfrac{\theta}{2}\lvert 1\rangle \qquad R_y(\theta)\lvert 1\rangle = -\sin\tfrac{\theta}{2}\lvert 0\rangle + \cos\tfrac{\theta}{2}\lvert 1\rangle$$ Unlike [[rx-gate|$R_x$]], the matrix entries are entirely real — no imaginary phases appear in the off-diagonal. This makes $R_y$ the natural gate for preparing states with real amplitudes. At $\theta = \pi/2$ it produces $\tfrac{1}{\sqrt{2}}(\lvert 0\rangle + \lvert 1\rangle) = \lvert +\rangle$, the same result as the [[h-gate|Hadamard gate]] up to global phase. At $\theta = \pi$, $R_y(\pi) = -iY$ — a combined bit and phase flip up to global phase. The eigenstates are $\lvert +i\rangle$ and $\lvert -i\rangle$ (the $y$-axis poles of the Bloch sphere). ## List of code implementations - [[r-gate-qiskit|Rotation gates (Qiskit)]] - [[r-gate-custatevec|Rotation gates (cuStateVec)]] - [[r-gate-cudaq|Rotation gates (CUDA-Q)]]