Lean, informalized

Nielsen & Chuang · Chapter 10, Quantum error-correction · p. 472

Exercise 10.57 - Check matrices of the five qubit code and of Shor's code in standard form, generating the same codes

Standard forms of the five qubit and Shor codes.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The Exercise

A stabilizer code on nn qubits with n−kn-k generators has a check matrix with one row for each generator, made of an XX part and a ZZ part of nn columns each. Multiplying one generator by another adds the second row to the first modulo 22 and leaves the code unchanged; renumbering the qubits permutes the columns of both parts alike. With these two moves, Gaussian elimination brings the check matrix to standard form, (IA1A2B0C000DIE),\left(\begin{array}{ccc|ccc} I & A_1 & A_2 & B & 0 & C \\ 0 & 0 & 0 & D & I & E \end{array}\right),(1) where the upper block has rr rows, rr the rank of the XX part, the lower block the other n−k−rn-k-r, and the column blocks of each part have widths rr, n−k−rn-k-r and kk.

The exercise asks for the standard forms of the five qubit code and of Shor’s nine qubit code. The library writes down a standard form for each, the Shor one after a renumbering of the qubits, and states the blocks of its check matrix and that the code is unchanged.

Check Rows

The check bits of a single qubit Pauli aa, one of II, XX, YY and ZZ, are the pair (xa,za)(x_a, z_a) in ℤ2×ℤ2\mathbb{Z}_2 \times \mathbb{Z}_2 of its XX bit xax_a, which is 11 when aa is XX or YY and 00 otherwise, and its ZZ bit zaz_a, which is 11 when aa is YY or ZZ and 00 otherwise.✦

The check row of a string g=g1g2⋯gng = g_1 g_2 \cdots g_n of single qubit Paulis, gkg_k acting on qubit kk, is the row r(g)r(g) of 2n2n bits whose XX part xgx_g and ZZ part zgz_g hold the check bits of g1,…,gng_1, \dots, g_n: r(g)=(xg∣zg),(xg)k=xgk,(zg)k=zgk.r(g) = (x_g \mid z_g), \qquad (x_g)_k = x_{g_k}, \quad (z_g)_k = z_{g_k}.(2)✦

The Five Qubit Code

The five qubit code is the stabilizer code on five qubits with the four generators of Figure 10.12, g1=XZZXI,g2=IXZZX,g3=XIXZZ,g4=ZXIXZ,g_1 = XZZXI, \quad g_2 = IXZZX, \quad g_3 = XIXZZ, \quad g_4 = ZXIXZ,(3)✦ The standard form of the five qubit code has the generators g1′=YZIZY,g2′=IXZZX,g3′=ZZXIX,g4′=ZIZYY,g'_1 = YZIZY, \quad g'_2 = IXZZX, \quad g'_3 = ZZXIX, \quad g'_4 = ZIZYY,(4)✦ on the same five qubits in the same order.

The Shor Code

Write ZjZkZ_j Z_k for ZZ on qubits jj and kk and the identity on the rest, and likewise for products of XX. Shor’s code is the stabilizer code on nine qubits with the eight generators s1=Z1Z2,s2=Z2Z3,s3=Z4Z5,s4=Z5Z6,s5=Z7Z8,s6=Z8Z9,s7=X1X2X3X4X5X6,s8=X4X5X6X7X8X9,\begin{gathered} s_1 = Z_1 Z_2, \quad s_2 = Z_2 Z_3, \quad s_3 = Z_4 Z_5, \\ s_4 = Z_5 Z_6, \quad s_5 = Z_7 Z_8, \quad s_6 = Z_8 Z_9, \\ s_7 = X_1 X_2 X_3 X_4 X_5 X_6, \quad s_8 = X_4 X_5 X_6 X_7 X_8 X_9, \end{gathered}(5)✦

Its standard form needs the qubits renumbered: positions 11 to 99 hold the qubits 1,7,2,3,4,5,8,9,61, 7, 2, 3, 4, 5, 8, 9, 6 in turn, and σ(k)\sigma(k) is the position of qubit kk, so that σ(7)=2\sigma(7) = 2 and σ(6)=9\sigma(6) = 9.✦ In the new numbering the standard form has the generators s1′=XIXXXXIIX,s2′=IXIIXXXXX,s3′=ZIZIIIIII,s4′=ZIIZIIIII,s5′=IIIIZIIIZ,s6′=IIIIIZIIZ,s7′=IZIIIIZII,s8′=IZIIIIIZI,\begin{aligned} s'_1 &= XIXXXXIIX, & s'_2 &= IXIIXXXXX, \\ s'_3 &= ZIZIIIIII, & s'_4 &= ZIIZIIIII, \\ s'_5 &= IIIIZIIIZ, & s'_6 &= IIIIIZIIZ, \\ s'_7 &= IZIIIIZII, & s'_8 &= IZIIIIIZI, \end{aligned}(6)✦ the jjth letter acting at position jj. Put back in the original numbering, si′s'_i becomes the string s̃i\tilde s_i with (s̃i)k=(si′)σ(k),k=1,…,9.(\tilde s_i)_k = (s'_i)_{\sigma(k)}, \qquad k = 1, \dots, 9.(7)✦

The Claim

Theorem 1. Let g1,…,g4g_1, \dots, g_4 be the generators (3) of the five qubit code and g1′,…,g4′g'_1, \dots, g'_4 those of its standard form (4). Then the check rows of the two lists span the same subspace of ℤ210\mathbb{Z}_2^{10}, span⁡ℤ2{r(g1′),…,r(g4′)}=span⁡ℤ2{r(g1),…,r(g4)},\operatorname{span}_{\mathbb{Z}_2}\{r(g'_1), \dots, r(g'_4)\} = \operatorname{span}_{\mathbb{Z}_2}\{r(g_1), \dots, r(g_4)\},(8)✦ and on the first four qubits the XX parts of g1′,…,g4′g'_1, \dots, g'_4 form the 4×44 \times 4 identity: (xgi′)j=δij,1≤i,j≤4.(x_{g'_i})_j = \delta_{ij}, \qquad 1 \le i, j \le 4.(9)✦

Theorem 2. Let s1,…,s8s_1, \dots, s_8 be the generators (5) of Shor’s code, s1′,…,s8′s'_1, \dots, s'_8 those of its standard form (6) in the new numbering of the qubits, and s̃1,…,s̃8\tilde s_1, \dots, \tilde s_8 the same strings in the original numbering (7). Then s1′s'_1 and s2′s'_2 have no ZZ part, zs1′=zs2′=0,z_{s'_1} = z_{s'_2} = 0,(10)✦ and at the first two positions their XX parts form the 2×22 \times 2 identity, (xsi′)j=δij,1≤i,j≤2.(x_{s'_i})_j = \delta_{ij}, \qquad 1 \le i, j \le 2.(11)✦ The other six have no XX part, xsi′=0,3≤i≤8,x_{s'_i} = 0, \qquad 3 \le i \le 8,(12)✦ and at positions 33 to 88 their ZZ parts form the 6×66 \times 6 identity, (zsi′)j=δij,3≤i,j≤8.(z_{s'_i})_j = \delta_{ij}, \qquad 3 \le i, j \le 8.(13)✦ The check rows of s̃1,…,s̃8\tilde s_1, \dots, \tilde s_8 span the same subspace of ℤ218\mathbb{Z}_2^{18} as those of s1,…,s8s_1, \dots, s_8: span⁡ℤ2{r(s̃1),…,r(s̃8)}=span⁡ℤ2{r(s1),…,r(s8)}.\operatorname{span}_{\mathbb{Z}_2}\{r(\tilde s_1), \dots, r(\tilde s_8)\} = \operatorname{span}_{\mathbb{Z}_2}\{r(s_1), \dots, r(s_8)\}.(14)✦

What Is Checked

The claims are stated over the check rows (2) of fixed strings of Paulis, so each block is an equality between bits of ℤ2\mathbb{Z}_2, and the sameness of two codes is the equality of the spaces their check rows span.