Computing Library › Quantum Error Correction
Quantum Error Correction

Color Codes

Color codes are topological CSS codes on three-colorable lattices that permit the entire Clifford group transversally in 2D.

Codes on colored lattices

A color code is defined on a two-dimensional lattice whose faces can be colored with three colors so that adjacent faces differ, and whose vertices have degree three. Each face carries both an X-type and a Z-type stabilizer on its bordering qubits, unlike the surface code where X and Z checks sit on different sublattices. Color codes are CSS codes with topological protection, close cousins of the surface code.

Transversal gates

Kronos motion — error correction

The signature advantage of the 2D color code is that it admits the full Clifford group, including the Hadamard and phase gates, transversally. On the closely related three-dimensional color code, even a transversal T gate becomes available, which would remove the need for magic state distillation for that gate. This richer transversal structure is the main reason color codes are studied as an alternative to the surface code.

Trade-offs

These gate advantages come at a price. Color-code stabilizers have higher weight, typically six on a hexagonal lattice, than the weight-four checks of the surface code, which makes syndrome extraction more demanding and error propagation harder to control. Their fault-tolerance threshold is generally somewhat lower, and decoding is harder because color-code syndromes do not reduce to a simple matching problem; specialized decoders such as projection and restriction decoders are used.

Color codes also connect to the surface code through code conversion, and they are important theoretically as examples that push transversal gates as far as topology allows. The choice between color and surface codes is an engineering trade between richer transversal gates and simpler, higher-threshold operation.