La terminología de 'código de superficie' es un poco variable. Puede referirse a toda una clase de cosas, variantes del código tórico en diferentes redes, o puede referirse al código Planar, la variante específica en una red cuadrada con condiciones de límites abiertos.
El código tórico
Resumiré algunas de las propiedades básicas del código Toric. Imagine una red cuadrada con condiciones de contorno periódicas, es decir, el borde superior está unido al borde inferior, y el borde izquierdo está unido al borde derecho. Si intenta esto con una hoja de papel, encontrará una forma de rosquilla o toro. En este enrejado, colocamos un qubit en cada borde de un cuadrado.
Estabilizadores
A continuación, definimos un montón de operadores. Para cada cuadrado en la red (que comprende 4 qubits en el medio de cada borde), escribimos
actuando una rotación Pauli- X en cada uno de los 4 qubits. La etiqueta p se refiere a 'plaquette', y es solo un índice para que luego podamos contar todo el conjunto de plaquetas. En cada vértice de la celosía (rodeada de 4 qubits), definimos
A s = Z Z Z Z . s
Bp=XXXX,
XpAs=ZZZZ.
s refiere a la forma de la estrella y, nuevamente, nos permitirá sumar todos estos términos.
Observamos que todos estos términos se conmutan mutuamente. Es trivial para porque los operadores Pauli conmutan con ellos mismos y yo . Se requiere más cuidado con [ A s , B p ] = 0 , pero tenga en cuenta que estos dos términos tienen 0 o 2 sitios en común, y los pares de diferentes operadores de Pauli conmutan, [ X X , Z Z ] = 0[As,As′]=[Bp,Bp′]=0I[As,Bp]=0[XX,ZZ]=0.
Codespace
Dado que todos estos operadores viajan, podemos definir un estado propio simultáneo de todos ellos, un estado tal que
∀ s : Un s | Psi ⟩ = | Psi ⟩|ψ⟩
Esto define el espacio de código del código. Deberíamos determinar qué tan grande es.
∀s:As|ψ⟩=|ψ⟩∀p:Bp|ψ⟩=|ψ⟩.
N×NN22N2N2AsBp±1A2s=B2p=I
∏sAs=∏pBp=IAsBp depende linealmente de todas las demás, y no reduce aún más el tamaño del espacio de Hilbert. En otras palabras, las relaciones estabilizadoras definen un espacio de Hilbert de dimensión 4; El código puede codificar dos qubits.
Operadores logicos
X1,LZ1,LX2,LZ2,L
[X1,L,X2,L]=0[X1,L,Z2,L]=0[Z1,L,Z2,L]=0[Z1,L,X2,L]=0
and anti-commutation of the two on each qubit:
{X1,L,Z1,L}=0{X2,L,Z2,L}=0
There's a couple of different conventions for how to label the different operators. I'll go with my favourite (which is probably the less popular):
Take a horizontal line on the lattice. On every qubit, apply Z. This is Z1,L. In fact, any horizontal line is just as good.
Take a vertical line on the lattice. On every qubit, apply Z. This is X2,L (the other convention would label it as Z2,L)
Take a horizontal strip of qubits, each of which is in the middle of a vertical edge. On every qubit, apply X. This is Z2,L.
Take a vertical strip of qubits, each of which is in the middle of a horizontal edge. On every qubit, apply X. This is X1,L.
You'll see that the operators that are supposed to anti-commute meet at exactly one site, with an X and a Z.
Ultimately, we define the logical basis states of the code by
|ψx,y⟩:Z1,L|ψx,y⟩=(−1)x|ψx,y⟩,Z2,L|ψx,y⟩=(−1)y|ψx,y⟩
The distance of the code is N because the shortest sequence of single-qubit operators that converts between two logical states constitutes N Pauli operators on a loop around the torus.
Error Detection and Correction
Once you have a code, with some qubits stored in the codespace, you want to keep it there. To achieve this, we need error correction. Each round of error correction comprises measuring the value of every stabilizer. Each As and Bp gives an answer ±1. This is your error syndrome. It is then up to you, depending on what error model you think applies to your system, to determine where you think the errors have occurred, and try to fix them. There's a lot of work going on into fast decoders that can perform this classical computation as efficiently as possible.
One crucial feature of the Toric code is that you do not have to identify exactly where an error has occurred to perfectly correct it; the code is degenerate. The only relevant thing is that you get rid of the errors without implementing a logical gate. For example, the green line in the figure is one of the basic errors in the system, called an anyone pair. If the sequence of X rotations depicted had been enacted, than the stabilizers on the two squares with the green blobs in would have given a −1 answer, while all others give +1. To correct for this, we could apply X along exactly the path where the errors happened, although our error syndrome certainly doesn't give us the path information. There are many other paths of X errors that would give the same syndrome. We can implement any of these, and there are two options. Either, the overall sequence of X rotations forms a trivial path, or one that loops around the torus in at least on direction. If it's a trivial path (i.e. one that forms a closed path that does not loop around the torus), then we have successfully corrected the error. This is at the heart of the topological nature of the code; many paths are equivalent, and it all comes down to whether or not these loops around the torus have been completed.
Error Correcting Threshold
While the distance of the code is N, it is not the case that every combination of N errors causes a logical error. Indeed, the vast majority of N errors can be corrected. It is only once the errors become of much higher density that error correction fails. There are interesting proofs that make connections to phase transitions or the random bond Ising model, that are very good at pinning down when that is. For example, if you take an error model where X and Z errors occur independently at random on each qubit with probability p, the threshold is about p=0.11, i.e. 11%. It also has a finite fault-tolerant threshold (where you allow for faulty measurements and corrections with some per-qubit error rate)
The Planar Code
Details are largerly identical to the Toric code, except that the boundary conditions of the lattice are open instead of periodic. This mens that, at the edges, the stabilizers get defined slightly differently. In this case, there is only one logical qubit in the code instead of two.