Lean, informalized

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

Exercise 10.8 - Three qubits encoding one, against a phase flip on any single qubit

The phase flip code satisfies the error correction conditions.

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

The three qubit phase flip code encodes one qubit into three, with the logical states |0L⟩=|+++⟩|0_L\rangle = |{+}{+}{+}\rangle and |1L⟩=|−−−⟩|1_L\rangle = |{-}{-}{-}\rangle. The errors in view are no error at all and a phase flip ZZ on one of the three qubits, the set {I,Z1,Z2,Z3}\{I, Z_1, Z_2, Z_3\}. The exercise is to verify that the code satisfies the quantum error correction conditions for this set of errors.

In the library the code is given by its projector PP and the errors by four operators E0,…,E3E_0, \dots, E_3, all on the state space of three qubits.

Three Qubits

A quantum system SS is a physical system whose state space is a finite dimensional complex Hilbert space.✦ A pure state ψ\psi of SS is a unit vector in the state space of SS, ‖ψ‖=1\lVert \psi \rVert = 1, determined physically up to a global phase.✦ The composite system S⊗TS \otimes T of two systems SS and TT is the system whose state space is the tensor product of their state spaces.✦

The qubit QQ is the two level system whose state space is ℂ2\mathbb{C}^2.✦ Write |0⟩|0\rangle and |1⟩|1\rangle for the standard basis vectors of ℂ2\mathbb{C}^2. The states |+⟩|+\rangle and |−⟩|-\rangle of the qubit QQ are the pure states of QQ with the vectors |+⟩=12(11)=|0⟩+|1⟩2,|−⟩=12(1−1)=|0⟩−|1⟩2,|+\rangle = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 \\ 1 \end{pmatrix} = \frac{|0\rangle + |1\rangle}{\sqrt{2}}, \qquad |-\rangle = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 \\ -1 \end{pmatrix} = \frac{|0\rangle - |1\rangle}{\sqrt{2}},(1) the eigenvectors of the Pauli operator XX with eigenvalues +1+1 and −1-1. Three qubits form the composite system Q⊗(Q⊗Q)Q \otimes (Q \otimes Q), on which the code below is defined.

The Code

Label the two eigenvectors of XX by s∈{0,1}s \in \{0, 1\}: |x0⟩=|+⟩,|x1⟩=|−⟩.|x_0\rangle = |+\rangle, \qquad |x_1\rangle = |-\rangle.(2)✦ For labels s1,s2,s3∈{0,1}s_1, s_2, s_3 \in \{0, 1\}, the vector |xs1xs2xs3⟩|x_{s_1} x_{s_2} x_{s_3}\rangle of the three qubits is the product |xs1xs2xs3⟩=|xs1⟩⊗(|xs2⟩⊗|xs3⟩).|x_{s_1} x_{s_2} x_{s_3}\rangle = |x_{s_1}\rangle \otimes \bigl( |x_{s_2}\rangle \otimes |x_{s_3}\rangle \bigr).(3)✦ The codewords of the phase flip code are the two such vectors with all three labels equal, |aL⟩=|xaxaxa⟩,a∈{0,1}.|a_L\rangle = |x_a x_a x_a\rangle, \qquad a \in \{0, 1\}.(4)✦ The code projector PP of the phase flip code is the operator on the state space of the three qubits that sums the projectors onto the two codewords: P=∑a∈{0,1}|aL⟩⟨aL|.P = \sum_{a \in \{0, 1\}} |a_L\rangle \langle a_L|.(5)✦

Phase Flips

A unitary UU of a system SS is a closed system evolution of SS: an operator on the state space of SS with U†U=UU†=IU^\dagger U = U U^\dagger = I.✦ The identity II of SS is the identity operator on the state space of SS, and it is a unitary of SS. 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 the two.✦ A unitary of a system of qubits is also called a gate. With V=IV = I the product unitary is the gate U⊗IU \otimes I, which acts on the first factor alone; with U=IU = I it is the gate I⊗VI \otimes V, which acts on the last.

The phase flip ZZ is the unitary of the qubit whose matrix is the Pauli matrix Z=(100−1).Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}.(6)✦ Built from it, the four error gates are unitaries of the three qubit system, I,Z1=Z⊗I,Z2=I⊗(Z⊗I),Z3=I⊗(I⊗Z),I, \qquad Z_1 = Z \otimes I, \qquad Z_2 = I \otimes (Z \otimes I), \qquad Z_3 = I \otimes (I \otimes Z),(7)✦ where each II is the identity of the qubits it stands for. The error operators are these four, labelled in this order: E0=I,E1=Z1,E2=Z2,E3=Z3.E_0 = I, \qquad E_1 = Z_1, \qquad E_2 = Z_2, \qquad E_3 = Z_3.(8)✦

The Claim

An operator PP on the state space of a system, together with a family of operators EiE_i on the same space, satisfies the quantum error correction conditions when there is a Hermitian complex matrix α\alpha, with rows and columns labelled like the EiE_i, such that PEi†EjP=αijPfor all i,j.P E_i^\dagger E_j P = \alpha_{ij} P \quad \text{for all } i, j.(9)✦

Theorem 1. Let PP be the code projector (5) of the phase flip code and E0,…,E3E_0, \dots, E_3 the error operators (8). Then PP and the EiE_i satisfy the quantum error correction conditions, with a Hermitian 4×44 \times 4 matrix α\alpha as in (9), PEi†EjP=αijP,i,j∈{0,1,2,3}.P E_i^\dagger E_j P = \alpha_{ij} P, \qquad i, j \in \{0, 1, 2, 3\}.(10)✦

What Is Checked

The claim is stated over the code projector PP of (5), built from the codewords |+++⟩|{+}{+}{+}\rangle and |−−−⟩|{-}{-}{-}\rangle, and over the error operators of (8), the operators of the gates II, Z1Z_1, Z2Z_2, Z3Z_3 on three qubits.

Of these constructions the library proves that |+⟩|+\rangle and |−⟩|-\rangle have unit norm and that the matrix of ZZ is unitary. It also proves that the tensor product of two unitaries is unitary, so each error gate is a unitary of the three qubit system.