Computing Library › Quantum Logic Gates
Quantum Logic Gates

Controlled-RZ Gate (CRZ)

Imparts a Z-axis phase rotation on the target qubit conditioned on the control, related to but distinct from controlled-phase.

Definition

CRZ(θ) applies RZ(θ) = diag(e^{-iθ/2}, e^{+iθ/2}) to the target when the control is |1⟩. It is diagonal, so it never changes measurement probabilities in the computational basis; it only adjusts relative phases, which matters for interference.

Matrix

Kronos motion — control room
CRZ(θ)
1000010000e^{-iθ/2}0000e^{+iθ/2}

CRZ is symmetric in a subtle way: because it is diagonal, control and target are almost interchangeable, differing only by which single-qubit phases appear. This distinguishes it from the closely related controlled-phase gate CP(λ), which applies a single phase e^{iλ} only to |11⟩.

CRZ versus controlled-phase

CRZ(θ) equals CP(θ) up to single-qubit RZ corrections: CP(θ) = (RZ_control(θ/2) ⊗ RZ_target(θ/2))·CRZ(θ) style relations hold, since both are diagonal. Many compilers convert between them freely. See controlled-phase gate.

python
import numpy as np
def crz(theta):
    m = np.eye(4, dtype=complex)
    m[2,2]=np.exp(-1j*theta/2)
    m[3,3]=np.exp(+1j*theta/2)
    return m

Decomposition

CRZ(θ) = CNOT·(I⊗RZ(-θ/2))·CNOT·(I⊗RZ(θ/2)), mirroring the CRY construction. Diagonal controlled rotations of this form appear throughout quantum phase estimation and the quantum Fourier transform, where each qubit accumulates a conditional phase proportional to a power of two.

Because they are diagonal, chains of CRZ gates commute with one another, which gives compilers freedom to reorder and merge them for shorter circuits.