'Yüzey kodu' terminolojisi biraz değişkendir. Bütün bir sınıfa atıfta bulunabilir,Toric kodunun , farklı kafeslerdeki veya açık sınır koşullarına sahip kare bir kafes üzerindeki belirli varyant olan Planar koduna atıfta bulunabilir.
Torik Kodu
Torik kodunun bazı temel özelliklerini özetleyeceğim. Periyodik sınır koşullarına sahip kare bir kafes düşünün, yani üst kenar alt kenara birleştirilir ve sol kenar sağ kenara birleştirilir. Bunu bir sayfa kağıda denerseniz, bir çörek şekli veya torus elde edersiniz. Bu kafes üzerine, bir karenin her kenarına bir kübit yerleştiriyoruz.
dengeleyiciler
Sonra, bir sürü operatör tanımlarız. Kafes her kare için (her bir kenarının ortasında 4 qubits içeren), biz bilgileri
hareket eden bir Pauli- x 4 qubits her biri üzerinde dönmesini. P etiketi 'plaket' anlamına gelir ve sadece bir endekstir, böylece daha sonra tüm plaket setlerini sayabiliriz. Kafesin her köşesinde (4 kubit ile çevrili), A s = Z Z Z Z'yi tanımlarız
. s , yıldız şeklini ifade eder ve yine tüm bu terimleri toplamamıza izin verir.
Bp=XXXX,
XpAs=ZZZZ.
s
[As,As′]=[Bp,Bp′]=0I[As,Bp]=0[XX,ZZ]=0.
KodAralığı
|ψ⟩
∀s:As|ψ⟩=|ψ⟩∀p:Bp|ψ⟩=|ψ⟩.
This defines the codespace of the code. We should determine how large it is.
For an N×N lattice, there are N2 qubits, so the Hilbert space dimension is 2N2. There are N2 terms As or Bp, which we collectively refer to as stabilizers. Each has eigenvalues ±1 (to see, just note that A2s=B2p=I) in equal number, and when we combine them, each halves the dimension of the Hilbert space, i.e. we would think that this uniquely defines a state.
Now, however, observe that ∏sAs=∏pBp=I: each qubit is included in two stars and two plaquettes. This means that one of the As and one of the Bp is linearly dependent on all the others, and does not further reduce the size of the Hilbert space. In other words, the stabilizer relations define a Hilbert space of dimension 4; the code can encode two qubits.
Logical Operators
How do we encode a quantum state in the Toric code? We need to know the logical operators: X1,L, Z1,L, X2,L and Z2,L. All four must commute with all the stabilizers, and be linearly independent from them, and must generate the algebra of two qubits. Commutation of operators on the two different logical qubits:
[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.