Lean, informalized

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

Exercise 10.48 - The products of ZZ and of XX over all nine qubits act on the codewords as the Pauli XX and ZZ

The logical XX and ZZ of Shor’s nine qubit code.

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

Shor’s code stores one qubit in nine, grouped in three blocks of three. Its codeword |0L⟩|0_L\rangle puts every block in the cat state |000⟩+|111⟩|000\rangle + |111\rangle, its codeword |1L⟩|1_L\rangle puts every block in |000⟩−|111⟩|000\rangle - |111\rangle, and errors are diagnosed by measuring eight syndrome observables g1,…,g8g_1, \dots, g_8: products of ZZ on two adjacent qubits of a block, and products of XX over two adjacent blocks. The exercise takes the product of XX over all nine qubits as Z‾\bar Z and the product of ZZ over all nine as X‾\bar X, and asks to show that the two act on the encoded qubit as its Pauli ZZ and XX.

The Nine Qubit Register

A quantum system SS is a physical system whose state space is a finite dimensional complex Hilbert space✦, and any such space HH is the state space of a system.✦ The qubit is the system whose state space is ℂ2\mathbb{C}^2✦; its basis states |0⟩|0\rangle and |1⟩|1\rangle are the standard basis vectors of ℂ2\mathbb{C}^2.✦ The composite system S⊗TS \otimes T of systems SS and TT is the system whose state space is the tensor product of their state spaces.✦

A pure state ψ\psi of SS is a unit vector |ψ⟩|\psi\rangle in the state space of SS.✦ For a nonzero vector vv in the state space of SS, the normalized pure state of vv is the pure state of SS with vector v/‖v‖v/\lVert v\rVert.✦ For pure states ψ\psi of SS and φ\varphi of TT, the product ψ⊗φ\psi \otimes \varphi is the pure state of S⊗TS \otimes T with vector |ψ⟩⊗|φ⟩|\psi\rangle \otimes |\varphi\rangle.✦

The three qubit register is the composite of three qubits.✦ Its computational basis states are the products |q1q2q3⟩=|q1⟩⊗|q2⟩⊗|q3⟩|q_1q_2q_3\rangle = |q_1\rangle \otimes |q_2\rangle \otimes |q_3\rangle for bits q1q_1, q2q_2 and q3q_3.✦ The nine qubit Shor register is the composite of three copies of the three qubit register, one for each block, so that its qubits fall into the blocks q1q2q3q_1q_2q_3, q4q5q6q_4q_5q_6 and q7q8q9q_7q_8q_9.✦

The Codewords

For a bit σ\sigma, the block cat vector is the vector |000⟩+(−1)σ|111⟩|000\rangle + (-1)^\sigma|111\rangle in the state space of the three qubit register✦, and the block cat state is the pure state obtained by normalizing it, (|000⟩+(−1)σ|111⟩)/2(|000\rangle + (-1)^\sigma|111\rangle)/\sqrt{2}.✦ For bits σ1\sigma_1, σ2\sigma_2 and σ3\sigma_3, the product of three cat blocks is the pure state of the Shor register that puts block bb in the block cat state of the bit σb\sigma_b.✦ The Shor codeword |sL⟩|s_L\rangle, for a bit ss, is the product of three cat blocks that all carry the bit ss: |sL⟩=122(|000⟩+(−1)s|111⟩)⊗(|000⟩+(−1)s|111⟩)⊗(|000⟩+(−1)s|111⟩).|s_L\rangle = \frac{1}{2\sqrt{2}}\,\bigl(|000\rangle + (-1)^s|111\rangle\bigr) \otimes \bigl(|000\rangle + (-1)^s|111\rangle\bigr) \otimes \bigl(|000\rangle + (-1)^s|111\rangle\bigr).(1)✦

Observables and Unitaries

An observable AA on a system SS is a self adjoint operator on the state space of SS, A†=AA^\dagger = A.✦ A pure state ψ\psi of SS is an eigenstate of AA with eigenvalue μ\mu, a real number, when A|ψ⟩=μ|ψ⟩A|\psi\rangle = \mu|\psi\rangle.✦ The identity observable II on SS is the observable whose operator is the identity✦, and for observables AA on SS and BB on TT the tensor product A⊗BA \otimes B is the observable on S⊗TS \otimes T whose operator is the tensor product of their operators.✦

A unitary UU of a system SS is an operator on the state space of SS with U†U=UU†=1U^\dagger U = UU^\dagger = 1.✦ Applied to a pure state ψ\psi of SS, the unitary UU gives the pure state with vector U|ψ⟩U|\psi\rangle.✦ For unitaries UU of SS and VV of TT, the product unitary U⊗VU \otimes V is the unitary of S⊗TS \otimes T whose operator is the tensor product of their operators.✦

The Pauli matrices are X=(0110),Y=(0−ii0),Z=(100−1),X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \qquad Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \qquad Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix},(2) and for a real vector n→=(nx,ny,nz)\vec n = (n_x, n_y, n_z) the matrix n→⋅σ→\vec n \cdot \vec\sigma is nxX+nyY+nzZn_x X + n_y Y + n_z Z.✦ For such n→\vec n, the Pauli observable n→⋅σ→\vec n \cdot \vec\sigma is the observable on the qubit whose operator is the matrix n→⋅σ→\vec n \cdot \vec\sigma✦; the observables XX and ZZ are those for the unit vectors nˆ=(1,0,0)\hat n = (1, 0, 0) and nˆ=(0,0,1)\hat n = (0, 0, 1). The Pauli ZZ gate, the phase flip, is the unitary of the qubit whose operator is the matrix ZZ.✦

The Logical Operators and the Syndromes

Write XjX_j and ZjZ_j for XX and ZZ acting on qubit jj of a register and as the identity on its other qubits. On the three qubit register, the block observable X1X2X3=X⊗X⊗XX_1X_2X_3 = X \otimes X \otimes X is the observable that acts as XX on each qubit✦, and the block gate Z1Z2Z3=Z⊗Z⊗ZZ_1Z_2Z_3 = Z \otimes Z \otimes Z is the unitary that applies the Pauli ZZ gate to each qubit.✦ The bit flip code stores a qubit in the three qubit register, and its two syndrome observables are Z1Z2=Z⊗Z⊗IZ_1Z_2 = Z \otimes Z \otimes I, which compares the first qubit with the second✦, and Z2Z3=I⊗Z⊗ZZ_2Z_3 = I \otimes Z \otimes Z, which compares the second with the third.✦

On the Shor register, the logical operator X‾\bar X is the product unitary of three block gates✦, and the logical operator Z‾\bar Z is the tensor product of three block observables: X‾=(Z⊗Z⊗Z)⊗3=Z1Z2⋯Z9,Z‾=(X⊗X⊗X)⊗3=X1X2⋯X9.\bar X = (Z \otimes Z \otimes Z)^{\otimes 3} = Z_1Z_2 \cdots Z_9, \qquad \bar Z = (X \otimes X \otimes X)^{\otimes 3} = X_1X_2 \cdots X_9.(3)✦ The Shor code has eight syndrome observables g1,…,g8g_1, \dots, g_8: the two bit flip syndromes in each block, and the block observable X⊗X⊗XX \otimes X \otimes X on each pair of adjacent blocks, with the identity observable on the remaining block: g1=Z1Z2,g2=Z2Z3,g3=Z4Z5,g4=Z5Z6,g5=Z7Z8,g6=Z8Z9,g7=X1X2⋯X6,g8=X4X5⋯X9.\begin{gathered} g_1 = Z_1Z_2, \quad g_2 = Z_2Z_3, \quad g_3 = Z_4Z_5, \quad g_4 = Z_5Z_6, \quad g_5 = Z_7Z_8, \quad g_6 = Z_8Z_9, \\ g_7 = X_1X_2 \cdots X_6, \qquad g_8 = X_4X_5 \cdots X_9. \end{gathered}(4)

The Claim

Theorem 1. Let |0L⟩|0_L\rangle and |1L⟩|1_L\rangle be the Shor codewords (1), X‾\bar X and Z‾\bar Z the logical operators (3) and g1,…,g8g_1, \dots, g_8 the syndrome observables (4). For each bit ss, with ⊕\oplus the sum modulo two, X‾|sL⟩=|(s⊕1)L⟩,\bar X |s_L\rangle = |(s \oplus 1)_L\rangle,(5)✦ and |sL⟩|s_L\rangle is an eigenstate of Z‾\bar Z: Z‾|sL⟩=(−1)s|sL⟩.\bar Z |s_L\rangle = (-1)^s |s_L\rangle.(6)✦ The two logical operators anticommute, X‾Z‾=−Z‾X‾,\bar X \bar Z = -\bar Z \bar X,(7)✦ the operator X‾\bar X commutes with each syndrome observable, X‾g1=g1X‾,\bar X g_1 = g_1 \bar X,(8)✦ X‾g2=g2X‾,\bar X g_2 = g_2 \bar X,(9)✦ X‾g3=g3X‾,\bar X g_3 = g_3 \bar X,(10)✦ X‾g4=g4X‾,\bar X g_4 = g_4 \bar X,(11)✦ X‾g5=g5X‾,\bar X g_5 = g_5 \bar X,(12)✦ X‾g6=g6X‾,\bar X g_6 = g_6 \bar X,(13)✦ X‾g7=g7X‾,\bar X g_7 = g_7 \bar X,(14)✦ X‾g8=g8X‾,\bar X g_8 = g_8 \bar X,(15)✦ and so does the observable Z‾\bar Z, Z‾g1=g1Z‾,\bar Z g_1 = g_1 \bar Z,(16)✦ Z‾g2=g2Z‾,\bar Z g_2 = g_2 \bar Z,(17)✦ Z‾g3=g3Z‾,\bar Z g_3 = g_3 \bar Z,(18)✦ Z‾g4=g4Z‾,\bar Z g_4 = g_4 \bar Z,(19)✦ Z‾g5=g5Z‾,\bar Z g_5 = g_5 \bar Z,(20)✦ Z‾g6=g6Z‾,\bar Z g_6 = g_6 \bar Z,(21)✦ Z‾g7=g7Z‾,\bar Z g_7 = g_7 \bar Z,(22)✦ Z‾g8=g8Z‾.\bar Z g_8 = g_8 \bar Z.(23)✦

What Is Checked

The claim is stated over the codewords |sL⟩|s_L\rangle of the nine qubit Shor register in (1), and over the logical operators and syndrome observables of (3) and (4), all built by tensor products from the Pauli operators and the identity on single qubits.

About these constructions the library proves that the block cat vector |000⟩+(−1)σ|111⟩|000\rangle + (-1)^\sigma|111\rangle is nonzero for either bit σ\sigma✦, so that it normalizes to a pure state, and that a product of pure states and the image of a pure state under a unitary are again unit vectors. It proves that the matrix n→⋅σ→\vec n \cdot \vec\sigma is Hermitian for real n→\vec n and the matrix ZZ unitary, and that tensor products preserve both properties, so that X‾\bar X is a unitary and Z‾\bar Z and g1,…,g8g_1, \dots, g_8 are observables.