Lean, informalized

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

Exercise 10.4 - The three qubit bit flip code with its syndrome read in the computational basis, and its minimum fidelity

Eight projectors diagnose a bit flip but spoil superpositions.

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 bit flip code stores the qubit a|0⟩+b|1⟩a|0\rangle + b|1\rangle as a|000⟩+b|111⟩a|000\rangle + b|111\rangle. A flip of one of the three qubits is found by a syndrome measurement and undone by flipping that qubit back. Here the syndrome is measured by the eight projectors |x⟩⟨x||x\rangle\langle x| onto the computational basis states of the three qubits, and the outcome has to tell which error occurred: no flip, or a flip of qubit jj for j=1,2,3j = 1, 2, 3.

The recovery built on this measurement returns the codewords |000⟩|000\rangle and |111⟩|111\rangle unchanged, but not their superpositions; the quantity asked for is the least, over all encoded states, of the fidelity between an encoded state and its recovered state.

A Quantum System

A quantum system SS is given by its state space, a finite dimensional complex Hilbert space.✦ A pure state |ψ⟩|\psi\rangle of SS is a unit vector in the state space of SS✦, and a state ρ\rho of SS is a positive operator of unit trace on that space.✦ Each pure state |ψ⟩|\psi\rangle determines the state |ψ⟩⟨ψ||\psi\rangle\langle\psi|, the projector onto |ψ⟩|\psi\rangle.✦ A unitary UU of SS is an operator on the state space of SS with U†U=UU†=IU^\dagger U = U U^\dagger = I✦; it carries a pure state |ψ⟩|\psi\rangle to the pure state U|ψ⟩U|\psi\rangle.✦

The qudit with dd levels is the quantum system whose state space is ℂd\mathbb{C}^d with its standard inner product.✦ The computational basis of the qudit with dd levels is the orthonormal basis of standard unit vectors |0⟩,…,|d−1⟩|0\rangle, \dots, |d-1\rangle of ℂd\mathbb{C}^d, each of them a pure state of the qudit.✦ Three qubits form the qudit with eight levels: writing a label in binary, x=4x1+2x2+x3x = 4x_1 + 2x_2 + x_3, the basis state |x⟩|x\rangle is |x1x2x3⟩|x_1x_2x_3\rangle, so that |0⟩=|000⟩|0\rangle = |000\rangle and |7⟩=|111⟩|7\rangle = |111\rangle. For a permutation σ\sigma of the labels, the basis permutation gate UσU_\sigma is the unitary of the qudit that carries each |x⟩|x\rangle to |σ(x)⟩|\sigma(x)\rangle.✦

The Code and Its Errors

The logical states of the code are |0L⟩=|000⟩,|0_L\rangle = |000\rangle,(1)✦ |1L⟩=|111⟩,|1_L\rangle = |111\rangle,(2)✦ and for complex amplitudes aa and bb with |a|2+|b|2=1|a|^2 + |b|^2 = 1 the encoded state is the pure state |ψ⟩=a|0L⟩+b|1L⟩.|\psi\rangle = a|0_L\rangle + b|1_L\rangle.(3)✦

For a three bit label mm, adding mm bit by bit modulo two, x↦x⊕mx \mapsto x \oplus m, permutes the eight labels.✦ The error masks are m0=000m_0 = 000, m1=100m_1 = 100, m2=010m_2 = 010 and m3=001m_3 = 001✦, and the single qubit bit flip error EjE_j, the identity for j=0j = 0 and the flip of qubit jj for j=1,2,3j = 1, 2, 3, is the basis permutation gate of x↦x⊕mjx \mapsto x \oplus m_j: Ej|x⟩=|x⊕mj⟩,j=0,1,2,3.E_j|x\rangle = |x \oplus m_j\rangle, \qquad j = 0, 1, 2, 3.(4)✦

The syndrome s(x)∈{0,1,2,3}s(x) \in \{0, 1, 2, 3\} of a label xx is the qubit on which xx disagrees with the other two, or 00 when all three bits agree: s(000)=s(111)=0,s(100)=s(011)=1,s(010)=s(101)=2,s(001)=s(110)=3.s(000) = s(111) = 0, \quad s(100) = s(011) = 1, \quad s(010) = s(101) = 2, \quad s(001) = s(110) = 3.(5)✦

Measurement and Recovery

A measurement on SS with a finite set of outcomes is a family of measurement operators MiM_i on the state space of SS, one for each outcome ii, satisfying the completeness relation ∑iMi†Mi=I\sum_i M_i^\dagger M_i = I.✦ Performed on a state ρ\rho, it gives outcome ii with the Born probability p(i)=Tr⁡(MiρMi†),p(i) = \operatorname{Tr}\bigl(M_i \rho M_i^\dagger\bigr),(6)✦ the probability that the positive operator valued measure (POVM) with elements Mi†MiM_i^\dagger M_i assigns to ρ\rho. When the outcome is not read, the measurement leaves SS in the state ∑iMiρMi†\sum_i M_i \rho M_i^\dagger.✦

The projective measurement in an orthonormal basis {|bi⟩}\{|b_i\rangle\} of SS is the measurement whose operator for outcome ii is the projector |bi⟩⟨bi||b_i\rangle\langle b_i|.✦ Taken in the computational basis of three qubits, it is the measurement of the exercise, with outcomes x=0,…,7x = 0, \dots, 7 and the eight projectors Px=|x⟩⟨x|.P_x = |x\rangle\langle x|.(7)✦

A recovery by projective measurement and conditional unitaries on SS consists of a syndrome measurement {Mi}\{M_i\} whose operators are orthogonal projectors, and a unitary correction WiW_i of SS for each outcome ii, applied when ii is found.✦ Composing each MiM_i with its correction gives the measurement with operators WiMiW_i M_i✦, and the recovery takes a state ρ\rho to the state this measurement leaves when its outcome is not read: ℛ(ρ)=∑iWiMiρMi†Wi†.\mathcal{R}(\rho) = \sum_i W_i M_i \rho M_i^\dagger W_i^\dagger.(8)✦ For three qubits the recovery measures the projectors PxP_x and corrects outcome xx by the flip Es(x)E_{s(x)} that its syndrome names, so that (8) becomes ℛ(ρ)=∑x=07Es(x)PxρPxEs(x)†.\mathcal{R}(\rho) = \sum_{x=0}^{7} E_{s(x)} P_x \rho P_x E_{s(x)}^\dagger.(9)✦

The Claim

The fidelity of two states ρ\rho and σ\sigma of a system is the nonnegative number F(ρ,σ)=Tr⁡ρσρ,F(\rho, \sigma) = \operatorname{Tr}\sqrt{\sqrt{\rho}\,\sigma\sqrt{\rho}},(10)✦ with the square roots of positive operators taken on their eigenvalues.

The measurement acts on a codeword after one of the errors EjE_j; the recovery acts on the encoded states themselves, with no error before it.

Theorem 1. Let ℛ\mathcal{R} be the recovery (9). For each error EjE_j, j=0,1,2,3j = 0, 1, 2, 3, and each codeword |c⟩|c\rangle, either |000⟩|000\rangle or |111⟩|111\rangle, there is an outcome yy with syndrome s(y)=js(y) = j that the measurement of the projectors PxP_x on Ej|c⟩E_j|c\rangle gives with certainty: Tr⁡(PxEj|c⟩⟨c|Ej†Px)=δxy,x=0,…,7.\operatorname{Tr}\bigl(P_x E_j|c\rangle\langle c|E_j^\dagger P_x\bigr) = \delta_{xy}, \qquad x = 0, \dots, 7.(11)✦ The recovery leaves both logical states unchanged: ℛ(|0L⟩⟨0L|)=|0L⟩⟨0L|,\mathcal{R}\bigl(|0_L\rangle\langle 0_L|\bigr) = |0_L\rangle\langle 0_L|,(12)✦ ℛ(|1L⟩⟨1L|)=|1L⟩⟨1L|.\mathcal{R}\bigl(|1_L\rangle\langle 1_L|\bigr) = |1_L\rangle\langle 1_L|.(13)✦ If the amplitudes aa and bb are both nonzero, it changes the encoded state (3): ℛ(|ψ⟩⟨ψ|)≠|ψ⟩⟨ψ|.\mathcal{R}\bigl(|\psi\rangle\langle\psi|\bigr) \neq |\psi\rangle\langle\psi|.(14)✦ Over all amplitudes with |a|2+|b|2=1|a|^2 + |b|^2 = 1, the fidelity of the encoded state with its recovered state has the least value 1/21/\sqrt{2}, attained by some encoded state: min|a|2+|b|2=1F(|ψ⟩⟨ψ|,ℛ(|ψ⟩⟨ψ|))=12.\min_{|a|^2 + |b|^2 = 1} F\bigl(|\psi\rangle\langle\psi|, \mathcal{R}(|\psi\rangle\langle\psi|)\bigr) = \frac{1}{\sqrt{2}}.(15)✦

What Is Checked

The claim is stated over the recovery (9), built from the computational basis measurement of three qubits and the corrections Es(x)E_{s(x)}; over the Born probabilities (6) of that measurement on the corrupted codewords Ej|c⟩E_j|c\rangle; and over the fidelity (10) of each encoded state (3) with its recovered state.

About these constructions the library proves that the projectors |bi⟩⟨bi||b_i\rangle\langle b_i| of an orthonormal basis satisfy the completeness relation, and that each PxP_x is an orthogonal projector, so the syndrome measurement is projective. Composing with unitaries keeps the completeness relation, ∑i(WiMi)†WiMi=I\sum_i (W_i M_i)^\dagger W_i M_i = I, and so ℛ(ρ)\mathcal{R}(\rho) is again a positive operator of unit trace, a state of the three qubits.