Lean, informalized

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

Exercise 10.52 - How the bit flip on every qubit acts on the logical states of the Steane code

Flipping all seven qubits exchanges the two Steane logical states.

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 Steane code stores one qubit in seven. Its logical basis states |0L⟩|0_L\rangle and |1L⟩|1_L\rangle are equal superpositions of computational basis states of seven qubits, built from the Hamming code. The exercise is to show that flipping every one of the seven qubits acts on the code as the logical XX: it takes |0L⟩|0_L\rangle to |1L⟩|1_L\rangle and |1L⟩|1_L\rangle back to |0L⟩|0_L\rangle.

A Quantum System

A quantum system SS is a physical object whose state space is a finite dimensional complex Hilbert space.✦ A pure state |ψ⟩|\psi\rangle of SS is a unit vector in the state space of SS, ⟨ψ|ψ⟩=1\langle \psi | \psi \rangle = 1, determined physically up to a global phase.✦ A unitary UU of SS, a closed system evolution of SS, is an operator on the state space of SS with U†U=UU†=1U^\dagger U = U U^\dagger = 1.✦ It carries a pure state |ψ⟩|\psi\rangle of SS to the pure state U|ψ⟩U|\psi\rangle.✦

Each finite dimensional complex Hilbert space HH defines a quantum system, the one whose state space is HH.✦ For a finite set GG, taking for HH the space of complex functions on GG gives the system ℂ[G]\mathbb{C}[G], with one computational basis vector |g⟩|g\rangle for each element gg of GG.✦

Seven Qubits

For a finite set ι\iota of nn elements, the register of qubits indexed by ι\iota is the system ℂ[ℤ2ι]\mathbb{C}[\mathbb{Z}_2^\iota] of the group of bit vectors ww indexed by ι\iota with entries in ℤ2\mathbb{Z}_2: nn qubits, one for each element of ι\iota.✦ The computational basis {|w⟩}\{|w\rangle\} of the register indexed by ι\iota is the orthonormal basis of the state space of the register indexed by the bit vectors ww, where |w⟩|w\rangle is the vector with a single entry 11 at position ww.✦ The Steane code lives on the register indexed by {1,…,7}\{1, \ldots, 7\}, with basis states |w⟩|w\rangle for w∈ℤ27w \in \mathbb{Z}_2^7.

For a bit vector vv indexed by ι\iota, the bit flip string XvX^v is the unitary on the register that applies the bit flip XX, which exchanges |0⟩|0\rangle and |1⟩|1\rangle, to exactly the qubits where vv has a 11: Xv=Xv1⊗⋯⊗Xvn,Xv|w⟩=|w+v⟩,X^v = X^{v_1} \otimes \cdots \otimes X^{v_n}, \qquad X^v |w\rangle = |w + v\rangle ,(1)✦ the sum of bit vectors taken bitwise modulo 22.

The Steane Code

The parity check matrix HH of the Hamming code is the matrix over ℤ2\mathbb{Z}_2 with three rows and seven columns whose jjth column is the binary numeral of jj, most significant bit on top: H=(000111101100111010101).H = \begin{pmatrix} 0&0&0&1&1&1&1 \\ 0&1&1&0&0&1&1 \\ 1&0&1&0&1&0&1 \end{pmatrix}.(2)✦ The Hamming code CC is the linear code of length 77 over ℤ2\mathbb{Z}_2 whose codewords are the words xx with Hx=0Hx = 0. The dual Hamming code C2C_2 of the Hamming code CC is the linear code of length 77 over ℤ2\mathbb{Z}_2 consisting of the words whose inner product modulo 22 with every codeword of CC vanishes; it has dimension 33 and eight codewords.✦

For a binary linear code C2C_2 and a bit vector xx, the coset state |x+C2⟩|x + C_2\rangle is the pure state of the register that superposes with equal amplitudes the basis states |x+y⟩|x + y\rangle, one for each codeword yy of C2C_2: |x+C2⟩=1|C2|∑y∈C2|x+y⟩.|x + C_2\rangle = \frac{1}{\sqrt{|C_2|}} \sum_{y \in C_2} |x + y\rangle .(3)✦

The Steane logical states |0L⟩|0_L\rangle and |1L⟩|1_L\rangle of the register of seven qubits are the coset states of the dual Hamming code C2C_2 at the zero word and at the word of all ones: |0L⟩=|0000000+C2⟩=18∑y∈C2|y⟩,|0_L\rangle = |0000000 + C_2\rangle = \frac{1}{\sqrt 8} \sum_{y \in C_2} |y\rangle ,(4)✦ |1L⟩=|1111111+C2⟩=18∑y∈C2|1111111+y⟩.|1_L\rangle = |1111111 + C_2\rangle = \frac{1}{\sqrt 8} \sum_{y \in C_2} |1111111 + y\rangle .(5)✦

The logical X‾\bar X of the Steane code is the bit flip string of the word of all ones, a bit flip on each of the seven qubits: X‾=X1111111=X⊗7.\bar X = X^{1111111} = X^{\otimes 7} .(6)✦

The Claim

Theorem 1. The logical X‾\bar X of the Steane code exchanges its two logical states: X‾|0L⟩=|1L⟩\bar X |0_L\rangle = |1_L\rangle(7)✦ and X‾|1L⟩=|0L⟩.\bar X |1_L\rangle = |0_L\rangle .(8)✦

What Is Checked

The claim is stated over the Steane logical states (4) and (5), coset states of the dual Hamming code built from the parity check matrix (2), and over the logical X‾\bar X, a unitary of the register of seven qubits applied to them as pure states.

The library proves that the coset state |x+C2⟩|x + C_2\rangle has unit norm for every binary linear code C2C_2 and every bit vector xx. The map |w⟩↦|w+v⟩|w\rangle \mapsto |w + v\rangle is a linear isometry of the state space of the register onto itself, and a linear isometry of a state space onto itself is a unitary✦; XvX^v is the unitary so obtained.