Quantum Computing · Part A — 01

From Gates to Circuits

There are infinitely many possible quantum operations — yet a real machine ships with only a handful of gates. The miracle that makes computing possible: a tiny, fixed set of gates can build any operation at all, to any accuracy you like. That property is called universality.

↩ before you start · keep these handy
·From QI Ch. 5: a gate is a unitary 2×2 matrix — a reversible rotation of the Bloch arrow.
·From QI 8a: a circuit is wires (qubits) read left to right, gates as boxes; matrices stack right→left.
·From QI Ch. 4: every single-qubit state is a point on the Bloch sphere.
🔑 symbol decoder · every new mark, in plain words
universal seta small list of gates from which every circuit can be built (exactly, or as close as you want). Tthe “π/8” gate — a 45° phase turn about z. Its angle doesn’t divide the circle evenly, which is exactly why it unlocks everything. Cliffordthe gates H, S and CNOT. Powerful but not universal alone — on their own they reach only a finite set of states. Rṓ, Rẑa rotation by some angle about the z- or y-axis. Any single-qubit gate is three of these in a row. ε (epsilon)a target accuracy — “get within ε” means as close as you please, e.g. 0.001. densea set of points so finely sprinkled that one sits within ε of every spot on the sphere.
feel

A few bricks build any shape

You don’t need a custom Lego piece for every model — a few standard bricks, snapped together enough times, approximate any shape. Quantum gates are the same. The hardware engineer perfects just a few gates; the algorithm designer then snaps copies of them together to realize whatever giant unitary the algorithm calls for. No new hardware per algorithm — just longer recipes.

🧩 everyday picture

An alphabet has 26 letters, yet it spells every word that exists and every word that ever will. The letters are universal for English. A universal gate set is the alphabet of computation: finite, fixed, and able to spell any operation — some short, some very long, but all reachable. The T gate is the awkward letter that, by refusing to line up neatly, lets you spell the words the tidy letters never could.

recapA fixed, finite gate set can build any operation — universality is the alphabet of computing.
play

Watch a gate set fill the sphere

Start at |0⟩ and apply every possible recipe up to a chosen length, plotting where each one lands on a slice of the Bloch sphere. With the Clifford set the dots snap to a frozen handful of spots. Switch to the universal set and the same lengths sprinkle the whole circle — that sprinkle is universality, made visible.

▸ reachability mapstart = |0⟩ · x–z plane
|0⟩ |1⟩ |+⟩ |−⟩
recipe length ≤ {{ maxLen }}
distinct states reached
{{ count }}
{{ verdict }}
recapClifford gates freeze on a finite lattice; adding the off-grid T gate sprinkles the whole sphere.
math

Two layers of decomposition

Universality is proved in two steps. First, any single-qubit gate is just three axis-rotations stacked — an “Euler” decomposition:

U = Rṓ(γ) · Rẑ(β) · Rṓ(α)

Second, any operation on many qubits breaks into single-qubit gates plus CNOTs. So the exactly-universal set is simply:

{ all single-qubit gates }  +  CNOT

Real hardware can’t store a continuous dial of angles, so it keeps a finite set like {H, T, CNOT} and approximates every angle. The Solovay–Kitaev theorem promises this is cheap: reaching accuracy ε needs only about logᳬ(1/ε) gates — the recipe grows gently as you demand more precision.

✎ worked example · why T escapes the Clifford grid
1.S is a 90° z-turn: applying it 4 times = 360° = back to start. A closed, finite cycle.
2.T is a 45° z-turn, and 45° = π/4. Note T·T = S, so T is “half” of S.
3.Interleave T with H (which tips z toward x) and the turns never close back on themselves —
4.so the reachable points keep multiplying without repeating: dense coverage. That is universality. ✓
recapSingle-qubit gates = three rotations; everything = single-qubit + CNOT; finite sets approximate cheaply (Solovay–Kitaev).
⚠ common misconceptions

“A universal set can make any unitary exactly.” Only an infinite set (all single-qubit gates + CNOT) is exactly universal. A finite set like {H, T, CNOT} approximates any unitary — arbitrarily well, but in general never spot-on.

“More gates in the set = more powerful.” Past universality, extra gates add convenience, not power — they may shorten recipes, but they can’t reach anything a universal set couldn’t already approximate.

“Clifford gates are useless because they aren’t universal.” Far from it — they are the backbone of error correction (Part D) and are even efficiently simulatable on a laptop. The single T gate is what tips the whole thing into hard, classically-intractable territory.

✓ you can now
say what a universal gate set is, and why a finite one only approximates
explain why {H, S} freezes but {H, T} fills the sphere densely
state the two-layer decomposition: Euler rotations, then single-qubit + CNOT
quote Solovay–Kitaev: accuracy ε costs only ~logᳬ(1/ε) gates
← Quantum Computing home next · 02 Multi-Qubit Gates