Lean, informalized

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

Exercise 10.63 - A unitary preserving the Steane code and swapping X‾\bar X and Z‾\bar Z sends logical zero and one to encoded plus and minus with equal phases

Exchanging X‾\bar X and Z‾\bar Z while preserving the code is the encoded Hadamard.

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 operators X‾\bar X and Z‾\bar Z act on the encoded qubit as XX and ZZ act on a bare one, with the logical states |0L⟩|0_L\rangle and |1L⟩|1_L\rangle in place of |0⟩|0\rangle and |1⟩|1\rangle. On a bare qubit the Hadamard gate exchanges XX and ZZ by conjugation, and the exercise is the converse on the code. Let UU be a unitary on the seven qubits that keeps U|0L⟩U|0_L\rangle and U|1L⟩U|1_L\rangle in the code, with UZ‾U†=X‾U\bar Z U^\dagger = \bar X and UX‾U†=Z‾U\bar X U^\dagger = \bar Z. Up to a global phase, UU then does to |0L⟩|0_L\rangle and |1L⟩|1_L\rangle what the Hadamard gate does to |0⟩|0\rangle and |1⟩|1\rangle, which it sends to (|0⟩+|1⟩)/2(|0\rangle + |1\rangle)/\sqrt 2 and (|0⟩−|1⟩)/2(|0\rangle - |1\rangle)/\sqrt 2.

A Register of Qubits

A quantum system SS is a physical system whose state space is a finite dimensional complex Hilbert space.✦ For a finite group GG, the group system ℂ[G]\mathbb{C}[G] is the quantum system whose state space is the space of complex functions on GG, with one basis vector |g⟩|g\rangle for each element gg of GG.✦ The register of nn qubits is the group system of the group ℤ2n\mathbb{Z}_2^n of bit vectors of length nn.✦ Its computational basis is the orthonormal basis {|w⟩}\{|w\rangle\} indexed by the bit vectors ww, in which |w⟩|w\rangle is the function equal to 11 at ww and 00 elsewhere.✦

A pure state |ψ⟩|\psi\rangle of a system SS is a unit vector in the state space of SS, fixed physically up to a global phase.✦ A state ρ\rho of SS is a positive operator of unit trace on the state space of SS✦, and a pure state |ψ⟩|\psi\rangle gives the state |ψ⟩⟨ψ||\psi\rangle\langle\psi|, the projector onto its vector.✦ The overlap ⟨ψ|φ⟩\langle\psi|\varphi\rangle of two pure states of SS is the inner product of their vectors, conjugate linear in the first.✦

A unitary UU of SS is an operator on the state space of SS with U†U=UU†=1U^\dagger U = UU^\dagger = 1.✦ The adjoint U†U^\dagger of a unitary UU of SS is the Hilbert space adjoint of UU, and the product UVUV of two unitaries UU and VV of SS applies VV first and then UU. A unitary UU carries a pure state |ψ⟩|\psi\rangle to the pure state U|ψ⟩U|\psi\rangle.✦

On the register, a bit vector vv gives the bit flip string Xv=Xv1⊗⋯⊗XvnX^v = X^{v_1}\otimes\cdots\otimes X^{v_n}, the unitary that applies the Pauli operator XX to exactly the qubits where vv has a 11, and a bit vector uu gives the phase flip string Zu=Zu1⊗⋯⊗ZunZ^u = Z^{u_1}\otimes\cdots\otimes Z^{u_n}, built from the Pauli operator ZZ and diagonal in the computational basis: Xv|w⟩=|w+v⟩,Zu|w⟩=(−1)u⋅w|w⟩,X^v|w\rangle = |w + v\rangle, \qquad Z^u|w\rangle = (-1)^{u\cdot w}\,|w\rangle,(1) with the sum and the dot product u⋅wu\cdot w taken modulo 22.

The Steane Code

For a binary linear code C2C_2 of length nn and a bit vector xx of length nn, the coset state |x+C2⟩|x + C_2\rangle is the pure state of the register of nn qubits 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.(2)✦

The Steane code takes for C2C_2 the dual of a Hamming code CC of length 77, given by its parity check matrix.✦ The parity check matrix of the Hamming code is the 3×73 \times 7 matrix over ℤ2\mathbb{Z}_2 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}.(3)✦ 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 C2=C⟂C_2 = C^\perp is the linear code of length 77 over ℤ2\mathbb{Z}_2 whose codewords are the words orthogonal to every codeword of CC; it has dimension 33 and eight codewords.

The logical zero |0L⟩|0_L\rangle and the logical one |1L⟩|1_L\rangle of the Steane code are the coset states of C2C_2 at 00000000000000 and 11111111111111, each a sum of eight basis states of the register of seven qubits with amplitude 1/81/\sqrt 8: |0L⟩=|0000000+C2⟩=18∑y∈C2|y⟩,|1L⟩=|1111111+C2⟩=18∑y∈C2|1111111+y⟩.|0_L\rangle = |0000000 + C_2\rangle = \frac{1}{\sqrt 8}\sum_{y\in C_2}|y\rangle, \qquad |1_L\rangle = |1111111 + C_2\rangle = \frac{1}{\sqrt 8}\sum_{y\in C_2}|1111111 + y\rangle.(4) A pure state |ψ⟩|\psi\rangle of the register of seven qubits lies in the Steane code when it is a combination of the two logical states: |ψ⟩=a|0L⟩+b|1L⟩for some a,b∈ℂ.|\psi\rangle = a|0_L\rangle + b|1_L\rangle \quad \text{for some } a, b \in \mathbb{C}.(5)✦

The logical operators X‾\bar X and Z‾\bar Z of the Steane code are the flip strings (1) of the all ones word 𝟏=1111111\mathbf{1} = 1111111, with XiX_i and ZiZ_i the Pauli operators on the iith qubit: X‾=X𝟏=X1X2X3X4X5X6X7,Z‾=Z𝟏=Z1Z2Z3Z4Z5Z6Z7.\bar X = X^{\mathbf 1} = X_1X_2X_3X_4X_5X_6X_7, \qquad \bar Z = Z^{\mathbf 1} = Z_1Z_2Z_3Z_4Z_5Z_6Z_7.(6)

For orthogonal pure states |ψ⟩|\psi\rangle and |φ⟩|\varphi\rangle of a system and complex amplitudes aa and bb with |a|2+|b|2=1|a|^2 + |b|^2 = 1, the superposition a|ψ⟩+b|φ⟩a|\psi\rangle + b|\varphi\rangle is the pure state of the same system with that vector.✦ The encoded plus state |+L⟩|+_L\rangle and minus state |−L⟩|-_L\rangle of the Steane code are the superpositions of its logical states |0L⟩|0_L\rangle and |1L⟩|1_L\rangle with amplitudes 1/21/\sqrt 2 and 1/21/\sqrt 2, respectively 1/21/\sqrt 2 and −1/2-1/\sqrt 2: |+L⟩=12(|0L⟩+|1L⟩),|+_L\rangle = \frac{1}{\sqrt 2}\bigl(|0_L\rangle + |1_L\rangle\bigr),(7)✦ |−L⟩=12(|0L⟩−|1L⟩).|-_L\rangle = \frac{1}{\sqrt 2}\bigl(|0_L\rangle - |1_L\rangle\bigr).(8)✦

The Claim

Theorem 1. Let UU be a unitary of the register of seven qubits that exchanges the logical operators of the Steane code by conjugation, UZ‾U†=X‾U\bar Z U^\dagger = \bar X and UX‾U†=Z‾U\bar X U^\dagger = \bar Z, and suppose that U|0L⟩U|0_L\rangle and U|1L⟩U|1_L\rangle lie in the Steane code. Then U|0L⟩⟨0L|U†=|+L⟩⟨+L|,U|1L⟩⟨1L|U†=|−L⟩⟨−L|,⟨0L|U†|+L⟩=⟨1L|U†|−L⟩.\begin{gathered} U|0_L\rangle\langle 0_L|U^\dagger = |+_L\rangle\langle +_L|, \qquad U|1_L\rangle\langle 1_L|U^\dagger = |-_L\rangle\langle -_L|, \\ \langle 0_L|U^\dagger|+_L\rangle = \langle 1_L|U^\dagger|-_L\rangle. \end{gathered}(9)✦

What Is Checked

The claim is stated over a unitary UU of the register of seven qubits and the constructions of the Steane code: the logical operators (6), the logical states (4) built on the dual Hamming code, the membership (5), and the encoded states (7) and (8), compared through their projectors and their overlaps.

The library proves that the two logical states are orthogonal, ⟨0L|1L⟩=0\langle 0_L|1_L\rangle = 0✦, which makes |+L⟩|+_L\rangle and |−L⟩|-_L\rangle unit vectors, and that every coset state (2) has unit norm. It proves that the bit flip string, the isometry |w⟩↦|w+v⟩|w\rangle \mapsto |w + v\rangle of the state space onto itself, is unitary, and so are the phase flip string, the adjoint U†U^\dagger and the product UVUV.