Quantum
Module 3 · Single-qubit gates · Lesson 5

Universal single-qubit gates

Every possible single-qubit gate is a rotation, and every rotation is just three smaller rotations. A short lesson about an important idea.

8 min read · Lesson 12 of 32

You’ve now met almost every single-qubit gate you’ll ever encounter: XX, YY, ZZ, HH, SS, TT, and the continuous rotations RxR_x, RyR_y, RzR_z. One question remains:

Is that all the single-qubit gates?

Or are there more out there we haven’t seen?

The answer turns out to be the most important structural fact about single-qubit operations: every possible single-qubit gate can be written as a sequence of three rotation gates. Not approximately. Exactly (up to an irrelevant global phase).

The decomposition theorem

For any single-qubit unitary UU, there exist three real numbers α\alpha, β\beta, γ\gamma such that:

U=eiδRz(α)Ry(β)Rz(γ)U = e^{i\delta}\, R_z(\alpha)\, R_y(\beta)\, R_z(\gamma)

where eiδe^{i\delta} is some global phase (which you can ignore). This is called the ZZ-YY decomposition, and it’s a theorem that falls out of some fairly direct linear algebra. Three parameters — α\alpha, β\beta, γ\gamma — are exactly enough to describe every possible 2×22 \times 2 unitary matrix, modulo the global phase.

Here’s what it means practically: the set of all possible single-qubit gates is 3-dimensional. Every one of them is reachable by chaining together at most three rotation gates. That’s it. There’s no hidden fourth gate lurking that you can’t decompose.

Some examples

Every gate we’ve seen can be written as a rotation sequence. A few:

The Hadamard is the interesting one — it’s not just a single rotation, it’s a combination. That’s why it feels “special” compared to the other gates we’ve met: it mixes zz-axis and yy-axis rotations, which is what lets it take 0|0\rangle to the equator and back.

Finite vs continuous universality

There are two different notions of “universal” that get used in the quantum computing literature, and they are worth pulling apart:

Continuous universality is what we just described: with the three rotation gates Rx,Ry,RzR_x, R_y, R_z and a way to dial in any real angle, you can implement exactly any single-qubit unitary. This is mathematically clean but physically idealized — no real quantum computer can specify an angle to infinite precision.

Discrete universality is the practical version: starting from a finite set of gates like {H,T}\{H, T\}, you can approximate any single-qubit unitary to arbitrary precision by stringing together enough of them. You can never get it exactly, but you can get as close as you want if you’re willing to use more gates. The Solovay–Kitaev theorem guarantees this works efficiently — approximating a target unitary to precision ϵ\epsilon only needs polylog(1/ϵ)\text{polylog}(1/\epsilon) gates.

Both notions are important. Continuous universality is how we think about algorithms on paper. Discrete universality is how we actually implement them on fault-tolerant hardware, where the finite set {H,S,T,CNOT}\{H, S, T, CNOT\} has become the de facto standard.

Play: reach a target

Here’s a small challenge. Using only the gates below, starting from 0|0\rangle, can you:

  1. Reach the state +|+\rangle? (Easy.)
  2. Reach the state i|i\rangle (the +y+y equator point)? (Medium — you’ll need more than one gate.)
  3. Reach the state i|-i\rangle? (Medium.)
  4. Reach exactly halfway between 0|0\rangle and +|+\rangle? (Harder — think about rotations.)

For the last one, note that you won’t be able to get there with these discrete gates alone. You’d need a smaller rotation than TT provides. In principle, you could build it up from many TTs and HHs — that’s what Solovay–Kitaev is for. In practice, you’d just use Ry(π/4)R_y(\pi/4) directly.

Quick check
How many real parameters are needed to specify a general single-qubit unitary (ignoring global phase)?
Quick check
What is the minimum universal gate set for single-qubit operations that only uses discrete gates?
Quick check
Can you write H as a single rotation gate R_x(θ), R_y(θ), or R_z(θ)?

What’s next

You’ve completed Module 3. You now know everything there is to know about single-qubit gates — the discrete ones, the continuous ones, how they decompose, and what “universal” means. In Module 4 we add a second qubit. That’s where the story gets genuinely strange: you’ll meet tensor products, entanglement, and the first genuinely non-classical protocol — all starting from a gate you’ve already met (and one you haven’t).

Take a breath. The foundations are done.