Skip to main content
IBM Quantum Platform

Other code families

It's been over 25 years since the toric code was discovered, and there's been a great deal of research into quantum error correcting codes since then, including the discovery of other topological quantum codes inspired by the toric code, as well as codes based on different ideas. A comprehensive list of known quantum error correcting code constructions would be impossible to include here — but we will scratch the surface just a bit to briefly examine a couple of prominent examples.


Surface codes

As it turns out, it isn't actually necessary that the toric code has periodic boundaries. That is to say, it's possible to cut out just a portion of the toric code and lay it flat on a two-dimensional surface, rather than a torus, to obtain a quantum error correcting code — provided that the stabilizer generators on the edges are properly defined. What we obtain is called a surface code.

For example, here's a diagram of a surface code, where the lattice is cut with so-called rough edges at the top and bottom and smooth edges at the sides. The edge cases for the stabilizer generators are defined in the natural way, which is that Pauli operations on "missing" qubits are simply omitted.

Diagram of a surface code

Surface codes of this form encode a single qubit, rather than two, like the toric code. The stabilizer generators happen to form a minimal generating set in this case, without the need to remove one of each type as with the toric code. But, despite these differences, the important characteristics of the toric code are inherited. In particular, nontrivial undetected errors for this code correspond to chains of errors that either stretch from the left edge to the right edge (for chains of XX errors) or from top to bottom (for chains of ZZ errors).

It's also possible to cut the edges for a surface code diagonally to obtain what are sometimes called rotated surface codes, which are so-named not because the codes are rotated in a meaningful sense, but because the diagrams are rotated (by 45 degrees). For example, here is a diagram of a rotated surface code having distance 5.

Diagram of a rotated surface code

For this type of diagram, black tiles (including the rounded ones on the edges) indicate XX stabilizer generators, where XX operations are applied to the (two or four) vertices of each tile, while white tiles represent ZZ stabilizer generators. Rotated surface codes have similar properties to (non-rotated) surface codes, but are more economical in terms of how many qubits are used.


Color codes

Color codes are another interesting class of codes, which also fall into the general category of topological quantum codes. They will only briefly be described here.

One way to think about color codes is to view them as geometric generalizations of the 7-qubit Steane code. With this in mind, let's consider the 7-qubit Steane code again, and suppose that the seven qubits are named and ordered using Qiskit's numbering convention as (Q6,Q5,Q4,Q3,Q2,Q1,Q0).(\mathsf{Q}_6,\mathsf{Q}_5,\mathsf{Q}_4,\mathsf{Q}_3,\mathsf{Q}_2,\mathsf{Q}_1,\mathsf{Q}_0). Recall that the stabilizer generators for this code are as follows.

ZZZZIIIZZIIZZIZIZIZIZXXXXIIIXXIIXXIXIXIXIX\begin{array}{ccccccc} Z & Z & Z & Z & \mathbb{I} & \mathbb{I} & \mathbb{I} \\[1mm] Z & Z & \mathbb{I} & \mathbb{I} & Z & Z & \mathbb{I} \\[1mm] Z & \mathbb{I} & Z & \mathbb{I} & Z & \mathbb{I} & Z \\[1mm] X & X & X & X & \mathbb{I} & \mathbb{I} & \mathbb{I} \\[1mm] X & X & \mathbb{I} & \mathbb{I} & X & X & \mathbb{I} \\[1mm] X & \mathbb{I} & X & \mathbb{I} & X & \mathbb{I} & X \end{array}

If we associate these seven qubits with the vertices of the following graph, we find that the stabilizer generators match up precisely with the faces formed by the edges of the graph.

Diagram illustrating geometric locality of the 7-qubit Steane code

That is, for each face, there's both a ZZ stabilizer generator and an XX stabilizer generator that act nontrivially on those qubits found at the vertices of that face. The 7-qubit Steane code therefore possesses geometric locality, so in principle it's not necessary to move qubits over large distances to measure the stabilizer generators. The fact that the ZZ and XX stabilizer generators always act nontrivially on exactly the same sets of qubits is also nice for reasons connected with fault-tolerant quantum computation, which is the topic for the next lesson.

Color codes are quantum error correcting codes (CSS codes to be more precise) that generalize this basic pattern, except that the underlying graphs may be different. For example, here's a graph with 19 vertices that works. It defines a code that encodes one qubit into 19 qubits and has distance 5 (as in, it's a [[19,1,5]][[19,1,5]] stabilizer code).

Diagram of a color code

This can be done with many other graphs, including families of graphs that grow in size and have interesting structures.

Color codes are so-named because one of the required conditions on the graphs that define them is that the faces can be three-colored, meaning that the faces can each be assigned one of three colors in such a way that no two faces of the same color share an edge (as we have in the previous diagram). The colors don't actually matter for the definition of the code itself — there are always ZZ and XX stabilizer generators for each face, regardless of its color — but the colors are important for analyzing how the codes work.


Other codes

Quantum error correction is an active and rapidly advancing area of research. Those interested in exploring deeper may wish to consult the Error Correction Zoo, which lists numerous examples and categorizations of quantum error correcting codes.

Example: The gross code. The gross code is a recently discovered [[144,12,12]][[144,12,12]] stabilizer code. It is similar to the toric code, except each stabilizer generator acts nontrivially on two additional qubits, slightly further away from the tile or vertex for that generator (so each stabilizer generator has weight 6). The advantage of this code is that it can encode 12 qubits, compared with just two for the toric code.

Was this page helpful?
Report a bug or request content on GitHub.