Quantum
Module 3 · Single-qubit gates · Lesson 4

Rotation gates: Rx, Ry, Rz

Continuous versions of the Paulis. One axis, one angle, one slider — and every point on the Bloch sphere is reachable.

10 min read · Lesson 11 of 32

Every gate you’ve met so far is a fixed rotation: HH rotates by a specific angle, the Paulis rotate by exactly π\pi, SS and TT rotate by π/2\pi/2 and π/4\pi/4. There’s no dial. You can’t ask for “half a Hadamard” or “a 37-degree X.”

The rotation gates fix that. There are three of them — one for each axis — and each one takes an angle θ\theta as a parameter:

Rx(θ)Ry(θ)Rz(θ)R_x(\theta) \qquad R_y(\theta) \qquad R_z(\theta)

They rotate the Bloch-sphere state by angle θ\theta around the corresponding axis. Change θ\theta, get a different gate.

The formulas

The matrix forms come from exponentiating the Pauli gates:

Rx(θ)=eiθX/2=cos ⁣θ2Iisin ⁣θ2XR_x(\theta) = e^{-i\theta X / 2} = \cos\!\frac{\theta}{2}\,I - i\sin\!\frac{\theta}{2}\,X

Ry(θ)=eiθY/2=cos ⁣θ2Iisin ⁣θ2YR_y(\theta) = e^{-i\theta Y / 2} = \cos\!\frac{\theta}{2}\,I - i\sin\!\frac{\theta}{2}\,Y

Rz(θ)=eiθZ/2=cos ⁣θ2Iisin ⁣θ2ZR_z(\theta) = e^{-i\theta Z / 2} = \cos\!\frac{\theta}{2}\,I - i\sin\!\frac{\theta}{2}\,Z

Don’t let the exponentials intimidate you. Each one is a 2x2 matrix you could compute by hand. For example:

Rx(θ)=(cos(θ/2)isin(θ/2)isin(θ/2)cos(θ/2))R_x(\theta) = \begin{pmatrix} \cos(\theta/2) & -i\sin(\theta/2) \\ -i\sin(\theta/2) & \cos(\theta/2) \end{pmatrix}

The thing you should notice is the θ/2\theta/2 in the formula. That’s the half-angle convention from Lesson 2.2 of the Bloch sphere — rotations on the Bloch sphere are by angle θ\theta, but the corresponding rotation of the state vector (which lives in a different space) is by angle θ/2\theta/2.

So Rx(2π)R_x(2\pi) is a full rotation on the Bloch sphere (the state should come back to where it started) but the matrix formula gives:

Rx(2π)=cos(π)Iisin(π)X=IR_x(2\pi) = \cos(\pi)\, I - i\sin(\pi)\, X = -I

A minus sign! The state vector has picked up a global phase of 1-1, which is invisible (it’s a global phase) but still mathematically real. You have to go around twice — Rx(4π)R_x(4\pi) — to get back to exactly +I+I. This is the famous spin-12\frac{1}{2} spinor property, and it’s responsible for a lot of weirdness in quantum mechanics.

Drag the slider

Things to try:

  1. Pick RxR_x and drag the angle from 00 to π\pi. Watch the state on the Bloch sphere rotate from 0|0\rangle (north pole) smoothly down to 1|1\rangle (south pole), passing through the +y+y equator point at θ=π/2\theta = \pi/2.
  2. Switch to RyR_y and do the same. Same kind of rotation, but now it goes through the +x+x equator point instead.
  3. Switch to RzR_z, starting from 0|0\rangle. Drag the angle. The state stays at 0|0\rangle! Why?
  4. Starting from 0|0\rangle, apply Rx(π/2)R_x(\pi/2). Where does the state end up? What’s the corresponding Cartesian point on the Bloch sphere?
  5. Snap θ\theta to π\pi. The gate is now Rx(π)R_x(\pi), which should equal XX (up to a global phase). Check the state — it’s 1|1\rangle, confirming that Rx(π)XR_x(\pi) \approx X.

The last point is the key realization: the discrete gates you met earlier are all special cases of the rotation gates at specific angles.

The connection to Pauli gates

Rx(π)=iXRy(π)=iYRz(π)=iZR_x(\pi) = -iX \qquad R_y(\pi) = -iY \qquad R_z(\pi) = -iZ

Apart from a global phase of i-i (which doesn’t matter physically), each rotation at angle π\pi is the corresponding Pauli. Similarly:

Rz(π/2)=eiπ/4SRz(π/4)=eiπ/8TR_z(\pi/2) = e^{-i\pi/4}\, S \qquad R_z(\pi/4) = e^{-i\pi/8}\, T

SS and TT are also just RzR_z rotations at smaller angles. Once you have RxR_x, RyR_y, RzR_z as continuous gates, you can recover all the discrete gates as special cases.

Rotation gates are what real hardware runs

On most quantum processors (superconducting, trapped-ion, neutral-atom), you don’t get to just “apply H” or “apply X” directly. The hardware implements gates by pulsing microwaves or lasers at the qubit, and those pulses naturally produce continuous rotations — often RzR_z is “free” (you just relabel your frame) and RxR_x or RyR_y is done with a real pulse.

So when you write circuit.h(q) in Qiskit, the hardware compiler decomposes it into a sequence of rotations and executes those. Rotations are the native language.

Quick check
What is R_x(π) in terms of the Pauli-X gate?
Quick check
Why does R_z(θ) applied to |0⟩ leave the state at |0⟩?
Quick check
Why is there a θ/2 instead of θ in the rotation formulas?

What’s next

You now have continuous control over single-qubit rotations. In the next lesson we’ll see that this is enough to reach every single-qubit state and every single-qubit gate — rotation gates are “universal” for one qubit.