Logical Gate Implementation
Operating on encoded qubits without decoding them requires gate methods that keep errors correctable, from transversal gates to surgery and injection.
Gates on encoded data
A fault-tolerant machine never decodes a logical qubit to operate on it, because decoding would expose the fragile bare state. Instead it applies logical gates directly to the encoded qubits in ways that do not let a single fault spread into an uncorrectable error. Different gates in the universal set are implemented by different techniques.
The toolbox
Transversal gates, applied qubit-by-qubit, are the cleanest and cover part of the Clifford group for most codes. Lattice surgery and code deformation move and entangle logical patches to realize CNOT and measurements on planar hardware. Magic-state injection supplies the non-Clifford T gate that no efficient transversal method provides in the surface code.
- Transversal: physical gate on each qubit, cannot spread errors within a block.
- Lattice surgery: merge and split patches to measure joint logical operators.
- Code deformation: reshape the code to move logical operators around.
- Magic-state injection: teleport in a distilled state to apply T.
The Eastin-Knill theorem guarantees no single code can implement a universal set transversally, so every real scheme mixes methods. The surface code, for instance, gets Clifford gates from surgery and the T gate from injected magic states, while color codes can get more gates transversally at other costs.
Gate cost is dominated by the non-Clifford gate. Clifford operations are comparatively cheap; the T gate requires distilled magic states, and the number of T gates, the T-count, is the standard measure of an algorithm's fault-tolerant cost. Compilers therefore work hard to minimize T-count, since it directly sets how much distillation the machine must perform.