- Surface Code – Introduction [1], [2], [3], [4]
- Logical Operators
- Holes [4], [6]
- Moving Holes
- Braiding [6]
- Braiding 2 Logical Qubits
- Equivalence to (Multiple-Qubit) CNOT Gate
- Sources
1. Surface Code – Introduction [1], [2], [3], [4]
One can get rid of the periodic boundary conditions of the toric code to get a flat 2-dim surface (or planar) code, encoding a single qubit (which is easier to realize then the toric code)
To start: split the boundary of the lattice (solid lines) into a ‘smooth’ (at the top and the bottom) and a ‘rough’ (left and right) boundary, the latter carrying no qubits
A second lattice represented by the dotted lines is called dual lattice (it holds: all properties for X-stabilizers on the lattice can be translated to Z-stabilizers on the dual lattice!)

A path along the edges is an element of a group called the group of one chains, [5]. Allow only edges carrying a qubit gives a subgroup: the group of one chains relative to the rough boundary (because the edges of the rough boundary are omitted)
As for the toric code, ancilla qubits (black dots) are introduced in addition to the physical qubits (white dots)

Each data qubit is coupled to two ‘measure’ Z qubits and two ‘measure’ X qubits. Each measurement qubit is coupled to 4 data qubits
What’s happening? The system is in some initial state, and then all the stabilizers are measured. This will force the state into a simultaneous eigenstate of all the stabilizer operators, but the eigenvalues may not all equal 1. Hence apply the error corrections to move the state into the code space
Now start some quantum algorithm and after a first step measure again all the stabilizers to detect errors in order to correct them. Now execute the quantum algorithm’s second step … and repeat!
A measure Z qubit, when performing the measurement cycle (i.e. measuring a stabilizer ZZZZ), forces its neighboring data qubits a, b, c, d into an eigenstate of


Similar, the stabilizer

is measured by a X qubit and forcing its neighboring data qubits a, b, c, d into an eigenstate of

The first ZZZZ and XXXX measurement takes whatever initial data qubit state there is into an entangled |ψ> that is a simultaneous eigenstate of all measurements across the lattice (called quiescent state). If no error occurs, every measurement cycle will give |ψ>, because all the X- and Z-stabilizers commute with each other

For every relative one-chain c define Xc and Zc, obtained by letting X respectively Z act on the qubits along the chain. Similar for co-chains along the dual lattice

The red line relative one-chain is ‘open-ended’ (since the rough boundary is removed, also called ‘zero boundary’), and is the equivalent to a closed loop on a torus! Similar, the blue line represents a relative co-chain with zero boundary on the dual lattice
As for the toric code: introduce Xv for each vertex and Zf for each tile, building an abelian subgroup S, creating a 2-dimensional code space (i.e. the space of all states left invariant by all tile operators and all vertex operators), hence encoding one logical qubit. This code is the surface code
The logical operators are the ones created by the blue and red line: Zc and Xc*
2. Logical Operators
See again the lattice below: there are 18 data qubits and 17 measurement qubits (not shown), hence there are 2*18 degrees of freedom (each qubit lives in an 2-dim Hilbert space, hence 218 distinct states) and 2*17 constraints from the stabilizer measurements, because each stabilizer is reducing the number of degrees of freedom by a factor 2 (since the outcome of each measurement is +1 or -1)

Hence there are two unconstrained degrees of freedom, and therefore the surface code lattice describes one (error-corrected) logical qubit! The lattice state is therefore

where |u>L is the state of the ‘free’ logical qubit, |v> the fully stabilized state of the remaining (data) qubits. What are the logical operators

Consider


From the toric code it shouldn’t come as a surprise, that XL commutes trivially with all X-stabilizer, but also with the Z-stabilizers (because it flips none or two qubits of the Z stabilizer). Analogously: ZL
And since

these two operators manipulate |u>L without affecting |v> and are not in the stabilizers, hence are logical operators! Note:

Hence there is only one non-trivially distinct XL operator for the whole lattice, regardless of the lattice size!
3. Holes [4], [6]
How to realize more than 1 logical qubit on a lattice of physical qubits?
By releasing the constraints coming from the stabilizers: ‘turn off’ one or more of the internal measure-X and measure-Z qubits, i.e. they are not included in the measurement cycle anymore (although the qubits are still there)! This alters the code space, but the ‘logical’ meaning of the quantum state is untouched
See e.g. [7] chapter 10.5: a stabilizer group S on n physical qubits generated by g independent generators stabilizes a

dimensional subspace. Hence: the code space gets two extra dimensions by removing a single stabilizer Zf:


Define

connected to the boundary and

both sharing one data qubit (called ‘Z-cut’ qubit), hence anticommute (and are therefore not in the stabilizer group). The Z-cut qubit (adding two degrees of freedom) plus the logical operators … build a logical qubit! Note that you couldn’t define a non-trivial XL operator for the Z-cut qubit if connected to the Z boundary
Analogously: X-cut qubit
One can get rid of the boundary condition: removing pairs of measure-X and -Z qubits! Defining the (local!) operators appropriately and ignoring 2 of the 4 added degrees of freedom, a single logical qubit is created and can be manipulated, see [4]

To summarize: In the surface code, a „hole“ (defect) defines a logical qubit with two logical operators: a string connecting the hole to a boundary (or another hole) of the same type and a string encircling the hole
4. Moving Holes
It holds, that multiple-qubit gates can be realized by moving entangled logical qubits around on a 2D lattice while preserving the surface code error protection. Passing one hole of a two-hole qubit between the two holes of a second qubit, “braiding” the logical qubits together, one performs a logical CNOT on the two qubits!
Move a hole. a) The lower Z-cut builds the logical qubit with


First exclude the Z-stabilizer from the next measurement cycle, i.e. the data qubit 6 will not be measured by a Z-stabilizer, but measured separately by the new, extended operator

(to preserve the error correction, b). c) Redefine

After the first measurement cycle the original Z-cut qubit (lower hole in a) is ‘turned on’ and the second surface code cycle is done. Define

and the original Z-cut qubit is moved with the logical operators

Note: the operator extension could lead to a change in sign for the resulting state, hence so-called Byproduct operators are introduced:

where z and x describe if a sign switch really happened (and only then those operators are applied)
This hole movement can be generalized to multi-cell movements (still in just one step of the code cycle)

5. Braiding [6]
A braid transformation can entangle two logical qubits, in a way that makes the braid transformation equivalent to a logical CNOT!

Start with a single Z-cut qubit and the XL operator with 3 data qubits (by the way: this is the Heisenberg description of quantum mechanics, describing the evolvement of the system by the evolvement of the operators, in contrast to the Schrödinger picture, where the operators are constant and the wave functions (quantum states) are evolving over time; both descriptions are equivalent considering measurement outcomes, see e.g. [8]). The grey square is the idle second hole. Then start moving with the first cycle, measuring the isolated data qubits with the measurement eigenvalues

Note that the braid cannot be done in a single multi-cell move, because this would isolate the area enclosed by the braid. Third picture: extended

Then the second measurement cycle is done, again measuring the isolated data qubits separately. Next: extending

including now next to a closed loop of operators also the original chain of X operators. The closed loop is completely stabilized by the nine X stabilizers

and hence one can reduce the X operator chain to

which is identical to

(and hence the new state is living in the original code space and can be compared to the original state!). The signs can be handled by corresponding Byproduct operators
Now for the ZL operator:

Start the movement, the first measurement cycle gives ±1 for every

Extend

Now

are turned on and the new

is formed:

Note: now wait, because there can occur errors in the isolated data qubits during the move, the error measurement and correction needs to be applied by executing d-times the surface code measurement cycle (d the distance of the code)). Then the second move, finally producing a closed loop with

which is identical to ZL up to the sign, again handled by Byproduct operators

6. Braiding 2 Logical Qubits
a) The braid path could enclose another logical qubit, here braiding a Z-cut qubit by a X-cut qubit (being equivalent to a logical CNOT-gate):

As shown in the picture, in the end there is an operator XL1’’ being identical to XL1 (potentially up to a sign) and since the X-cut hole inside the loop is not stabilized, the loop operator resolves not to a simple product of measurement outcomes, but an operator XL2 on the second qubit:





The Z-cut hole moves clockwise around the X-cut hole, moved by the Z-string

The dotted lines in the second picture are the shared edges between adjacent plaquettes and will vanish, e.g. between



The outer boundary loop then crosses the ZL2 string of the X-cut hole, hence multiply the boundary loop with ZL2 and again the shared edge vanishes.
In a surface code, a logical operator can be freely deformed by multiplying with stabilizers, i.e. push the string around without changing the logical operator. The ZL2 string has been deformed to run around the inner boundary of the X-cut hole (picture 3, black dotted line)
Example calculation: let ZL2 be the logical Z operator for the X-cut hole. Name the physical qubits surrounding a X-cut hole as follows, where ZL2 runs from top to bottom through the center (the holes, like in picture 2 above):



Hence multiplying all (operators on different qubits commute):

but this is exactly the loop!
Back to c) and the corresponding picture: restore ZL2 leaving a logical operator on the first qubit




The first qubit hole is braided by a loop of Z operators through the second qubit, but as the loop preserves its closed form with both moves (at the ‚end‘ of the first move is now the identity operator), it does not generate a chain or loop of operators that act on the second qubit
7. Equivalence to (Multiple-Qubit) CNOT Gate
CNOT on 2 qubits, transforming 16 outer products of I, X, Z, Y, only 4 are independent (because of, e.g., (Z⊗X) = (Z⊗I) ∙ (I⊗X)):

This is exactly the transformation described before by the braiding of a Z-cut qubit as the control and a X-cut qubit as the target!
Note: Unfortunately, the surface code does not allow a representation of a universal set of quantum gates by braids – doing this requires the use of a more sophisticated physical equivalent called non-abelian anyons, see e.g. [9]
8. Sources
- [1] ‚Quantum error correction: the surface code‘ by christianb93, 2019 (leftasexercise.com/2019/04/08/quantum-error-correction-the-surface-code/)
- [2] ‚Quantum codes and quantum error correction‘ by christianb93, 2018 (github.com/christianb93/QuantumComputing/blob/master/QEC/QuantumErrorCorrection.pdf)
- [3] ‚Quantum codes on a lattice with boundary‘ by Bravyi et al., 2024 (arxiv.org/pdf/quant-ph/9811052)
- [4] ‚An introduction to the surface code‘ by Cleland, 2019 (researchgate.net/publication/360361427_An_introduction_to_the_surface_code)
- [5] ‚Chain Complexes‘ by Wright, 2024 (people.eecs.berkeley.edu/~jswright/quantumcodingtheory24/scribe%20notes/lecture14.pdf)
- [6] ‚Surface codes: Towards practical large-scale quantum computation‘ by Fowler et al., 2012 (arxiv.org/pdf/1208.0928)
- [7] ‚Quantum Computation and Quantum Information‘, Michael A. Nielsen, Isaac L. Chuang, Cambridge University Press, 2010
- [8] ‚From Heisenberg and Schrödinger to the P vs. NP Problem‘ by Weinstein, 2025 (arxiv.org/html/2511.07502v1)
- [9] ‚Non-Abelian Anyons and Topological Quantum Computation‘ by Nayak et al., 2008 (arxiv.org/pdf/0707.1889)
- [10] ‚Poking holes and cutting corners to achieve Clifford gates with the surface code‘ by Brown et al., 2017 (arxiv.org/pdf/1609.04673)
Schreibe einen Kommentar