Lattice. A cellulation of a surface in which every vertex has exactly three edges and the faces can be coloured red, green and blue so that faces sharing an edge have different colours. Every face then has an even number of vertices, because the faces around it alternate between the two other colours, and two distinct faces share an even number of vertices. One qubit sits on each vertex.
Checks. For every face , with running over its vertices,
and overlap on an even number of qubits for all , so all checks commute. The -type and -type checks have identical supports: the code is a self-dual CSS code.
Parameters on a closed surface. On a closed surface of Euler characteristic the code encodes qubits: none on the sphere and four on the torus, twice as many as the toric code on the same surface (Bombin and Martin-Delgado).
Triangular codes. Removing one vertex of a lattice on the sphere, together with the three faces and three edges that meet there, leaves a planar triangular patch with three sides, one of each colour, that encodes qubit in an odd number of qubits with faces. Two standard families, with odd distance , are
| Lattice | Faces | ||
|---|---|---|---|
| hexagonal (6.6.6) | hexagons, weight-4 faces on the sides | ||
| square-octagon (4.8.8) | squares and octagons, weight-4 faces on the sides |
with qubit counts as given by Landahl, Anderson and Rice. Both begin with the Steane code, whose three weight-4 checks of each type are the three faces of the smallest triangle.
Logical operators. In a triangular code and : each commutes with all checks because faces are even, and they anticommute because is odd. Multiplying by checks reduces them to strings of weight running along one side of the triangle. On a closed surface the logical operators are strings of a given colour, which run along the edges joining faces of that colour and may branch at a vertex into strings of the other two colours.
Properties. Every qubit lies on three faces, so a single-qubit error flips up to three checks (three in the bulk, fewer at the sides and corners). The transversal gates are stated in the transversal Clifford theorem. Bombin and Martin-Delgado compare the qubit cost with surface codes: the best planar color-code lattice in their study has , against for the best planar surface code, both counted in data qubits only.