Quantum Lab
Quantum Lab

An interactive quantum mechanics learning platform and cryostat wiring co-design tool. From plain-language intuition to formal mathematics.

contact@quantumcircuitsimulator.com

Product

  • Circuit Lab
  • Learn
  • Hardware Studio
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Quantum Lab. All rights reserved.

This site, including its original quantum simulations, cryostat reference systems, 3D models, and interface design, contains protected proprietary material.

Home/Quantum Physics/Lessons/RZ Gate (Z-Rotation)
Rz

RZ Gate (Z-Rotation)

RotationSingle-qubitZ-rot

Rotates around the Z axis by angle θ.

Intuition

RZ adjusts the relative phase between |0⟩ and |1⟩ by a continuously tunable angle. Like the Z gate, it does not change measurement probabilities in the computational basis. The effect is purely in the phase, which means it is invisible until a later gate (like H) converts the phase difference into a measurable probability change. RZ is often the cheapest gate to implement on real quantum hardware, sometimes even “free” as a virtual gate.

Matrix representation
(e−iθ/20​0eiθ/2​)
Action on states
Rz​(θ)∣ψ⟩=e−iθZ/2∣ψ⟩
Bloch sphere
|+⟩
→
RZ(π/2)|+⟩
Circuit
q0HRzH
State comparison
Before RZ Gate
|+⟩
|0\u27E9
50%
|1\u27E9
50%
Bloch: (1.00, 0.00, 0.00)
→
After RZ Gate
RZ(π/2)|+⟩
|0\u27E9
50%
|1\u27E9
50%
Bloch: (0.00, 1.00, 0.00)
Precise explanation

RZ(θ) = exp(−iθZ/2) = diag(exp(−iθ/2), exp(iθ/2)). It multiplies |0⟩ by exp(−iθ/2) and |1⟩ by exp(iθ/2), creating 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 commutes with all other Z-rotations.

Observable effect

No change to computational-basis measurement probabilities.

Hidden effect

Phase-only change — visible after a mixing gate.

Bloch sphere

Rotates by θ around the Z axis. The poles stay fixed. Equatorial states rotate by θ, adjusting relative phase between |0⟩ and |1⟩.

Worked example

Tuning phase for interference

  1. 1Start with |+⟩ = (|0⟩ + |1⟩)/√2.
  2. 2Apply RZ(π/2): the state becomes (e^{−iπ/4}|0⟩ + e^{iπ/4}|1⟩)/√2.
  3. 3The relative phase between |0⟩ and |1⟩ is now π/2.
  4. 4Apply H: the phase difference converts to a probability bias, shifting the measurement outcome.
Common use cases
  • Phase tuning in variational circuits
  • Quantum Fourier Transform (each rotation is an RZ at a different angle)
  • Virtual Z gates on superconducting hardware (essentially free)
  • Euler decomposition: any single-qubit gate = RZ·RY·RZ
Relation to other gates
  • RZ(π) = −iZ (Z gate up to global phase)
  • RZ(π/2) ≈ S gate (up to global phase)
  • RZ(π/4) ≈ T gate (up to global phase)
  • All RZ gates commute with each other: RZ(α)RZ(β) = RZ(α+β)
Common misconception

Because RZ does not change measurement odds, it might seem like it does nothing. But phase is the lifeblood of quantum algorithms — every interference effect depends on carefully tuned phases.

Why this gate matters

RZ is arguably the most practical gate. On many quantum hardware platforms, Z-rotations are implemented virtually by adjusting the reference frame, making them error-free. Understanding RZ is key to efficient circuit compilation.

Test your understanding

Why is RZ sometimes called a “virtual gate” on real hardware?

Quick reference →↗ Nielsen and Chuang, Quantum Computation and Quantum Information
←
Previous
RY Gate
Next
U3 Gate
→
← Back to all lessons