← Atlas

Gates · Rotation gate

RZ rotation gate

A parametrized single-qubit rotation about the Z axis that adds a relative phase between |0⟩ and |1⟩ without changing measurement probabilities in the computational basis.

Exact & formalUpdated

View frozen graph

A small worked example, computed in your browser. It is not a result from this record's papers.

RZ(θ), a rotation that only moves phase

One qubit, put into |+⟩ = (|0⟩ + |1⟩)/√2 first, because on |0⟩ or |1⟩ alone this gate changes nothing a measurement or another gate can ever detect.

q0Step 1 of 2 · HHStep 2 of 2 · RZ(π/2)RZ(π/2)

Step 1 of 2 · H

Probability of each outcome after this step

  • 050%
  • 150%
  1. Puts the qubit into an equal superposition. Without this there is no second amplitude for the gate's phase to be measured against, and a phase on the whole state is not observable.

    Probability spreads from 1 outcome to 2. All 2 are equally likely.

  2. Multiplies the |1⟩ half of the state by a phase of π/2 at this angle, and leaves |0⟩ alone. RZ splits the angle between the two halves rather than putting all of it on |1⟩, so it differs from P by a phase on the whole state — which is to say, by nothing any measurement can find. The two outcomes stay equally likely — the difference is carried entirely in the phase between them, which is what the panel beside the bars shows.

    The outcome probabilities do not move at all. What this step changes is phase — 2 distinct relative phases across the state now — which no measurement can see until a later step turns it back into probability.

Readout Measuring gives 0 or 1, each half the time — exactly as it did before the gate. A single measurement of this qubit cannot detect this gate at all. Its effect becomes visible only when the phase is turned back into probability by a later interference step, which is what every algorithm that uses it does.

Open in Studio
  • Steps1
  • Wires1
  • Qubits1
  • Depth1 gate (often 0-duration on hardware)
  • Parameterθ (radians)
  • Papers2

Definition

RZ(θ)=e−iθZ/2=(e−iθ/200eiθ/2)R_Z(\theta) = e^{-i\theta Z/2} = \begin{pmatrix} e^{-i\theta/2} & 0 \\ 0 & e^{i\theta/2} \end{pmatrix}

RZR_Z is diagonal in the computational basis, so it commutes with any other RZ(ϕ)R_Z(\phi) and with measurement in the ZZ basis.

Action on basis states

RZ(θ)∣0⟩=e−iθ/2∣0⟩,RZ(θ)∣1⟩=eiθ/2∣1⟩R_Z(\theta)|0\rangle = e^{-i\theta/2}|0\rangle, \qquad R_Z(\theta)|1\rangle = e^{i\theta/2}|1\rangle

Each basis state only picks up a phase, so ∣⟨0∣RZ(θ)∣0⟩∣2=∣⟨1∣RZ(θ)∣1⟩∣2=1|\langle 0|R_Z(\theta)|0\rangle|^2 = |\langle 1|R_Z(\theta)|1\rangle|^2 = 1 for every θ\theta — a ZZ rotation is invisible to a ZZ-basis measurement on its own. Its effect only shows up on a qubit already in superposition, e.g. RZ(θ)12(∣0⟩+∣1⟩)=12(e−iθ/2∣0⟩+eiθ/2∣1⟩)R_Z(\theta)\tfrac{1}{\sqrt2}(|0\rangle+|1\rangle) = \tfrac{1}{\sqrt2}(e^{-i\theta/2}|0\rangle + e^{i\theta/2}|1\rangle), which differs from the input by a relative phase of eiθe^{i\theta}.

Key identities

  • P(λ)=eiλ/2RZ(λ)P(\lambda) = e^{i\lambda/2}R_Z(\lambda): the OpenQASM phase gate PP is RZR_Z up to an overall phase — PP fixes the ∣0⟩|0\rangle amplitude at exactly 11 instead of splitting the phase symmetrically.
  • S=RZ(π/2)S = R_Z(\pi/2) and T=RZ(π/4)T = R_Z(\pi/4) up to global phase, so RZR_Z generalizes the whole Clifford/non-Clifford phase-gate ladder to a continuous parameter.
  • RX(θ)=HRZ(θ)HR_X(\theta) = H R_Z(\theta) H and RY(θ)=RZ(−π/2)RX(θ)RZ(π/2)R_Y(\theta) = R_Z(-\pi/2) R_X(\theta) R_Z(\pi/2): composing conjugations by HH and by RZ(±π/2)R_Z(\pm\pi/2) lets a compiler reach any rotation axis from RZR_Z alone.
  • On superconducting hardware, RZ(θ)R_Z(\theta) is frequently realized as a virtual zero-duration frame update rather than a physical microwave pulse, making it effectively free and noiseless compared to RXR_X/RYR_Y.

References

Exact & formal
  • Unitary / matrix equivalence
  • Direct mathematics
  • Textbook / standard citation
Method
Compare the parametrized RZ matrix against the diagonal exponential form diag(e^{-iθ/2}, e^{iθ/2}) and confirm it leaves computational-basis probabilities unchanged.
Result
Pass · RZ(θ) = diag(e^{-iθ/2}, e^{iθ/2}) exactly; |⟨0|RZ(θ)|0⟩|² = |⟨1|RZ(θ)|1⟩|² = 1 for all θ.
OpenQASM 3 standard gate set ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
CC BY 4.0-compatible reference metadata
rotation gatesingle qubitphasevirtual z

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.