# Surface Codes

Surface codes may be one of the keys to building large, fault-tolerant quantum computers. They involve the arrangement of qubits into two-dimensional lattices that define an error correction code. Some of the key concepts of any surface code include:

- Two-qubit stabilizers that act on two-dimensional arrays of physical qubits
- Two-dimensional lattices of physical qubits that implement the surface code
- The formation of logical qubits from these arrays of physical qubits
- The calculation of numerical estimates of the resultant fault tolerance
- The braiding of logical qubits through their physical movement within their array
- The establishment of universal quantum computation through H, S, and T operators

The term “braiding” does not refer to the physical interlacing of qubits or wires or anything. As the qubits move around each other, the traces of their movement appear to be braided if imagined in three-dimensional spacetime. Logic gates can then be thought of as different patterns of braids that result from differences in these movements. The key advantage to topological quantum computing, as this is called, is that quantum information is stored in the noise-robust braids instead of in the extremely sensitive particles.

QuTech Academy offers a “Surface codes” mini-lecture, which consists of a digestible 4:37 video. The instructor provides explanations of some surface code visualizations that are depicted on a whiteboard. Below the video, the page includes links to suggested further reading, as well as to an additional video.

It is important to refer to any example of a surface code as a quantum surface code, as searching for variations of this term might result in irrelevant content. For example, reversing the words to become “code surfaces” might refer to coding on Microsoft Surface devices, which are not quantum computers. Adding words such as in “surface mount codes” refers to the fabrication of electronic components onto printed circuit boards (PCB) surfaces, which could be indirectly relevant on an engineering level, but isn’t specific to quantum computing.

## What are Surface Codes?

Although it is not possible to know how many surface codes are currently being researched, an informative sampling can be drawn from those that have been publicly proposed. There are so many already, in fact, that the following is actually a sampling of surface code families, rather than a list of individual surface codes:

- [[9,1,3]] surface codes, which themselves have at least four variations
- Planar codes, which might be the most practical surface codes
- Toric codes, which are simple, well-studied codes with boundaries
- Subsystem codes, which use a subset of data qubits to detect errors
- Quantum double models, which are based on non-Abelian anyons
- Hyperbolic codes, which are similar to planar and toric codes, but in hyperbolic spaces

Low-Density Parity Check (LDPC) Codes are not surface codes, and therefore they don’t belong on the list above. However, LDPC codes propose to protect quantum information with only 1/10 to 1/15 as many physical qubits as may be required by surface codes, and so they are certainly worthy of being mentioned somewhere within a discussion of surface codes.

Each of the above surface code families has distinct properties, and each may have different applications within quantum computing. And because surface codes are a highly active area of research, as is the case with quantum error correction codes in general, the continued discovery of novel codes can be expected.

In principle, all of these codes are modality agnostic. In other words, they ought to be compatible with all qubit modalities. This is a particularly interesting concept, as surface codes can be thought of as implementing topological quantum computing, even though none of these qubit modalities need to be topological qubits.

For further reading, a StackExchange Quantum Computing question titled “What is the ‘surface code’ in the context of quantum error correction?” includes one detailed response that covers the Toric Code, stabilizers, codespace, logical operators, error detection and correction, error correcting threshold, and the Planar Code. This response includes links and an image.

## The Underlying Principles of Surface Codes

Despite the variety of the surface codes that are listed in the immediately previous section, these code families all share a few common principles. These principles actually reveal functionality beyond simply the error correction for which these surface codes are being investigated:

- Two-qubit stabilizers act upon two-dimensional arrays of physical qubits
- These arrays of physical qubits form logical qubits
- These logical qubits have estimated fault tolerances
- These logical qubits create “braids” as they physically move around the array
- Braiding controllably swaps the positions of two logical qubits
- The swapping of positions moves one qubit around the other
- The movement of two logical qubits performs a CNOT operation on them
- CNOT operations are the basic operation for creating quantum entanglement
- Hadamards, S, and T operators perform universal quantum computation

Beyond error correction, therefore, these principles allow for the transformation of quantum information. Instead of on the physical qubits, single-qubit operations may be implemented on the logical qubits. Furthermore, two logical qubits can become entangled, which in turn unlocks the full potential of quantum computation. Therefore, surface codes can be thought of as a genuine path toward fault-tolerant quantum computing.