Color Codes (Overview)
The surface code is not the only topological code. Color codes, introduced by Bombín and Martín-Delgado, are a different family that trades a slightly more demanding lattice for a much richer set of cheap, transversal logical gates. They sit on a trivalent, three-colorable lattice and place both an -type and a -type stabilizer on every face. This lesson surveys color codes and contrasts them with the surface code.
The lattice and stabilizers
A 2D color code lives on a trivalent lattice (three edges per vertex) whose faces are 3-colorable: the faces can be coloured red, green, blue so that adjacent faces never share a colour (the hexagonal/honeycomb lattice is the canonical example). Qubits sit on vertices. For each face there are two stabilizer generators,
acting on all qubits around that face. The two generators on each face commute because every face shares an even number of vertices with every other face — the same even-overlap rule as the toric code, guaranteed here by the 3-colorability.
How it differs from the surface code
- Checks per face. The surface code separates and checks onto distinct vertices/plaquettes; the color code stacks both on every face. This roughly doubles the stabilizer weight and tightens the hardware connectivity requirement.
- Threshold. Color codes have a somewhat lower threshold (typically a few tenths of a percent to under circuit noise, generally below the surface code) and historically harder decoding, though modern matching/lifted decoders have narrowed the gap.
- Anyon content. A 2D color code is equivalent to two copies of the toric code — it can be "unfolded" into two surface codes — so its underlying topological order is richer but ultimately built from the same ingredients.
The payoff: transversal Clifford gates
The headline advantage is gate transversality. In a 2D color code the entire Clifford group — including the Hadamard , phase , and crucially the controlled- between two code blocks — can be implemented transversally: as a product of single-physical-qubit gates (and qubit-wise pairs across blocks), with no interaction spreading errors within a block.
Transversal gates are automatically fault-tolerant: a single faulty physical gate produces at most a single error per block, which the code can then correct. The surface code, by contrast, gets a transversal CNOT but not a transversal or acting within one patch — it must implement those through lattice surgery or code deformation, which is more involved.
When to choose which
- Surface code: highest threshold, simplest weight-4 checks, the default for near-term hardware limited by error rates and connectivity.
- Color code: richer transversal gate set (cheaper Clifford logic, sometimes cheaper magic-state factories via the 3D color code's transversal ), at the cost of a lower threshold and heavier checks.
Both are topological in exactly the sense Module 8 has developed: local stabilizers, string-like logical operators, distance set by lattice size, and a positive threshold. The choice is an engineering trade between threshold and gate convenience.
Sign in on the full site to ask questions and join the discussion.