Back to Curriculum
HST
Circuits & Gates

Universal Gate Sets

Why a handful of gates is enough to build any quantum computation

By the end of this topic you'll be able to

Explain what it means for a gate set to be 'universal'
Name a standard universal gate set used on real hardware
Describe, at a high level, what the Solovay-Kitaev theorem guarantees
HST

There are infinitely many single-qubit unitaries — every point on the Bloch sphere reachable by every possible rotation — and infinitely many multi-qubit unitaries besides. Building hardware able to perform any one of them natively and exactly would be absurd, and no real device attempts it.

Instead, real quantum computers implement a small, fixed gate set natively, and lean on a mathematical guarantee: a set of gates can be universal, meaning any unitary whatsoever can be approximated to any desired precision using only combinations of gates drawn from it.

Binney and Skinner's own construction already gestures at why this is plausible: they show that augmenting their controlled-U operators with just two single-qubit operators — a phase gate and a Hadamard — suffices to simulate any unitary transformation of an n-qubit register. The standard modern set, {H, S, T, CNOT}, is one concrete realization of exactly this idea.

Hadamard and the phase gates supply single-qubit rotations that get arbitrarily close to any point on the Bloch sphere, while CNOT supplies the entangling power a purely single-qubit gate set could never provide. This is why most textbook circuits, and most of this curriculum's own circuit diagrams, are built from exactly this small vocabulary — not because no other gates exist, but because this set is minimal and thoroughly understood.

'Approximated to any desired precision' would be an empty promise without a bound on how many gates that approximation actually costs. The Solovay-Kitaev theorem supplies exactly that bound: approximating an arbitrary single-qubit gate to precision ε requires only O(log^c(1/ε)) gates from a universal set, for some small constant c.

That means the number of gates needed grows only logarithmically as the demanded precision tightens, not explosively — a genuinely efficient trade of precision for circuit length. This efficiency is the entire reason compiling an arbitrary quantum algorithm down to a specific hardware's native gate set is a computationally tractable engineering problem rather than an intractable one.

Try It Yourself

Worked Example

Using only the fact that T² = S and S² = Z (given in Single-Qubit Gates' reference table), confirm directly from the T and S matrices that these identities hold.

  1. 1T = [[1,0],[0,e^{iπ/4}]]. Squaring it only squares the diagonal entries (since it's diagonal): T² = [[1,0],[0,(e^{iπ/4})²]] = [[1,0],[0,e^{iπ/2}]].
  2. 2e^{iπ/2} = cos(π/2) + i·sin(π/2) = 0 + i = i, so T² = [[1,0],[0,i]] — which is exactly the matrix for S.
  3. 3Now square S the same way: S² = [[1,0],[0,i²]] = [[1,0],[0,-1]] — which is exactly the matrix for Z.
  4. 4So T² = S and S² = Z both check out directly from the matrices, and by extension T⁴ = S² = Z and T⁸ = Z² = I — repeated application of the single gate T alone cycles through exactly 8 distinct phases before returning to the identity.
Answer

T² = [[1,0],[0,i]] = S, and S² = [[1,0],[0,-1]] = Z — both confirmed directly by matrix arithmetic, showing how the finer T gate builds up the coarser S and Z gates by repeated squaring.

Reference

Universal gate setAny unitary can be approximated using only these gates
Approximation errorHow close the approximation is to the target unitary
Solovay-Kitaev boundGate count grows only logarithmically with desired precision

Quick Check

What does it mean for a gate set to be 'universal'?

What does the Solovay-Kitaev theorem guarantee?