Site Tools


rz-gate

**This is an old revision of the document!**

$R_z(\theta)$ gate

$R_z(\theta)$ gate rotates a qubit by angle $\theta$ about the $z$-axis of the Bloch sphere. It is one of the three rotation gates and is defined as the matrix exponential of the Pauli-Z operator:

$$R_z(\theta) = e^{-i\theta Z/2} = \begin{pmatrix}e^{-i\theta/2} & 0\\[6pt] 0 & e^{i\theta/2}\end{pmatrix}$$

Applied to the computational basis states:

$$R_z(\theta)\lvert 0\rangle = e^{-i\theta/2}\lvert 0\rangle \qquad R_z(\theta)\lvert 1\rangle = e^{i\theta/2}\lvert 1\rangle$$

The gate is diagonal — it accumulates a relative phase of $e^{i\theta}$ between the two amplitudes without changing their magnitudes. This phase has no observable effect when measured in the computational basis, but it alters interference when the qubit is in superposition. On the Bloch sphere, $\lvert 0\rangle$ and $\lvert 1\rangle$ are the north and south poles, so $R_z$ leaves them invariant and sweeps all equatorial states around the $z$-axis. Several important gates are special cases: $R_z(\pi) = -iZ$ (phase flip up to global phase), $R_z(\pi/2) = e^{-i\pi/4}S$ (S gate up to global phase), and $R_z(\pi/4) = e^{-i\pi/8}T$ (T gate up to global phase).

List of code implementations

rz-gate.1781301585.txt.gz · Last modified: by 127.0.0.1