Rotation gate

Also known as: Rx gate · Ry gate · Rz gate

On this page 7

A rotation gate is a single-qubit gate that rotates the state of a qubit by a continuous angle θ about one axis of the Bloch sphere. In quantum computing, the three standard members are the Rx gate, the Ry gate and the Rz gate, defined as R(θ) = exp(−iθP/2), where P is the Pauli X, Y or Z operator. Because the angle can take any real value, rotation gates are the tunable building blocks of quantum gates & circuits, from textbook state preparation to variational algorithms.

Rotation gates generalize the fixed Pauli gates, the phase gate and the T gate: each of those is a rotation by a specific angle, up to a global phase. Any single-qubit unitary can be written as a product of three rotations, which is why compilers and hardware vendors describe their native operations in rotation language.

How a rotation gate acts on a qubit

A rotation gate moves the Bloch vector of a pure state along a circle around the chosen axis, and the arc length equals the angle θ. The matrix follows from the identity exp(−iθP/2) = cos(θ/2)·I − i·sin(θ/2)·P, which holds because every Pauli matrix squares to the identity. The half angle θ/2 in the matrix is not a mistake: a rotation of the Bloch vector by θ corresponds to a change of θ/2 in the amplitudes, a consequence of the double cover of SO(3) by SU(2).

The table below lists the three standard rotations, their matrices in compact form and their effect on the computational basis.

GateMatrix formEffect on the Bloch sphere
Rx(θ)[[cos θ/2, −i sin θ/2], [−i sin θ/2, cos θ/2]]Rotates about the x axis, mixes |0⟩ and |1⟩ with complex weights
Ry(θ)[[cos θ/2, −sin θ/2], [sin θ/2, cos θ/2]]Rotates about the y axis, real amplitudes only
Rz(θ)[[e^(−iθ/2), 0], [0, e^(iθ/2)]]Rotates about the z axis, changes only the relative phase
The three standard rotation gates

Two properties follow directly from the definition. Rotations about the same axis compose additively, so Rz(α)·Rz(β) = Rz(α + β), and the inverse of any rotation is the same rotation with −θ. Rotations about different axes do not commute, which is the source of their expressive power.

Special angles and their named gates

Many familiar gates are rotations at fixed angles, differing from the rotation matrix only by a global phase that has no observable effect. Recognizing these identities helps when reading compiled circuits, because a transpiler often replaces a named gate with its rotation equivalent.

Named gateRotation equivalentNotes
Pauli XRx(π)Equal up to a global phase of −i
Pauli ZRz(π)Equal up to a global phase of −i
Phase gate SRz(π/2)Quarter turn about z
T gateRz(π/4)Eighth turn about z, a non-Clifford gate
Hadamard gateRy(π/2) followed by Rz(π)Equal up to a global phase
Square root of XRx(π/2)Native on many superconducting devices
Named gates expressed as rotations

Only rotations by multiples of π/2 belong to the Clifford group. A generic angle such as θ = 0.37 rad lies outside it, which places arbitrary rotations beyond the reach of efficient classical simulation under the Gottesman–Knill theorem.

Euler decomposition and universality

Every single-qubit unitary U can be written as U = e^(iα)·Rz(β)·Ry(γ)·Rz(δ), the ZYZ Euler decomposition. Any two non-parallel axes suffice, so ZXZ and XYX forms are equally valid. This result means that a device offering rotations about two axes, together with one entangling two-qubit gate such as the CNOT gate, forms a universal gate set.

Hardware platforms implement rotations through different physical mechanisms, and the table summarizes the typical approach on each.

PlatformRx and Ry implementationRz implementation
Superconducting qubitsShaped microwave pulses, about 20-50 nsVirtual Z by frame change, zero duration
Trapped ionsLaser or microwave Rabi pulses, microsecondsPhase tracking in software or AC Stark shift
Neutral atomsGlobal or addressed Raman pulsesLight shifts or frame updates
Spin qubitsElectric dipole spin resonance pulsesFrame change or g-factor tuning
How hardware platforms realize rotations

The virtual Z gate deserves attention: on most superconducting and many ion systems, Rz is implemented by shifting the phase reference of all later pulses. It therefore takes no time and adds essentially no error, which is why compilers push as much of a circuit as possible into Z rotations.

Rotation gates in parameterized circuits

Rotation gates are the trainable parameters of a parameterized quantum circuit. In variational algorithms such as VQE and QAOA, a classical optimizer adjusts the angles to minimize a cost function measured on the quantum device. The common hardware-efficient ansatz alternates layers of Ry and Rz rotations with entangling layers.

Gradients with respect to a rotation angle can be measured exactly with the parameter-shift rule: the derivative equals half the difference between the circuit evaluated at θ + π/2 and θ − π/2. This rule works because the generator P/2 has two eigenvalues separated by one, and it avoids the bias of finite differences on noisy hardware.

  • Ry rotations prepare real-amplitude states and are the usual choice for encoding classical data as angles.
  • Rz rotations encode phases and appear in Trotterized time evolution of Hamiltonians.
  • Controlled rotations such as CRy(θ) let one qubit steer the angle applied to another and appear in amplitude encoding and the quantum Fourier transform.

Precision, synthesis and common errors

On noisy physical hardware an arbitrary rotation is cheap, but in fault-tolerant quantum computing it is expensive. Surface code architectures implement Clifford gates natively and must approximate an arbitrary Rz(θ) with a sequence of H and T gates. The Solovay–Kitaev theorem guarantees such sequences exist, and optimal methods such as gridsynth need roughly 3·log2(1/ε) T gates for precision ε, so a rotation accurate to 10⁻¹⁰ costs about 100 T gates.

Practitioners meet a recurring set of mistakes when working with rotations, summarized below.

SymptomLikely causeRemedy
Results off by a factor of twoAngle convention confused, θ versus θ/2Check the library definition of the matrix
Systematic over-rotationPulse amplitude miscalibrationRecalibrate with repeated-gate amplification sequences
Unexpected phase in resultsGlobal phase treated as relative inside a controlled gateTrack phases when adding controls
Huge T count after compilationArbitrary angles in a fault-tolerant targetMerge rotations or restrict angles
Frequent rotation gate errors

A subtle point concerns global phase: Rz(θ) and the phase gate P(θ) = diag(1, e^(iθ)) differ only by a global phase when used alone, but they become physically different once a control qubit is added, because the phase turns into a relative one.

A non-technical view

A qubit can be pictured as an arrow pointing somewhere on the surface of a globe. A rotation gate turns that arrow by an exact amount around one of three fixed axes, much like turning a globe on its stand by a chosen number of degrees.

Most quantum operations are just turns of the arrow. Programmers set the angle as a dial, and by combining three turns they can point the arrow anywhere. The key idea is simple: any change to a single qubit can be built from a few well-chosen rotations.

A concrete example

A research team runs a variational eigensolver to estimate the ground-state energy of a small molecule on a 20-qubit superconducting processor. Their ansatz uses four layers of Ry and Rz rotations on six qubits, separated by CNOT layers, which gives 48 adjustable angles.

In each optimization step, the classical optimizer requests gradients through the parameter-shift rule, so the device evaluates each circuit at shifted angles of plus and minus π/2. All Rz rotations compile to virtual frame changes, so only the Ry pulses and CNOT gates contribute errors. After about 200 iterations the angles converge, and the estimated energy lies within a few millihartree of the exact value, a result that depends on careful calibration of each rotation pulse.