Hello! Welcome to your next lesson in our deep dive into fault-tolerant quantum computing.
In our last lesson, we put the finishing touches on our understanding of the Steane code by implementing its syndrome measurement and correction protocol. We saw how its CSS structure allows for the separate and efficient detection of bit-flip and phase-flip errors. The Steane code is a powerful example of a quantum error-correcting code, but its structure implies a high degree of connectivity between qubits, which can be challenging to engineer in physical hardware.
Today, we turn our attention to the surface code, arguably the most studied and promising candidate for building a large-scale, fault-tolerant quantum computer. Its primary appeal lies in its layout on a 2D grid, requiring only interactions between neighboring qubits. This geometric locality makes it a natural fit for many leading quantum hardware platforms.
Our learning outcome for this lesson is to: Define the surface code on a 2D lattice by specifying the stabilizer generators for plaquette and vertex operators.
We will start with an idealized version of the code on a torus to build intuition, and then move to the more practical planar version with boundaries. By the end, you'll be able to describe the fundamental building blocks of this crucial error-correcting code.
1. The Toric Code: A Foundation on a Torus
The simplest and most elegant version of the surface code is the toric code, which was originally proposed by Alexei Kitaev. It's defined on a 2D square lattice with periodic boundary conditions, effectively wrapping the lattice into a torus. This conveniently eliminates any boundary effects, allowing us to focus on the core structure.
In this construction, the physical qubits reside on the edges of the lattice. The code itself is defined not by its basis states, but by its stabilizer group. As we saw with the Steane code, these are operators whose +1 eigenspace forms the protected codespace. For the toric code, the stabilizer group is generated by two types of local operators:
-
Vertex Operators (Star Operators): For each vertex
son the lattice, we define an operator as the product of Pauli- operators on all qubits adjacent to that vertex. Since each vertex has four edges connected to it, this is a weight-4 operator. -
Plaquette Operators (Face Operators): For each face
p(or plaquette) on the lattice, we define an operator as the product of Pauli- operators on all qubits forming the boundary of that plaquette. This is also a weight-4 operator.
The following video provides an excellent introduction to this concept.
Keynote: Introduction to surface codes
This keynote from Google Quantum AI introduces the toric code as the simplest surface code. It clearly defines the vertex (A_s) and plaquette (B_p) stabilizer operators and their placement on the lattice.
Please watch the segment from 00:35 to 01:51. Pay close attention to how the qubits are placed on the edges and how the X-type and Z-type stabilizers are associated with vertices and plaquettes, respectively.
A crucial requirement for a set of stabilizer generators is that they must all mutually commute. This ensures they can be measured simultaneously. Let's consider why the toric code generators commute:
- Two vertex operators, and , always commute because they are products of Pauli- operators.
- Similarly, two plaquette operators, and , always commute as they are products of Pauli-s.
- A vertex operator and a plaquette operator are more interesting.
- If they do not share any qubits, they trivially commute.
- If they do share qubits, they will always share exactly two (see the diagram below). An operator from and a from anticommute: . Since they overlap on two qubits, we get two sign flips,
(-1) * (-1) = 1, and the operators as a whole commute.
A vertex operator (product of four s, in red) and a plaquette operator (product of four s, in blue) either share zero qubits or two qubits. In the latter case, the two anticommutations cancel, so .
The video you just watched continues to explain this exact point.
Keynote: Introduction to surface codes
This next segment of the same video explains why the stabilizer operators must commute and demonstrates that they do for the toric code, using the argument we just discussed.
Please continue watching from 01:51 to 03:10.
2. The Planar Surface Code: Introducing Boundaries
While the toric code is theoretically clean, physical quantum computers have edges. This brings us to the planar surface code, which is defined on a finite 2D grid with boundaries.
The core idea remains the same: we have vertex and plaquette stabilizers. However, the operators at the boundaries must be modified because there are fewer neighboring qubits.
- The bulk stabilizers (those not touching a boundary) remain weight-4, just like in the toric code.
- The boundary stabilizers have a lower weight. For example, a vertex on the edge of the grid might only be connected to three qubits, resulting in a weight-3 operator. A plaquette at a corner might only be bounded by two qubits, yielding a weight-2 operator.
This modification is a simple but crucial step in making the code practical.
Parameters of a surface code | QuTech Academy
This video from QuTech Academy provides a clear, alternative visualization of a planar surface code, explicitly showing the weight-4 bulk stabilizers and the lower-weight boundary stabilizers.
Watch the section from 02:16 to 03:09. Notice the arrangement of weight-2 Z-stabilizers and weight-4 X-stabilizers in their example.
3. A Common Layout and Formal Definitions
While the picture of qubits on edges is the origin of the code, a more common representation in recent literature places all qubits (both data and ancilla) on the vertices of a checkerboard lattice. This layout is often more direct when considering experimental implementations.
In this layout:
- Data qubits occupy one set of squares on the checkerboard.
- Ancilla qubits, used for measuring the stabilizers, occupy the other set.
- Z-type plaquette stabilizers are measured by ancillas in the center of a "face" of four data qubits.
- X-type vertex stabilizers are measured by ancillas in the center of a "star" of four data qubits.
The image below, from a research paper on surface code decoding, illustrates this modern convention.
A scalable and fast artificial neural network syndrome ...
This figure from Bhoumik et al. (2023) shows a common layout for the surface code. Part (a), on the right, depicts the 2D array. Data qubits (grey) are surrounded by ancilla qubits that measure the vertex (yellow, X-type) and plaquette (green, Z-type) stabilizer generators.
To make this precise, we can read the formal definition of these operators from the paper itself. Given your preference for original sources, this paper will be a useful reference as we proceed.
A scalable and fast artificial neural network syndrome decoder for surface codes
This paper on machine learning decoders provides a concise and modern definition of the surface code's stabilizer generators in its 'Results and Discussion' section.
Please read section 2.1, 'Surface Code Overview and Layout'. Focus on the definitions of the vertex and plaquette operators in Equations (1) and (2). Also, study Figure 2 to understand the color-coding and layout convention used, which clearly distinguishes data qubits from the X and Z stabilizers.
As described in the paper, for the bulk of the lattice, the stabilizer generators are:
- Vertex operator:
- Plaquette operator:
Here, the indices refer to the location of the ancilla qubit that measures the stabilizer, and the other indices refer to the surrounding data qubits. At the boundaries, as the paper notes, these operators are modified by simply removing the Pauli terms corresponding to absent qubits.
Test your understanding!
Consider the small 3x3 planar surface code shown below, using the checkerboard layout. Data qubits are grey, X-stabilizers are yellow, and Z-stabilizers are green.
- Write down the full Pauli operator for the Z-stabilizer
P. - Write down the full Pauli operator for the X-stabilizer
V.
Show answer
- The Z-stabilizer
Pis a plaquette operator in the bulk of the code. It is the product of operators on the four data qubits surrounding it:q2,q3,q6, andq7.
- The X-stabilizer
Vis a vertex operator on the boundary. It is the product of operators on the data qubits adjacent to it:q0,q1, andq4.
Note that this is a weight-3 operator because it's on the boundary.
Conclusion
In this lesson, we have laid the groundwork for understanding the surface code by defining its fundamental structure. We've moved from the idealized toric code to the practical planar code and established the identity of its stabilizer generators.
Key Takeaways:
- The surface code is a topological stabilizer code defined on a 2D lattice, making it suitable for hardware with only local connectivity.
- The qubits are arranged on a grid, and the code is defined by a set of local stabilizer generators.
- There are two types of generators: vertex operators (products of Pauli-s) and plaquette operators (products of Pauli-s).
- In the bulk of the lattice, these are typically weight-4 operators. On a planar code with boundaries, the stabilizers at the edges have a lower weight (e.g., 2 or 3).
Preview of the next lesson:
Now that we have defined the stabilizers, the next logical step is to see how they are used to detect errors. In the next lesson, we will implement the syndrome measurement circuits for the surface code. You will see how errors create pairs of "excitations" (violated stabilizers) that mark the endpoints of error chains on the lattice, which forms the basis for the decoding problem.