Color code (source code)

= Color code
{wiki}

A two-dimensional color code is a <topological stabilizer code> commonly defined on a trivalent lattice whose faces admit three colors. Place a <qubit> at each vertex and assign both an X-type and a Z-type <stabilizer generator> to each face, acting on its boundary vertices.

In the usual allowed lattices, the relevant face overlaps have even size, making X- and Z-type checks commute. Violated checks identify an <error syndrome>, while operators spanning nontrivial paths or boundaries can act on encoded <logical qubits>. The geometry and boundary choices determine the number of logical qubits and code distance. Measuring local checks can reveal physical errors without measuring logical amplitudes; the full correction procedure must also address noisy check measurements and decoding.