Gates & circuits

universal gate set

Think about how, in ordinary digital electronics, you don't need a different piece of hardware for every possible logical operation. A handful of basic gates — AND, OR, NOT, or even just NAND on its own — can be wired together to compute any function at all. A universal gate set in quantum computing is the same idea, one layer up: it's a small collection of quantum gates from which you can build any quantum computation you want, just by applying them in the right sequence.

One common universal set is {H, T, CNOT} — the Hadamard gate, the T gate, and the controlled-NOT. With only these three, you can approximate any quantum operation you need. The word approximate matters and is not a weakness: quantum gates rotate states by continuous angles, so a finite toolbox can't hit every possible operation exactly. Instead, you compose these gates to land as close to the target as you like, and a result called the Solovay-Kitaev theorem promises you can get there efficiently, without needing an absurd number of gates for each extra digit of precision.

So when engineers design a quantum processor, they don't try to build hardware for thousands of distinct operations. They build a few high-quality gates that together are universal, then express every algorithm as a sequence drawn from that set — much like a compiler turning your code into a stream of a few machine instructions. Which exact gates are chosen depends on the hardware, but the promise of universality is the same: nothing computable on a quantum computer is left out of reach.

Universal means any quantum operation can be built from the set — it says nothing about speed; most problems get no quantum speedup, and the gains that exist range from quadratic (Grover) to exponential only for specific structured problems like Shor's factoring.

Also called
universal set of quantum gates