Color Codes
Colour a honeycomb so that no two touching hexagons share a colour, drop a qubit on every corner, and hang two check operators on each hexagon — one built from Pauli , one from Pauli , both on the very same six qubits. That single design choice is the whole of the color code, and it buys something the surface code cannot have. Because and live on identical supports, the entire lattice is symmetric under exchanging : apply a Hadamard to every qubit and the stabilizer group maps to itself, so a transversal Hadamard is a logical Hadamard. Add a checkerboard of phase gates and a bitwise CNOT between two blocks and the complete two-dimensional Clifford group becomes transversal — cheap, local, fault-tolerant logic with no lattice surgery and no code deformation. The price is paid in two currencies. The stabilizers are heavier (weight-six hexagons versus the surface code's weight-four checks), and the syndromes are stranger: excitations carry a colour charge obeying the fusion rule red × green = blue, so a single error lights three differently-coloured plaquettes at once and cannot be decoded by naïvely pairing defects. Underneath, a fixed local Clifford circuit reveals that a 2D color code is nothing but two copies of the toric code in disguise, which fixes its parameters ( logical qubits on a genus- surface) and its optimal threshold (about 10.9%) while preserving the transversal-gate advantage. Introduced by Héctor Bombín and Miguel Ángel Martín-Delgado in 2006, color codes now sit at the centre of fault-tolerant architecture, and in 2024 they graduated from the blackboard to real trapped-ion and superconducting processors.
- A color code is a topological CSS stabilizer code on a three-colorable, trivalent tiling: qubits sit on vertices, and every face carries both and on the same qubits.
- Three-colorability plus trivalency forces any two faces to overlap on an even number of qubits, so automatically — the CSS commutation condition is built into the geometry.
- Because and share support, bitwise Hadamard swaps the stabilizers among themselves: the 2D color code implements the whole Clifford group (, , CNOT) transversally, which the surface code cannot.
- A local Clifford circuit maps the 2D color code onto two decoupled copies of the toric code; this duality fixes logical qubits on a genus- surface (twice the toric code) and an optimal code-capacity threshold near 10.9%.
- Excitations carry a conserved colour charge with fusion red × green = blue, so a single error creates a colour-neutral triple of defects and decoding cannot reduce to independent minimum-weight matching.
- In 3D the construction gains a transversal non-Clifford gate ( or ) and single-shot error correction, and combining 2D and 3D blocks (dimension jump) reaches universality without magic-state distillation.
- Key idea: put a qubit on every vertex of a three-colorable trivalent lattice and assign both and to each face; three-colorability guarantees CSS commutation, and the / symmetry on identical supports buys transversal Hadamard and phase gates — the entire 2D Clifford group — at the cost of weight-six stabilizers and colour-charged, harder-to-decode syndromes.
Where this lives today
For most of two decades the color code was prized on paper — cheaper Cliffords, richer structure — but held back in the lab by its weight-six checks and awkward decoding. That changed in 2024. Google Quantum AI ran color-code logical qubits on a superconducting processor, operating distance-3 and distance-5 codes and demonstrating transversal logical Clifford gates directly, the exact advantage the code was designed for. On the trapped-ion side, Quantinuum's processors have realized the Steane color code with real-time syndrome extraction and fault-tolerant logic, exploiting all-to-all connectivity to measure the weight-4 checks cleanly. The decoding bottleneck that long defined the code is now an active engineering frontier: the restriction and projection decoders, union-find, the Möbius matching approach, and neural-network decoders all confront the colour-charge fusion structure head-on, and the search for an efficient decoder that approaches the ~10.9% optimal threshold is one of the open problems in the field. In 3D, the single-shot property — correcting errors from a single noisy round of syndrome extraction, without the surface code's repeated measurements — keeps color codes central to proposals that aim to cut the time overhead of fault tolerance. The through-line is transversality: whenever a logical algorithm is Clifford-heavy, the color code's cheap and turn a multi-cycle surface-code operation into a single layer of local gates.
The physical picture
Start from the honeycomb. Colour each hexagon red, green, or blue so that neighbours never match, and place one qubit at every vertex. To each hexagon attach two operators on its six qubits, and . Two touching hexagons share exactly one edge — two qubits — so an -type check and a -type check overlap on an even number of qubits and commute even though and anticommute pointwise. Three-colorability is precisely the bookkeeping that keeps every overlap even: same-coloured faces never touch (overlap zero), and different-coloured faces meet along whole shared edges (overlap two, four, …). The first figure makes the two structural facts one picture — even overlap, and three colours meeting at every vertex.
Because and sit on identical qubits, the lattice looks unchanged under swapping . A bitwise Hadamard performs exactly that swap, so it maps the stabilizer group to itself and permutes the logical operators as — a transversal Hadamard is a logical Hadamard. The surface code cannot do this: its (star) and (plaquette) checks live on different geometric objects, so bitwise does not preserve its stabilizer. That single asymmetry is the whole difference in Clifford cost between the two code families. The smallest instance of the whole story — seven qubits, three colours, distance three — is the famous Steane code, and the second figure shows it doing everything at once.
The core equations
The code is defined by attaching two Pauli operators to every face of the tiling. Physical qubits sit at the vertices, and the stabilizer group is generated by all of these face operators at once.
where: — the set of faces (plaquettes) of the three-colorable trivalent lattice; — the vertices (qubits) on the boundary of face ; — Pauli and on the qubit at vertex ; — the abelian stabilizer group whose eigenspace is the code space. Read it as: each face carries both a bit-parity check and a phase-parity check , supported on identical qubits — the structural fingerprint that separates color codes from every other topological code. For this to be a legitimate CSS stabilizer group, all generators must commute. The pointwise anticommutation of and means an -face and a -face commute exactly when they share an even number of qubits, and the geometry guarantees it.
where: — the number of qubits (vertices) shared by faces and . Reading: two different-coloured faces meet along complete shared edges, each contributing two qubits; two same-coloured faces never touch, contributing zero. Every overlap is a sum of even pieces, so and the checks commute — the derivation below makes this exact. Counting independent generators against the number of qubits gives the code's headline parameters. On a closed surface the Euler characteristic ties the logical count directly to the topology.
where: — physical qubits (= number of vertices ); — logical qubits; — number of independent stabilizer generators; — genus of the closed surface; — a logical string operator in the normalizer but outside the stabilizer; — its weight (support size); — code distance. Reading: a genus- color code encodes logical qubits, exactly twice the toric code's , and the distance is the length of the shortest non-contractible coloured string. The defining payoff is transversal Clifford logic. Bitwise Hadamard exchanges and ; a checkerboard of phase gates fixes the stabilizer; and a bitwise CNOT couples two blocks — together the full 2D Clifford group.
where: — Hadamard on qubit , with , ; — phase gate or its inverse, assigned by a two-colouring of the (bipartite) vertices, with ; the CNOT runs qubit-by-qubit between two identical blocks. Reading: every Clifford generator is a depth-one pattern of single- or two-qubit gates — no lattice surgery, no code deformation, and automatically fault-tolerant because each gate touches one qubit per block. Errors are excitations on the violated faces, and in a color code each excitation carries a colour label obeying a fusion rule. A single-qubit Pauli lights the three differently-coloured faces meeting at its vertex, so the created charge is colour-neutral.
where: — red, green, blue excitation charges on violated faces; — the vacuum. Reading: defects are never produced in same-coloured pairs, so pairing like colours is the wrong decoding move — a correct decoder must respect the three-colour fusion algebra or first map to two surface codes. That mapping is the deep structural fact: a fixed finite-depth local Clifford circuit turns one 2D color code into two independent toric codes.
where: — a locally generated (finite-depth) Clifford unitary. Reading: everything known about surface-code thresholds, string tension, and logical failure transfers to the color code, which explains (two copies of ) and the shared optimal threshold — while the colour dressing keeps the Cliffords transversal.
The goal is to prove that a color code on a closed genus- surface encodes exactly logical qubits, using nothing but the combinatorics of a trivalent three-colored tiling and the Euler characteristic. We will count vertices, edges and faces, count the raw stabilizer generators, subtract the dependencies that three-colorability forces among them, and watch the vertex count cancel to leave a purely topological answer — twice the toric code, the first quantitative signature of the two-copy duality.
Step 1. Use trivalency. Each vertex meets exactly three edges and each edge has two endpoints, so summing degrees gives , hence . Here is the number of physical qubits. Why: trivalency is one of the two defining lattice conditions, and it pins the edge count to the qubit count before topology enters.
Step 2. Impose the Euler characteristic of the closed surface, , with the number of faces and the genus. Why: this is the only place the global topology of the surface enters the count — everything else is local.
Step 3. Solve for the face count. Substituting gives . Why: we need because each face contributes stabilizer generators, so the logical count will be an expression in and .
Step 4. Count generators and their dependencies. Each face gives one and one , so there are raw generators. But three-colorability forces relations: because each vertex lies on exactly one face of each colour, the product of all red -faces equals the product of all green -faces equals the product of all blue -faces (each equals ). That is two independent -type relations, and by the same argument two -type relations, so . Why: the colour classes each cover every qubit exactly once, which is precisely why the colour-summed products coincide and drain four generators from the count.
Step 5. Assemble. With and ,
The -terms cancel identically, leaving . Why: the cancellation is the statement that logical information is topological, not local — adding qubits by refining the lattice never changes . *On the torus this gives , exactly two toric codes (); a concrete hexagonal torus with has , , , and , confirming the formula.*
Go deeper · Derivation B · 1 minWhy transversal Hadamard is a logical Hadamard
The goal is to show that applying a Hadamard to every physical qubit implements a logical Hadamard on the encoded information, and to make explicit that this works only because and share support — the property no surface code has. We conjugate a single face operator, then the whole group, then the logical operators, and see the symmetry of the lattice reappear as at the logical level. The same symmetry argument, extended, is what makes the entire 2D Clifford group transversal.
Step 1. Recall the single-qubit action and : Hadamard swaps and on each qubit. Why: this pointwise swap is the seed; everything follows from lifting it to the whole block.
Step 2. Conjugate a face operator. Since acts qubit-by-qubit and is a product of over the face,
Why: because and occupy the same vertices, the swap sends the genuine stabilizer to the genuine stabilizer — a surface-code -star would instead land on a non-stabilizer, which is exactly why the trick fails there.
Step 3. Conclude for the group. Every and every , so : the code space is preserved. Why: a physical operation that fixes the stabilizer group is a valid logical operation, since it maps the code space to itself.
Step 4. Read the logical action. On the normalizer, swaps the logical strings , which is precisely the logical Hadamard. Combined with the checkerboard phase gate (whose signs cancel on every even-weight face) and the bitwise between two blocks, the full Clifford group is transversal. Why: and generate all single-qubit Cliffords and CNOT adds entangling power, so these three transversal gates close the 2D Clifford group. *The conjugation relations , , and hold by direct matrix computation; the even weight of every face is what makes the phase-gate signs cancel.*
Go deeper · Derivation C · 2 minEven overlap and the colour charge of a single error
The goal is to prove that a single-qubit error violates exactly the three -faces meeting at its vertex — one of each colour — so that the created excitation is colour-neutral, , and to draw the decoding consequence that separates color codes from the surface code. We use trivalency to fix how many faces a vertex touches, anticommutation to identify which stabilizers flag the error, and three-colorability to assign the colours.
Step 1. Fix the local geometry. On a trivalent three-colored tiling, each vertex lies on exactly three faces, and those three carry the three distinct colours — if two shared a colour they would be adjacent, contradicting the colouring. Why: this is the local content of the two lattice conditions, and it dictates that a vertex error touches three, not two or four, faces.
Step 2. Apply anticommutation. A -face flags an error iff the error anticommutes with it: . So anticommutes with exactly the three -faces containing , and commutes with all others. Why: the syndrome is nothing but the list of anticommuting stabilizers, and here it is a triple, not a pair.
Step 3. Read the colour charge. The three lit faces are one red, one green, one blue, so the total colour charge is : the excitation is colour-neutral, a global constraint every valid syndrome must satisfy. Why: charge neutrality is conserved by every subsequent error, so it is the algebraic backbone a correct decoder must respect.
Step 4. Draw the decoding consequence. Unlike surface-code defects, which come in matchable pairs, color-code defects come in colour-balanced clusters; pairing like colours cannot reproduce the true error. Decoders must respect the fusion rule directly (restriction and projection decoders) or first map to two surface codes and match there. Why: this is the origin of the color code's harder decoding problem — its central practical trade-off against the surface code. *The triple-defect structure is consistent with toric-code anyon fusion after the two-copy mapping of equation (6); the colour charge is conserved modulo the fusion algebra.*
Limiting cases
Color codes are best understood by the regimes they interpolate between and the familiar codes they contrast with.
| Case | Result | Meaning |
|---|---|---|
| 2D color code | transversal | Full Clifford group is transversal; by Eastin–Knill no transversal non-Clifford exists, so still needs magic states or code switching. |
| 3D color code | or transversal | A transversal non-Clifford appears, but transversal is lost; combining 2D and 3D blocks (dimension jump) restores universality. |
| Genus- closed surface | Encodes logical qubits, twice the toric code's — the two-copy duality made quantitative. | |
| Smallest instance | Steane code | A distance-3 triangle: 7 qubits, three weight-4 faces, transversal Clifford — the color code you can hold in your head. |
| Code-capacity threshold | Optimal (statistical-mechanics-mapped) threshold under independent bit/phase noise, matching the toric code; practical decoders achieve less. |
Worked examples
1 · The 7,1,3 triangular color code, worked end to end
Take the smallest 2D color code: a triangle with a qubit at each of three corners, three edge-midpoints, and the centroid — seven qubits — carved into three weight-4 faces coloured red, green, blue. Count the code parameters, locate a logical operator, and verify the transversal Clifford claim.
Step 1. Count qubits and checks. There are vertices. Each of the three faces contributes one -check and one -check, all weight 4, giving 6 generators. They commute: any -face and any -face share either 0 or 2 qubits (two faces meet along a shared edge of two qubits), an even overlap. 6 independent generators on 7 qubits.
Step 2. Count logical qubits. The generators are independent, so and . One logical qubit is encoded, and the code space has dimension . k = 1.
Step 3. Find the distance. A logical operator must commute with all six checks yet lie outside . The lightest such operators are weight-3 strings running along a coloured boundary of the triangle — for instance an on the three qubits of one edge. No weight-1 or weight-2 Pauli commutes with every check, so and : one arbitrary single-qubit error is correctable. d = 3, corrects t = 1.
Step 4. Verify the colour syndrome. An on the central qubit (which lies on all three faces) anticommutes with all three -faces, lighting a red, green and blue defect: colour charge , colour-neutral as required. Central X error → three colour-balanced defects.
Step 5. Verify transversal Clifford. Since every face carries and on the same qubits, bitwise Hadamard swaps them and acts as logical ; a checkerboard of over the seven (bipartite) qubits acts as logical ; a bitwise CNOT to a second copy acts as logical CNOT. This code is exactly the Steane code, whose transversal Clifford group is textbook. Transversal H, S, CNOT = logical H, S, CNOT — the color code is the Steane code.
2 · Logical qubits on a hexagonal torus (Euler count with numbers)
Wrap the three-colored honeycomb onto a torus so that it has hexagonal faces. How many physical and logical qubits does it carry, and how does that compare with a toric code on the same surface?
Step 1. Get the qubit and edge counts. Nine hexagons with six edges each give edge-incidences; every edge is shared by two faces, so . Trivalency gives , hence physical qubits. n = V = 18, E = 27.
Step 2. Check consistency with topology. On the torus , so the Euler characteristic must vanish: . It does — the tiling is a legitimate closed surface. V − E + F = 0 ✓.
Step 3. Count independent generators. There are raw face generators, minus the four colour-sum dependencies (two -type, two -type), so . 14 independent stabilizers.
Step 4. Read off the logical qubits. , matching the formula . A toric code on the same torus encodes only . k = 4, exactly twice the toric code's 2 — the two-copy duality in a single number.
Physics of the portrait
Color codes are the invention of a specific pair of theorists who asked what would happen if you put both an and a check on every face — and found the whole 2D Clifford group waiting there.
Origins · 1 minHéctor Bombín and how this was discovered
Héctor Bombín, working with his doctoral advisor Miguel Ángel Martín-Delgado at the Universidad Complutense de Madrid, introduced color codes in the 2006 paper "Topological Quantum Distillation" (Phys. Rev. Lett. 97, 180501). Their move was deceptively small: where Kitaev's toric code separated -stars from -plaquettes, Bombín and Martín-Delgado placed both an -check and a -check on every face of a three-colorable trivalent lattice. The consequence was large — the entire two-dimensional Clifford group became transversal, something the surface code cannot achieve, which they developed in "Topological Computation without Braiding" (2007). Bombín went on to build the surrounding theory almost single-handedly: 3D and higher-dimensional color codes with transversal non-Clifford gates, the "gauge color codes" that yield single-shot fault-tolerant error correction (Phys. Rev. X, 2015), the dimension-jump protocol for universality without magic-state distillation, and, with Guillaume Duclos-Cianci and David Poulin, the proof that the 2D color code is locally equivalent to two copies of the toric code. That last result reframed the whole family: color codes are surface codes wearing a coat that makes their Cliffords free. Now a researcher in industrial fault-tolerant architecture, Bombín remains the author whose name attaches to nearly every structural fact a student learns about these codes.
Going further
Texts. Nielsen and Chuang, Quantum Computation and Quantum Information, ch. 10 (stabilizer and CSS codes) · Preskill, Lecture Notes for Physics 219, ch. 7 (quantum error correction, topological codes) · Kitaev, Shen and Vyalyi, Classical and Quantum Computation (stabilizer formalism, toric code) · Watrous, The Theory of Quantum Information (error-correction chapter) · Wilde, Quantum Information Theory, 2nd ed. (CSS and stabilizer codes) · Bombín and Martín-Delgado, "Topological Quantum Distillation," Phys. Rev. Lett. 97, 180501 (2006) · Bombín, "An Introduction to Topological Quantum Codes" (review, 2013). The key relations underlying this article are: the trivalent relation and Euler characteristic , yielding and (with the explicit torus check , , , , ); the CSS commutation from even overlaps via three-colorability; the single-qubit Clifford conjugations , , , , and the CNOT propagation rules; the three-colour syndrome and colour charge from trivalency; and the Steane identification, , . The optimal threshold and the color code = two surface codes duality are results of Bombín and Martín-Delgado (2006) and Bombín, Duclos-Cianci and Poulin (2012). The 2024 hardware demonstrations are the Google Quantum AI superconducting color-code result and Quantinuum trapped-ion Steane-code experiments.
Builds on: CSS Codes · Stabilizer Formalism · Code Distance and Logical Operators · Pauli Group and Clifford Group · Syndrome Measurement and Decoding. Leads to: Syndrome Measurement and Decoding · Quantum Hamming and Singleton Bounds.
Ask the tutor: name any lattice, boundary, or error pattern — a hexagonal torus, the seven-qubit triangle, or a two-qubit error — and I will compute the code parameters, the colour syndrome, and the transversal gates step by step.
Why does three-colorability matter so much — could I use any trivalent lattice?
No. Trivalency alone makes each vertex meet three faces, but it does not guarantee that -checks and -checks commute. Three-colorability is what forces every pair of faces to overlap on an even number of qubits: same-coloured faces never touch (overlap zero), and different-coloured faces meet only along complete shared edges (overlap two, four, …). Even overlap gives , so an -face and a -face commute and the stabilizer group is abelian. Drop the colouring and some faces would overlap on an odd number of qubits, the checks would anticommute, and you would not have a valid CSS code at all. Three-colorability is the geometric encoding of the commutation condition.
In what sense is a color code "the same as" two surface codes?
There is a fixed, finite-depth circuit of local Clifford gates — a locally generated unitary — that maps a 2D color code onto two independent copies of the toric (surface) code. "Same as" means same phase of matter: identical anyon content up to the mapping, identical code-capacity threshold, and a logical-qubit count that is exactly twice the toric code's, which is why rather than . What the mapping does not preserve is geometric locality of the gates in a simple way, so the color code keeps its distinctive transversal Clifford advantage even though its bulk physics is "two surface codes." The duality is a analytical gift: you can import surface-code results wholesale and still enjoy cheaper logic.
Why is color-code decoding harder than surface-code decoding?
In the surface code, a single error creates a pair of defects on a line, and decoding is minimum-weight perfect matching — pair up the defects along shortest paths. In the color code, a single error creates a triple of defects of three different colours (colour charge ), so there is no pair to match. The decoder must instead find a low-weight error consistent with a colour-neutral set of excitations, respecting the fusion rule red × green = blue. Practical strategies either work with the fusion structure directly (restriction decoder, union-find, neural nets) or apply the local Clifford map to two surface codes and match on each copy. All of this is more intricate than a single matching problem, which is the code's principal practical cost.
Why does the 2D color code get transversal H and S but the surface code does not?
Because in the color code every face carries and on the same qubits, the stabilizer group is symmetric under exchanging . A bitwise Hadamard performs exactly that exchange, so it maps the stabilizer group to itself and acts as a logical Hadamard; a checkerboard of phase gates similarly preserves the group and acts as logical . The surface code separates -stars from -plaquettes on differently-shaped, disjoint supports, so a bitwise Hadamard does not preserve its stabilizer group — logical there requires lattice surgery, code deformation, or twist defects. The whole difference in Clifford cost traces to one design choice: co-locating the two check types.
What is the smallest color code, and why is it worth knowing?
It is the distance-3 triangular color code: seven qubits, three weight-4 faces coloured red, green, blue, encoding one logical qubit with and . It is exactly the Steane code — the same CSS code students meet in every error-correction course — so the color-code construction reproduces a canonical code as its smallest member. It is worth knowing because everything general is visible in miniature: even overlaps make the checks commute, a central error lights all three colours, and bitwise , , CNOT act as logical Cliffords. If you can decode and operate the seven-qubit triangle by hand, you understand the family.
What do you gain and give up by choosing a color code over a surface code?
You gain transversal logical Cliffords — , , and CNOT as single layers of local gates rather than multi-cycle lattice-surgery operations — and you encode more logical qubits per unit of topology ( versus ). You give up two things. First, the stabilizers are heavier: weight-6 hexagons (or weight-4/8 on the 4.8.8 lattice) versus the surface code's weight-4 checks, which makes syndrome extraction circuits deeper and more error-prone. Second, decoding is harder and more sensitive to measurement noise, because colour-charged syndromes break the clean matching paradigm. The trade is therefore "cheaper logic, costlier checks and decoding" — attractive precisely when an algorithm's Clifford count dominates its cost.
Why go to three dimensions at all?
Because a single 2D stabilizer code can never have a transversal universal gate set — the Eastin–Knill theorem forbids a transversal non-Clifford gate for any code with a continuous logical symmetry, and the 2D color code's transversal set stops at the Clifford group. In three dimensions the color code gains a transversal non-Clifford gate ( or ), but loses transversal . Bombín's dimension-jump protocol transfers a logical qubit between a 2D block (transversal Clifford) and a 3D block (transversal non-Clifford), so some block always implements the needed gate transversally — a route to universality that is an alternative to magic-state distillation. Three-dimensional color codes also exhibit single-shot error correction, cutting the number of measurement rounds a fault-tolerant cycle needs.