Lean, informalized

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

Exercise 10.74 - The five measuring blocks and the one state of five qubits they all leave alone

Preparing the encoded zero of the five 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

The five qubit code stores one qubit in five. The exercise is to prepare its encoded |0⟩|0\rangle, written |0L⟩|0_L\rangle, by measurement. Five Pauli strings on the five qubits, the four generators of the code and the logical Z‾\bar Z, are measured one after another, each with an ancilla qubit of its own that starts in |0⟩|0\rangle and is read at the end of its circuit.

Systems and Gates

A quantum system SS is a physical object whose state space is a finite dimensional complex Hilbert space✦, and the composite system S⊗TS \otimes T of two systems has as state space the tensor product of theirs.✦ The qudit with dd levels is the system with state space ℂd\mathbb{C}^d.✦ The qubit is the qudit with two levels, and a register of nn qubits is the qudit with 2n2^n levels. The circuit here acts on an ancilla qubit and a register of five qubits, the composite system of the qubit with the qudit of 3232 levels.

A pure state |ψ⟩|\psi\rangle of SS is a unit vector in the state space of SS, determined physically up to a global phase✦; the basis states |0⟩|0\rangle and |1⟩|1\rangle of the qubit are the standard basis vectors of ℂ2\mathbb{C}^2.✦ For pure states |ψ⟩|\psi\rangle of SS and |φ⟩|\varphi\rangle of TT, the product |ψ⟩⊗|φ⟩|\psi\rangle \otimes |\varphi\rangle is the pure state of S⊗TS \otimes T whose vector is the tensor product of the two.✦ A state ρ\rho of SS is a positive operator of unit trace on the state space of SS✦, and a pure state |ψ⟩|\psi\rangle determines the state |ψ⟩⟨ψ||\psi\rangle\langle\psi|, the projector onto its vector.✦

A unitary UU of SS is an operator on the state space of SS with U†U=UU†=1U^\dagger U = U U^\dagger = 1✦, and it carries a pure state |ψ⟩|\psi\rangle to the pure state U|ψ⟩U|\psi\rangle.✦ Two unitaries UU and VV of SS compose to the unitary UVUV, first VV and then UU.✦ The product unitary U⊗VU \otimes V of a unitary UU of SS and a unitary VV of TT is the unitary of S⊗TS \otimes T whose operator is the tensor product of theirs✦; taking for VV the identity evolution 11 of TT gives U⊗1U \otimes 1, the gate UU on the first factor alone.✦ The Hadamard HH is the unitary of the qubit with matrix 12(111−1)\tfrac{1}{\sqrt 2}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}.✦ For a unitary UU of SS, the controlled gate C(U)C(U) is the unitary of the composite of a control qubit with SS given by C(U)=|0⟩⟨0|⊗1+|1⟩⟨1|⊗U.C(U) = |0\rangle\langle 0| \otimes 1 + |1\rangle\langle 1| \otimes U.(1)✦

Pauli Strings

The Pauli matrices are the four complex 2×22 \times 2 matrices σ0=I,σ1=X=(0110),σ2=Y=(0−ii0),σ3=Z=(100−1).\sigma_0 = I, \quad \sigma_1 = X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad \sigma_2 = Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \quad \sigma_3 = Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}.(2)✦ For a choice s=(s1,…,sn)s = (s_1, \dots, s_n) of one Pauli matrix for each of nn qubits, the Pauli string Ps=σs1⊗⋯⊗σsnP_s = \sigma_{s_1} \otimes \cdots \otimes \sigma_{s_n} is the operator on the register whose matrix, with rows and columns labelled by bit strings xx and yy, or by the binary numbers they spell on the 2n2^n levels, has the entries (Ps)xy=∏k=1n(σsk)xkyk.(P_s)_{xy} = \prod_{k=1}^{n} (\sigma_{s_k})_{x_k y_k}.(3)✦ A string is written as a word, XZZXIXZZXI for X⊗Z⊗Z⊗X⊗IX \otimes Z \otimes Z \otimes X \otimes I.

An observable AA on SS is a self adjoint operator on the state space of SS, A†=AA^\dagger = A.✦ A pure state |ψ⟩|\psi\rangle of SS is an eigenstate of AA with eigenvalue μ\mu, a real number, when A|ψ⟩=μ|ψ⟩A|\psi\rangle = \mu|\psi\rangle.✦ For a real coefficient cc, the Pauli string observable cPsc\,P_s is the observable on the register that acts as cc times the Pauli string, a Hermitian matrix.✦ With c=1c = 1 it squares to the identity, Ps2=1.P_s^2 = 1.(4)✦

The Preparation Circuit

For a unitary UU of a system SS, the measurement circuit of UU is the unitary (H⊗1)C(U)(H⊗1)(H \otimes 1)\, C(U)\, (H \otimes 1) of the composite of a control qubit with SS.✦ The syndrome measuring block of a Pauli string ss is the measurement circuit of PsP_s, a unitary of an ancilla qubit and the register.✦

The four generators of the five qubit code and its logical Z‾\bar Z are the Pauli strings g1=XZZXI,g2=IXZZX,g3=XIXZZ,g4=ZXIXZ,g5=Z‾=ZZZZZ,g_1 = XZZXI, \quad g_2 = IXZZX, \quad g_3 = XIXZZ, \quad g_4 = ZXIXZ, \quad g_5 = \bar Z = ZZZZZ,(5)✦ each generator the one before it shifted cyclically one place to the right.

The preparation circuit is the sequence of five blocks B1,…,B5B_1, \dots, B_5 applied one after another, where for i=1,…,5i = 1, \dots, 5 the block BiB_i is the syndrome measuring block of gig_i, Bi=(H⊗1)C(Pgi)(H⊗1).B_i = (H \otimes 1)\, C(P_{g_i})\, (H \otimes 1).(6)✦

An encoded |0⟩|0\rangle of the five qubit code is a pure state |ψ⟩|\psi\rangle of the register of five qubits that is an eigenstate with eigenvalue 11 of each of the five operators PgiP_{g_i}: Pgi|ψ⟩=|ψ⟩,i=1,…,5.P_{g_i}\, |\psi\rangle = |\psi\rangle, \qquad i = 1, \dots, 5.(7)✦

The Claim

Theorem 1. Let ii be one of 1,…,51, \dots, 5, let bb be a bit, and let |ψ⟩|\psi\rangle be a pure state of the register that is an eigenstate of PgiP_{g_i} with eigenvalue (−1)b(-1)^b. Then the iith block, applied to the ancilla in |0⟩|0\rangle and the register in |ψ⟩|\psi\rangle, gives Bi(|0⟩⊗|ψ⟩)=|b⟩⊗|ψ⟩.B_i \bigl(|0\rangle \otimes |\psi\rangle\bigr) = |b\rangle \otimes |\psi\rangle.(8)✦ Let |ψ⟩|\psi\rangle be an encoded |0⟩|0\rangle. Then for every block Bi(|0⟩⊗|ψ⟩)=|0⟩⊗|ψ⟩,i=1,…,5.B_i \bigl(|0\rangle \otimes |\psi\rangle\bigr) = |0\rangle \otimes |\psi\rangle, \qquad i = 1, \dots, 5.(9)✦ There is an encoded |0⟩|0\rangle: a pure state |0L⟩|0_L\rangle of the register with Pg1|0L⟩=Pg2|0L⟩=⋯=Pg5|0L⟩=|0L⟩.P_{g_1} |0_L\rangle = P_{g_2} |0_L\rangle = \cdots = P_{g_5} |0_L\rangle = |0_L\rangle.(10)✦ If |ψ⟩|\psi\rangle and |φ⟩|\varphi\rangle are both encoded |0⟩|0\rangle states, they are the same state: |ψ⟩⟨ψ|=|φ⟩⟨φ|.|\psi\rangle\langle\psi| = |\varphi\rangle\langle\varphi|.(11)✦

What Is Checked

The claim is stated over the five blocks BiB_i of (6), with their Hadamard gates on the ancilla and their controlled gates C(Pgi)C(P_{g_i}), and over pure states of the register: the eigenstates of the observables PgiP_{g_i}, the encoded |0⟩|0\rangle of (7), their products with the basis states of the ancilla, and the states |ψ⟩⟨ψ||\psi\rangle\langle\psi| they determine.