Rotation Gates
The Pauli gates
X, Y, Z flip a qubit
by a fixed half-turn — they are switches with only an "on". But
on the Bloch sphere
a qubit is just a point, and a point can be rotated by any angle you like. The
rotation gates R_x(\theta),
R_y(\theta), R_z(\theta) are exactly that: the
continuous, dial-a-value single-qubit gates. Each one spins the Bloch vector through
an angle \theta about one of the three axes, and the Paulis fall out as the
special case \theta = \pi — a full half-turn.
One formula, three axes
Every rotation gate is generated by exponentiating the corresponding Pauli. For a unit axis
\hat{n} with Pauli vector
\vec{\sigma} = (X, Y, Z),
R_{\hat n}(\theta) = e^{-i\,\theta\,(\hat n\cdot\vec\sigma)/2},
and this rotates the Bloch vector by angle \theta about
\hat n. Note the half-angle
\theta/2 sitting in the exponent — the same spin-½ bookkeeping that put a
\theta/2 in the Bloch-sphere form of a state. Writing out the three axis
gates as 2\times2 matrices:
R_x(\theta) = \begin{pmatrix} \cos\tfrac{\theta}{2} & -i\sin\tfrac{\theta}{2} \\[2pt] -i\sin\tfrac{\theta}{2} & \cos\tfrac{\theta}{2} \end{pmatrix},\quad
R_y(\theta) = \begin{pmatrix} \cos\tfrac{\theta}{2} & -\sin\tfrac{\theta}{2} \\[2pt] \sin\tfrac{\theta}{2} & \cos\tfrac{\theta}{2} \end{pmatrix},\quad
R_z(\theta) = \begin{pmatrix} e^{-i\theta/2} & 0 \\[2pt] 0 & e^{i\theta/2} \end{pmatrix}.
R_y is the friendly one — its entries are real, so it
just tilts the state in the plane. R_x carries the imaginary
-i off the diagonal, and R_z is
diagonal: it only ever changes phases, never the |0\rangle
vs. |1\rangle probabilities.
Watch a rotation happen
Here is the x–z great circle of the Bloch sphere.
The state starts at |0\rangle (top) and
R_y(\theta) swings it through the full angle
\theta toward |+\rangle and on to
|1\rangle. Drag the dial and watch the amplitudes: at
90^\circ you land on the equator at
|+\rangle, and it takes a full 180^\circ on the
sphere to reach |1\rangle — even though the amplitude
\sin\tfrac{\theta}{2} only ran up to a quarter turn.
Because the Bloch angle is the full \theta while the amplitudes
move by \theta/2, one lap of the sphere
(\theta = 2\pi) sends the state to -|0\rangle, not
back to |0\rangle. More on that surprise below.
Worked example 1: R_x(\pi) is X
Set \theta = \pi. Then
\cos\tfrac{\pi}{2} = 0 and
\sin\tfrac{\pi}{2} = 1, so
R_x(\pi) = \begin{pmatrix} 0 & -i \\ -i & 0 \end{pmatrix} = -i\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = -i\,X.
The rotation gate equals the Pauli X up to the overall factor
-i. That factor is a global phase — unobservable — so
R_x(\pi) and X are the same physical operation.
The same holds for every Pauli: R_y(\pi) \propto Y and
R_z(\pi) \propto Z. The Paulis are simply the \theta = \pi
rotations.
Worked example 2: R_z(\theta) adds a relative phase
Apply R_z(\theta) to a general state:
R_z(\theta)\big(\alpha|0\rangle + \beta|1\rangle\big) = e^{-i\theta/2}\alpha|0\rangle + e^{i\theta/2}\beta|1\rangle = e^{-i\theta/2}\Big(\alpha|0\rangle + e^{i\theta}\beta|1\rangle\Big).
Pulling out the global phase e^{-i\theta/2} leaves a clean statement:
R_z(\theta) inserts the relative phase
e^{i\theta} between |0\rangle and
|1\rangle — a rotation of the longitude
\varphi on the Bloch sphere, leaving the probabilities untouched. Choosing
\theta = \tfrac{\pi}{2} gives
R_z(\tfrac{\pi}{2}) = e^{-i\pi/4}\,\mathrm{diag}(1, i) = e^{-i\pi/4} S, so the
phase gate S is R_z(\tfrac{\pi}{2}) up to global
phase.
Worked example 3: R_y(\tfrac{\pi}{2}) makes |+\rangle
With \theta = \tfrac{\pi}{2} the half-angle is
45^\circ, so
\cos 45^\circ = \sin 45^\circ = \tfrac{1}{\sqrt2} and
R_y(\tfrac{\pi}{2})\,|0\rangle = \frac{1}{\sqrt2}\begin{pmatrix} 1 & -1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 1 \\ 0 \end{pmatrix} = \frac{1}{\sqrt2}\begin{pmatrix} 1 \\ 1 \end{pmatrix} = \frac{|0\rangle + |1\rangle}{\sqrt2} = |+\rangle.
A quarter turn about y drives |0\rangle from the
north pole down to |+\rangle on the equator — a real-valued, phase-free way
to build an equal superposition (like a "half-Hadamard" with no extra phases).
Rotations are a complete toolkit
Since a single-qubit gate is a unitary and every single-qubit unitary is a rotation
of the Bloch sphere, three rotations are all you ever need. The Euler decomposition
writes any single-qubit unitary U as
U = e^{i\delta}\,R_z(\alpha)\,R_y(\beta)\,R_z(\gamma)
for some angles \alpha, \beta, \gamma and a global phase
e^{i\delta}. So R_y and
R_z alone generate every one-qubit operation, up to a phase you
cannot see.
- R_{\hat n}(\theta) = e^{-i\theta(\hat n\cdot\vec\sigma)/2} rotates the
Bloch vector by \theta about axis \hat n;
- the exponent carries the half-angle \theta/2 (spin-½ bookkeeping);
- R_z(\theta) adds the relative phase e^{i\theta}; R_y(\theta) is real-valued;
- the Paulis are the \theta = \pi case: R_x(\pi)\propto X, etc.;
- every single-qubit unitary is a Bloch rotation — U = e^{i\delta}R_z(\alpha)R_y(\beta)R_z(\gamma).
On a real machine you never "apply an X" as an abstract flip — you fire a
precisely timed and shaped control pulse (a microwave burst on a superconducting qubit, a laser pulse
on a trapped ion), and the qubit rotates by an angle set by the pulse's area. A
longer or stronger pulse is a bigger \theta. That is why
R_x, R_y, R_z are the
native gates: the discrete gates in a circuit diagram are compiled down into these continuous
rotations, which are what the control electronics actually know how to do.
You might expect a full 360^\circ rotation to do nothing. It doesn't. Put
\theta = 2\pi into R_z:
\mathrm{diag}(e^{-i\pi}, e^{i\pi}) = \mathrm{diag}(-1, -1) = -I. A
360^\circ turn flips the sign of the whole state — a
global phase of -1, harmless on its own but very real if this qubit is one
arm of an interference or an entangled pair. To truly return to
+I you must rotate through 4\pi
(720^\circ). Blame the \theta/2: half of
4\pi is 2\pi, the first angle at which
e^{\pm i\theta/2} is genuinely back to 1.