Using old codes to find new ones can simplify the task of finding codes, which can otherwise be quite a difficult problem. There are a number of simple mod- ifications we can make to existing codes to produce new codes with different parameters [25, 26].
One trivial change is to perform a permutation of σx, σy, and σz on each qubit. This leaves the distance and size of the code the same, although it may be useful for codes that can correct different numbers ofσx,σy, andσzerrors. A slightly less trivial manipulation is to add a new qubit and a new generator which isσxfor the new qubit. The other generators are tensored with the identity on the new qubit to form the generators of the new code. This makes an [n, k, d] code (degenerate or nondegenerate) into an [n+ 1, k, d] degenerate code: Any operator acting as σy or σz on the new qubit will anticommute with the new generator, and any operator with the form M ⊗σx(n+1) will be equivalent to the operatorM ⊗I. Therefore, an operator must have at least weightdwhen restricted to the firstnqubits to be inN(S)−S.
A less trivial manipulation is to remove the last qubit, converting an [n, k, d] code into an [n−1, k+ 1, d−1] code. To do this, we choose then−kgenerators ofS so that M1 endsσx,M2 ends σz, and M3 throughMn−k end I. We can always do this when d > 1 by picking the first two and then multiplying by combinations of them to make the others end appropriately.1 Then the new
1If the code has been formed by adding a singleσ
x(orσyorσz) generator, as above, we
may not be able to do this for a given qubit, but there will always be at least one qubit for which we can.
M0 1 σx σz σz σx M0 2 σy σx σx σy X1 σx σx σx σx X2 σx I σx σz Z1 σy σz σy I Z2 I σx σz σz
Table 3.5: A [4,2,2] code derived from the [5,1,3] code.
code has a stabilizer formed from the lastn−k−2 generators, dropping M1 andM2. Suppose we have an operatorAon the firstn−1 qubits of weightw that commutes withM3throughMn−k. There are four possibilities, all of which lead to an operator of weight at most w+ 1 that commutes with the original stabilizer:
1. Acommutes with bothM1 andM2.
2. Acommutes withM1, but notM2. ThenA⊗σxn commutes withM1and M2.
3. Acommutes withM2, but notM1. ThenA⊗σzncommutes withM1and M2.
4. A anticommutes with both M1 and M2. Then A⊗σyn commutes with M1andM2.
Since the original code had distanced,wmust be at leastd−1, which is therefore the distance of the new code. The stabilizer hasn−k−2 generators, so the code encodes (n−1)−(n−k−2) =k+ 1 qubits. The newX andZ operators are M1andM2 (in either order), restricted to the firstn−1 qubits. An example of this construction is to remove the last qubit from the [5,1,3] code of figure 4.2 to produce a [4,2,2] code: the generators of the new code are M1 and M3M4, both without the last qubit. The new stabilizer is given in figure 3.5. Note that theZ1 operator is equal to M3Z for the five-qubit code. I have multiplied by M3 so thatZ1 anticommutes withX1.
Another way to make new codes is by pastingtogether old codes. Suppose we have four stabilizersR1, R2, S1, and S2, with R1 ⊂S1 and R2 ⊂S2. Let R1 define an [n1, l1, c1] code, R2 be an [n2, l2, c2] code, S1 be an [n1, k1, d1] code, and S2 be an [n2, k2, d2] code. Then ki < li and ci ≤ di. We require l1−k1=l2−k2 and forS1 andS2to be nondegenerate.2 Let generators ofR1 be{M1, . . . , Mn1−l1}, the generators ofS1be{M1, . . . , Mn1−k1}, the generators
ofR2 be {N1, . . . , Nn2−l2}, and the generators of S2 be {N1, . . . , Nn2−k2}. We
form a new stabilizerS onn1+n2 qubits generated by
{M1⊗I, . . . , Mn1−l1⊗I, I⊗N1, . . . , I⊗Nn2−l2,
Mn1−l1+1⊗Nn2−l2+1, . . . , Mn1−k1⊗Nn2−k2}. (3.29)
2We can actually allowS
1andS2to be degenerate, as long as all the degenerate operators
M1 σx σx σx σx σx σx σx σx I I I I I M2 σz σz σz σz σz σz σz σz I I I I I M3 I I I I I I I I σx σz σz σx I M4 I σx I σx σy σz σy σz I σx σz σz σx M5 I σx σz σy I σx σz σy σx I σx σz σz M6 I σy σx σz σx σz I σy σz σx I σx σz Table 3.6: The thirteen-qubit code formed by pasting together the five- and eight-qubit codes.
The code has (n1 −l1) + (n2−l2) + (li−ki) generators, and therefore en- codes l1+k2 = l2 +k1 qubits. For instance, if S1 is the eight-qubit code and S2 is the five-qubit code, with R1 generated by σxσxσxσxσxσxσxσx and σzσzσzσzσzσzσzσz andR2generated byσxσzσzσxI, we can make the [13,7,3] code given in table 3.6.
In general, the distance of the new code will be min{d1, d2, c1+c2}. This is because an operator acting on just the first n1 qubits can only commute with S if it commutes with S1, an operator acting on the last n2 qubits can only commute withS if it commutes withS2, and an operator acting on both parts must commute with bothR1⊗IandI⊗R2.
Another very useful way of producing new codes is toconcatenatetwo codes to produce a code of greater total distance. Suppose we have an [n1, k, d1] code (stabilizerS1) and we encode each of itsn1qubits again using an [n2,1, d2] code (stabilizerS2). The result is an [n1n2, k, d1d2] code. Its stabilizerS isn1copies ofS2, acting on the physical qubits in blocks of sizen2, plus an additionaln1−k generators corresponding to the generators ofS1. However, these generators are encoded to act on the second code. That is, aσxacting on the first code must be replaced by anX for the second code. For instance, the code resulting from concatenating the five-qubit code with itself has the stabilizer given in table 3.7. The concatenated code has distanced1d2 because operators inN(S)−S must have distance at leastd2 on at least d1 blocks of n2 qubits, so have weight at leastd1d2. Note that it is not strictly necessary to use the same code to encode each qubit ofS1.
There are two possible ways to concatenate whenS2encodes multiple qubits. SupposeS1is an [n1, k1, d1] code andS2is an [n2, k2, d2] code. Further, suppose n1 is a multiple of k2. Then we can encode blocks of S1 of size k2 using S2. This will result in a code usingn1n2/k2qubits to encodek1qubits. It still takes an operator of distance at leastd2 to cause an error on an n2-qubit block, but such an error can cause up tok2 errors onS1, so the resulting code need only have distance dd1/k2ed2. However, the k2 errors that result are not a general set ofk2 errors, so the code may actually be better. SupposeS1 has distance d0
1 (d01 ≥ dd1/k2e) for blocks ofk2 errors, i.e.,d01 such blocks must have errors before the code fails. Then the concatenated code has distanced0
1d2.
Another way to concatenate codes encoding multiple qubits is to add addi- tional blocks ofS1to fill the spaces inS2. That is, we actually encodek2copies
M1 σxσzσzσx I I I I I I I I I I I I I I I I I I I I I M2 I σxσzσzσx I I I I I I I I I I I I I I I I I I I I M3 σx I σxσzσz I I I I I I I I I I I I I I I I I I I I M4 σzσx I σxσz I I I I I I I I I I I I I I I I I I I I M5 I I I I I σxσzσzσx I I I I I I I I I I I I I I I I M6 I I I I I I σxσzσzσx I I I I I I I I I I I I I I I M7 I I I I I σx I σxσzσz I I I I I I I I I I I I I I I M8 I I I I I σzσx I σxσz I I I I I I I I I I I I I I I M9 I I I I I I I I I I σxσzσzσx I I I I I I I I I I I M10 I I I I I I I I I I I σxσzσzσx I I I I I I I I I I M11 I I I I I I I I I I σx I σxσzσz I I I I I I I I I I M12 I I I I I I I I I I σzσx I σxσz I I I I I I I I I I M13 I I I I I I I I I I I I I I I σxσzσzσx I I I I I I M14 I I I I I I I I I I I I I I I I σxσzσzσx I I I I I M15 I I I I I I I I I I I I I I I σx I σxσzσz I I I I I M16 I I I I I I I I I I I I I I I σzσx I σxσz I I I I I M17 I I I I I I I I I I I I I I I I I I I I σxσzσzσx I M18 I I I I I I I I I I I I I I I I I I I I I σxσzσzσx M19 I I I I I I I I I I I I I I I I I I I I σx I σxσzσz M20 I I I I I I I I I I I I I I I I I I I I σzσx I σxσz M21σxσxσxσxσxσzσzσzσzσzσzσzσzσzσzσxσxσxσxσx I I I I I M22 I I I I I σxσxσxσxσxσzσzσzσzσzσzσzσzσzσzσxσxσxσxσx M23σxσxσxσxσx I I I I I σxσxσxσxσxσzσzσzσzσzσzσzσzσzσz M24σzσzσzσzσzσxσxσxσxσx I I I I I σxσxσxσxσxσzσzσzσzσz
ofS1, encoding theith qubit of each copy in the sameS2block. This produces an [n1n2, k1k2, d1d2] code, since any failure of an S2 block only produces one error in eachS1block.