# Rotation gates **Rotation gates** ($R_X$, $R_Y$, $R_Z$) are parametric single-qubit gates that apply rotations around the x, y, z axes of the Bloch sphere by angle $\theta$. They are fundamental building blocks for state preparation and variational quantum algorithms, since any single-qubit unitary can be decomposed as a product of rotations around two perpendicular axes. ## The three rotation gates - **[[quantum-gate-rx|RX gate]]** ($R_X(\theta)$): rotation around x-axis by $\theta$; has complex entries - **[[quantum-gate-ry|RY gate]]** ($R_Y(\theta)$): rotation around y-axis by $\theta$; real-valued matrix - **[[quantum-gate-rz|RZ gate]]** ($R_Z(\theta)$): rotation around z-axis by $\theta$; diagonal (phase shifts only) ## Matrix representations $$R_X(\theta) = \begin{pmatrix} \cos(\theta/2) & -i\sin(\theta/2) \\ -i\sin(\theta/2) & \cos(\theta/2) \end{pmatrix}$$ $$R_Y(\theta) = \begin{pmatrix} \cos(\theta/2) & -\sin(\theta/2) \\ \sin(\theta/2) & \cos(\theta/2) \end{pmatrix}$$ $$R_Z(\theta) = \begin{pmatrix} e^{-i\theta/2} & 0 \\ 0 & e^{i\theta/2} \end{pmatrix}$$ ## Common properties All three rotation gates share: - **Periodicity**: $R(\theta + 2\pi) = R(\theta)$ - **Inverse**: $R(\theta)^\dagger = R(-\theta)$ - **Composition**: $R_i(\alpha) R_i(\beta) = R_i(\alpha + \beta)$ (same axis) - **Exponential form**: $R_i(\theta) = e^{-i\theta \sigma_i / 2}$ where $\sigma_i$ is the corresponding Pauli matrix ## Special cases and relations to Pauli gates At $\theta = \pi$, rotations relate to [[quantum-gate-pauli|Pauli gates]] (up to global phase): - $R_X(\pi) = -i X$ - $R_Y(\pi) = -i Y$ - $R_Z(\pi) = -i Z$ $R_Z(\pi/2)$ equals the [[quantum-gate-s|S gate]]; $R_Z(\pi/4)$ equals the [[quantum-gate-t|T gate]]. ## Euler angle decomposition Any single-qubit unitary can be decomposed as: $$U(\phi, \theta, \lambda) = R_Z(\phi) R_Y(\theta) R_Z(\lambda)$$ This is the standard Euler angle parametrization. The [[quantum-gate-u|U gate]] implements this directly. Alternatively, $R_X R_Y R_Z$ or other axis orderings work depending on convention. ## Uses - **State preparation**: Rotate computational basis states to arbitrary points on the Bloch sphere - **Variational algorithms**: [[cuda-q-vqe|VQE]] and [[cuda-q-qaoa|QAOA]] use parameterized rotation layers as ansatze - **Circuit synthesis**: Arbitrary single-qubit unitaries decompose into two rotations around perpendicular axes - **Measurement basis change**: Rotate before measurement to extract different observables - **Native gates**: Most quantum platforms implement rotations efficiently as single pulses ## Implementation notes - **Superconducting qubits**: RX and RY typically ~20–40 ns; RZ is often virtual (reference frame adjustment) - **Trapped ions**: rotations via laser pulses at various frequencies; gate times ~1–10 μs - **Photonic**: rotations via wave plates or optical phase shifters - **Fidelity**: typically 99–99.9% depending on platform ## Relations - [[quantum-gate-rx|RX gate]], [[quantum-gate-ry|RY gate]], [[quantum-gate-rz|RZ gate]]: individual gate articles - [[quantum-gate-u|U gate]]: universal single-qubit gate (Euler angles) - [[quantum-gate-single-qubit|Single-qubit gates]]: rotations generate all of $\mathrm{SU}(2)$ - [[quantum-gate-pauli|Pauli gates]]: special cases of rotations at $\theta = \pi$ - [[quantum-gate-s|S gate]] and [[quantum-gate-t|T gate]]: special cases of RZ at specific angles