6.443/8.371/18.
436 Quantum Information Science II                                                  Lecture 4
                                     Quantum error correction
  Aram Harrow                                                                                February 20, 2018
In this lecture we discuss quantum error correction:
   • quantum error correcting codes
   • quantum error correction conditions
   • Examples
   • Stablizer codes (quantum generalization of classical linear codes)
4.1     Quantum error correcting codes
In the previous lecture we discussed classical error correction. We saw that classical codes encode information
                                                                                                     n
in subsets of n-bit strings, ie, C ⊆ {0, 1}n . In contrast, a quantum code is a subspace like C ≤ C2 . The no-
cloning theorem rules out a quantum generalization repetition codes, since we are unable to find a quantum
operation that maps E(|ψi) = |ψi ⊗ |ψi for an arbitrary state |ψi. As a result ,in order to establish quantum
error correction we need new ideas.
    In order to encode k qubits into a larger n qubit Hilbert space we use an encoding map, which is an
                  k       n
isometry E : C2 → C2 (or super operator E(ρ) = EρE † ). The quantum code corresponding to E is Im(E).
Similar to classical error correction we can define a quantum decoding map D, which is a quantum operation
        n           k                                           n         n
: L(C2 ) → L(C2 ). A noise operation N is a map : L(C2 ) → L(C2 ). The decoding map must correct
noise in the sense that D(N (E(ρ))) = ρ. Note in genera D is not unitary, since it needs to get rid of noise.
                                                      n          n
It is also useful to define a recovery map R : L(C2 ) → L(C2 ) which maps a noisy state onto the corrected
state inside the quantum code subspace. In particular we want R(N (E(ρ))) = E(ρ). Recovery maps are
useful when we want to do computation on the code space. Using a recovery map we only need the encoding
map once at the beginning of computation and a decoding map at the end.
                                                                                           n
    Given a quantum code we can define a linear subspace S of correctable errors ≤ L(C2 ). A noise operation
N (ρ) = i Ei ρEi† is correctable if Ei ∈ S, ∀i. In the Stinespring picture such noise operation acts as the
          P
isometry                                             X
                                            |ψiQ 7→      Ei |ψiQ ⊗ |iiE
                                                     i
|iiE is an orthonormal basis. Let {Dj }j be the set of Kraus operators of D. The decoding map acting on
N (|ψiQ ) must give
                                   X
                           |ψiQ 7→     Dj Ei |ψiQ ⊗ |jiR ⊗ |iiE = |ψiQ ⊗ |γiER
                                      i,j
for some vector γER . This condition can be summarized as Dj Ei |ψiQ ∝ |ψiQ (including zero), for all i, j.
    Since S is a linear subspace, if we can correct two Krause operators, then we can correct any linear
combination of them. For example, if we can correct a Z error, we can also correct eiθZ = cos θ + i sin θZ
for arbitrary θ.
    Low weight errors: a typical choice for S is the set of errors that affect only l ≤ d−1
                                                                                         2 qubits. Hence
without loss of generality we can assume
                        S = span{σp1 ⊗ . . . ⊗ σpn ≡ σp~ : p~ ∈ {0, 1, 2, 3}n s.t k~
                                                                                   pk ≤ l}
This doesn’t mean that noise is unitary, it is just that without loss of generality we can assume these operators
in the Pauli basis. We could have considered a form like S = span{A1 ⊗. . .⊗An : s.t at most l of Ai ’s 6= I}.
Correcting S is equivalent to C having distance d. We use the notation [[n, k, d]] for a code that encodes k
logical qubits into n qubits and corrects errors up to distance d.
                                                         4-1
Lecture 4: Quantum error correction                                                                           4-2
4.2     Quantum error correction conditions
We are now ready to give the general definition of quantum codes. Recall the formal definition of a quantum
code:
Definition 1 (Quantum code). A quantum code C is a subspace that satisfies
             n
   • C ⊆ C2 , which means C uses n physical bits.
   • dim C = 2k , which means C encodes k logical bits.
    By contrast with the above operational definition of error correction, we also state a more mathematical
definition.
Claim 2 (QEC Condition). ∀ |ψ1 i , |ψ2 i ∈ C and ∀E1 , E2 ∈ E, if hψ1 |ψ2 i = 0, then hψ1 |E1† E2 |ψ2 i = 0
   It means if we can distinguish two code states |ψ1 i and |ψ2 i perfectly, we can still do so after they are
each affected by errors. An equivalent form of this conditions is to say
                                          ΠC E2† E1 ΠC = (E1 , E2 )ΠC
Here ΠC is the projector onto the code space and (·, ·) is a bilinear form on matrices.
   We will not give the proof of this claim in this course. You can read it in 8.370 or Nielsen-Chaung.
4.3     Examples
Let us give some examples
  1. Classical codes: given a classical code Ccl ≡ {C1 , . . . , C2k } ⊆ {0, 1}n we can define the quantum
                                                n
     code Cq ≡ span{|C1 i , . . . , |C2k i} ⊆ C2 . If Ccl has distance d, then the set of errors is the set of X
                   d−1
     operators on ≤ 2 positions.
  2. eiθX3 on the repetition code span{|000i , |111i}. C can correct span{I, X1 , X2 , X3 } ≡ {A0 , . . . , A3 } 3
     eiθX3 . We can verify that (Ai , Aj ) = δij .
                                                                                            d−1
  3. Any classical code on in the |±i basis (which can correct Z errors affecting            2    qubits). C ≡
                                                n
     span{H ⊗n |C1 i , . . . , H ⊗n |C2k i} ⊆ C2 . Here H is the Hadamard matrix.
  4. Concatenated code Let C1 be a [[n1 , k1 , d1 ]] code and C2 be a [[n2 , k2 , d2 ]] code with encoding maps
     E1 and E2 . Then the concatenation of these two codes is a [[n1 n2 , k1 , d1 d2 ]] with the encoding map
     E2⊗n1 E1 .
4.4     Stabilizer codes: introduction
Stabilizer codes are generalizations of linear codes. Recall the linear code with generator G or check matrix
H is Ccl = Im(G) = ker(H) ≤ Fn2 . Equivalently the check matrix interpretation is the same as
                                       Hx = 0 ⇐⇒ hx, hi ∀h ∈ Im(H)
This interpretation can be generalized to the quantum setting and yields stabilizer codes. Here we give a
quantum formulation of the above definition. Instead of Ccl we define the quantum code C = span{|xi : x ∈
Lecture 4: Quantum error correction                                                                           4-3
Ccl } corresponding to the check matrix H. Instead of h ∈ Im(H) we choose the operator Z h = Z1h1 . . . Znhn .
Then Z h |xi = Z1h1 |x1 i⊗. . .⊗Znhn |xn i = (−1)hh,xi |xi. Since hh, xi = 0 for all h ∈ Im(H) we can equivalently
write
                               |xi ∈ C ⇐⇒ x is inside the + 1 eigenspace of Z h
or in other words
                                     C = {|ψi : Z h |ψi = |ψi ∀h ∈ Im H}
The second condition is the same as saying |ψi is stabilized by Z h for all h ∈ Im H.