• Fundamentals
  • Also: Z rotation
  • Also: Rz(θ)

Rz Gate

A single-qubit rotation gate that rotates the qubit state by angle theta around the Z axis of the Bloch sphere, often implemented as a virtual (zero-cost) gate on superconducting hardware.

The Rz gate is a parameterized single-qubit gate that performs a rotation by angle θ\theta around the ZZ axis of the Bloch sphere. Its matrix representation is:

Rz(θ)=(eiθ/200eiθ/2)R_z(\theta) = \begin{pmatrix} e^{-i\theta/2} & 0 \\ 0 & e^{i\theta/2} \end{pmatrix}

The Rz gate is one of the most fundamental rotation gates and plays a special role in quantum computing because of two properties: it is diagonal in the computational basis (meaning it does not cause bit-flip transitions between 0|0\rangle and 1|1\rangle), and on superconducting hardware it can often be implemented as a “virtual Z gate” with zero physical cost.

Relationship to other gates

Several common gates are special cases of Rz(θ)R_z(\theta) up to a global phase:

GateRz equivalentAngle
Z (Pauli-Z)Rz(π)R_z(\pi) (up to global phase)π\pi
S (Phase gate)Rz(π/2)R_z(\pi/2) (up to global phase)π/2\pi/2
T gateRz(π/4)R_z(\pi/4) (up to global phase)π/4\pi/4
IdentityRz(0)R_z(0)00

More precisely, Z=iRz(π)Z = iR_z(\pi), S=eiπ/4Rz(π/2)S = e^{i\pi/4}R_z(\pi/2), and T=eiπ/8Rz(π/4)T = e^{i\pi/8}R_z(\pi/4). The global phase difference is physically unobservable for isolated gates, but it matters when the gate is used in controlled operations.

Virtual Z gates

On superconducting qubit platforms (IBM, Google, Rigetti), single-qubit gates are implemented by applying microwave pulses at the qubit’s resonant frequency. An RxR_x or RyR_y rotation requires a physical pulse, but an RzR_z rotation can be absorbed into a change of the reference frame for subsequent pulses. This is called a “virtual Z gate” or “frame change.”

The idea is straightforward: rather than physically rotating the qubit’s state, the compiler adjusts the phase of all future microwave pulses on that qubit by θ\theta. The net effect on the computation is identical to applying Rz(θ)R_z(\theta), but no physical operation occurs on the hardware. This means:

  • Zero duration: Virtual Z gates add no time to the circuit execution.
  • Zero error: No physical operation means no gate error.
  • Unlimited precision: The angle θ\theta can be any real number, with precision limited only by the classical control electronics (typically 109\sim 10^{-9} radians).

This makes Rz the ideal choice for parameterized rotations in variational algorithms. On IBM hardware, the native gate set consists of the CX (CNOT) gate, the X\sqrt{X} gate (SX), and the virtual Rz gate. On Google hardware, the native set uses the iSWAP\sqrt{\text{iSWAP}} or Sycamore gate alongside virtual Rz.

Rz in the Clifford+T framework

For fault-tolerant quantum computing, arbitrary-angle Rz rotations must be synthesized from the Clifford+T gate set, because the T gate is the lowest-cost non-Clifford gate that can be implemented fault-tolerantly (via magic state distillation).

The Solovay-Kitaev theorem guarantees that any single-qubit rotation can be approximated to precision ϵ\epsilon using O(logc(1/ϵ))O(\log^c(1/\epsilon)) gates from Clifford+T, where c3.97c \approx 3.97. More efficient synthesis algorithms (Ross-Selinger, gridsynth) achieve this with fewer T gates in practice. For example, approximating Rz(θ)R_z(\theta) to precision 101010^{-10} requires roughly 50 T gates using modern synthesis algorithms.

This is a striking contrast with the NISQ setting, where Rz is “free.” In the fault-tolerant setting, Rz becomes one of the most expensive operations, with each instance requiring dozens of T gates and, consequently, dozens of magic states from the ancilla factory.

Rz in variational algorithms

In VQE, QAOA, and quantum machine learning circuits, Rz gates (along with Rx and Ry) are the parameterized components whose angles are optimized by a classical optimizer. The parameter shift rule allows exact gradient computation for Rz gates:

θψ(θ)Oψ(θ)=12[ψ(θ+π/2)Oψ(θ+π/2)ψ(θπ/2)Oψ(θπ/2)]\frac{\partial}{\partial \theta} \langle \psi(\theta) | O | \psi(\theta) \rangle = \frac{1}{2} \left[ \langle \psi(\theta + \pi/2) | O | \psi(\theta + \pi/2) \rangle - \langle \psi(\theta - \pi/2) | O | \psi(\theta - \pi/2) \rangle \right]

Each gradient evaluation requires two circuit executions with shifted parameters.

Why it matters for learners

The Rz gate illustrates how the same mathematical operation can have vastly different physical costs depending on the execution context. On NISQ hardware, it is free (virtual Z). In fault-tolerant circuits, it is expensive (T gate synthesis). This duality is important for algorithm design: NISQ variational circuits freely use continuous rotations, while fault-tolerant algorithms must carefully minimize the number of non-Clifford rotations. Understanding Rz also builds intuition about the Bloch sphere, the relationship between rotation gates and Pauli gates, and the structure of single-qubit unitaries.

See also