Rotates the qubit around the Z axis of the Bloch sphere by a chosen angle .
RZ shifts the relative phase between and by a continuously tunable angle . Relative phase is the difference in the complex-number angles of the two amplitudes. It determines how the and components interfere when combined by a later gate. Like Z, RZ does not change measurement probabilities in the computational basis. The effect is purely in the phase. It becomes visible only after a gate like H converts the phase difference into a probability change. On many real quantum processors, RZ is implemented as a "virtual gate" by adjusting the classical control frame, making it essentially free of errors.
RZ diag. "Diag" means a diagonal matrix: one that acts on each basis state independently, multiplying by and by . This creates a relative phase of between the two basis states. At , RZ −iZ, which is the Z gate up to global phase. RZ is diagonal and therefore commutes with all other Z-rotations. Two Z-rotations in sequence simply add their angles: RZ RZ RZ.
No change to measurement probabilities in the computational basis.
The relative phase between and shifts by . This becomes visible after a mixing gate converts phase into probability.
Rotates the Bloch vector by around the Z axis. The poles ( and stay fixed. Equatorial states rotate by , shifting the relative phase.
It is tempting to think RZ does nothing because the measurement histogram looks unchanged. That sounds reasonable because the probabilities truly do not change. What actually happens is that RZ shifts the relative phase, and relative phase is what drives every interference effect in quantum computing. Without precise phase control, no quantum algorithm works.
RZ is arguably the most practical gate. On many superconducting quantum processors, Z-rotations are implemented by adjusting the classical reference frame rather than pulsing the qubit physically. This makes them virtually error-free and instantaneous. Understanding RZ is key to efficient circuit compilation.
Why is RZ sometimes called a "virtual gate" on real hardware?