Lean, informalized

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

Exercise 10.70 - Phase errors on the ancilla of a measurement reach its outcome and not the data

A phase flip on the ancilla changes only the readout.

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

A unitary MM acting on some data is measured with an ancilla qubit. The ancilla, prepared in |0⟩|0\rangle, passes through a Hadamard gate, controls MM on the data, passes through a second Hadamard and is read out in the computational basis. In the fault tolerant version the ancilla is a cat state of three qubits, each of which controls a copy of the gate on its own block of data, and the result is read from the sign of the cat state under X⊗X⊗XX \otimes X \otimes X.

The exercise is about phase flips ZZ on the ancilla qubits. The data is untouched.

Qubits and Gates

A quantum system SS is a physical system whose state space is a finite dimensional complex Hilbert space.✦ 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.✦ A pure state |ψ⟩|\psi\rangle of SS is a unit vector in the state space of SS✦, and a nonzero vector vv of that space has the normalized pure state v/‖v‖v / \lVert v \rVert.✦ For pure states |ψ⟩|\psi\rangle of SS and |φ⟩|\varphi\rangle of TT, the product state |ψ⟩⊗|φ⟩|\psi\rangle \otimes |\varphi\rangle is the pure state of S⊗TS \otimes T whose vector is the tensor product of the two.✦

The qubit QQ is the two level system whose state space is ℂ2\mathbb{C}^2.✦ Its basis states |0⟩|0\rangle and |1⟩|1\rangle are the pure states with the standard basis vectors e0e_0 and e1e_1.✦

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✦; it carries a pure state |ψ⟩|\psi\rangle of SS to the pure state U|ψ⟩U|\psi\rangle.✦ For two unitaries UU and VV of SS, UVUV is the unitary of SS that applies VV first and then UU✦, and the identity 11 is a unitary of every system.✦ 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 theirs.✦ The gate U⊗1U \otimes 1 applies UU to the first factor alone.✦

The gates of the qubit come from the Pauli matrices and the Hadamard matrix, X=(0110),Y=(0−ii0),Z=(100−1),H=12(111−1).X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \quad Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}, \quad H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}.(1) The Hadamard HH and the phase flip ZZ are the unitaries of the qubit with these matrices. For a unitary UU of SS, the controlled gate C(U)C(U) is the unitary of Q⊗SQ \otimes S, a control qubit and the target 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.(2)✦

The Measurement Circuit

For a unitary MM of SS, the measurement circuit WZ(M)W_Z(M) with a phase error is the unitary of Q⊗SQ \otimes S that applies a Hadamard on the ancilla, the controlled gate C(M)C(M), a phase flip on the ancilla and a second Hadamard on the ancilla, in that order: WZ(M)=(H⊗1)(Z⊗1)C(M)(H⊗1).W_Z(M) = (H \otimes 1)\,(Z \otimes 1)\,C(M)\,(H \otimes 1).(3)✦

Theorem 1. Let MM be a unitary of a system SS and |x⟩|x\rangle a pure state of SS that MM leaves fixed, M|x⟩=|x⟩M|x\rangle = |x\rangle. Then WZ(M)(|0⟩⊗|x⟩)=|1⟩⊗|x⟩.W_Z(M)\,\bigl(|0\rangle \otimes |x\rangle\bigr) = |1\rangle \otimes |x\rangle.(4)✦

The Cat State

The three qubit register RR is the composite system Q⊗(Q⊗Q)Q \otimes (Q \otimes Q).✦ For bits q1q_1, q2q_2, q3q_3, its basis state |q1q2q3⟩|q_1 q_2 q_3\rangle is the product state |q1⟩⊗(|q2⟩⊗|q3⟩)|q_1\rangle \otimes (|q_2\rangle \otimes |q_3\rangle).✦ For a bit σ\sigma, the cat state of the register is the normalization of the vector |000⟩+(−1)σ|111⟩|000\rangle + (-1)^\sigma |111\rangle, |catσ⟩=12(|000⟩+(−1)σ|111⟩).|\mathrm{cat}_\sigma\rangle = \frac{1}{\sqrt{2}} \bigl( |000\rangle + (-1)^\sigma |111\rangle \bigr).(5)✦

An observable AA of SS is a self adjoint operator on the state space of SS.✦ 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 observables AA of SS and BB of TT, the observable A⊗BA \otimes B of S⊗TS \otimes T has for its operator the tensor product of theirs.✦ For a real vector n→\vec{n} in three dimensions with components nxn_x, nyn_y, nzn_z, the Pauli observable n→⋅σ→\vec{n} \cdot \vec{\sigma} of the qubit is the observable with matrix nxX+nyY+nzZn_x X + n_y Y + n_z Z✦, and the observable XX is the Pauli observable of the unit vector nˆ=(1,0,0)\hat{n} = (1, 0, 0).✦ The block observable X⊗X⊗XX \otimes X \otimes X of the register measures XX on each of its three qubits.✦

The phase flip ZiZ_i on qubit ii of the register, for i=1,2,3i = 1, 2, 3, is the unitary of RR that applies ZZ to that qubit and the identity to the other two.✦

Theorem 2. Let σ\sigma be a bit and ii one of the three qubits of the register. Then (X⊗X⊗X)Zi|catσ⟩=(−1)σ+1Zi|catσ⟩.(X \otimes X \otimes X)\, Z_i |\mathrm{cat}_\sigma\rangle = (-1)^{\sigma + 1}\, Z_i |\mathrm{cat}_\sigma\rangle .(6)✦

The Transversal Coupling

In the fault tolerant measurement each ancilla qubit sits in a block with its own data system. For a unitary M′M' of a system DD, the transversal coupling is the unitary of three such blocks, (Q⊗D)⊗((Q⊗D)⊗(Q⊗D))(Q \otimes D) \otimes \bigl((Q \otimes D) \otimes (Q \otimes D)\bigr), in which each ancilla qubit controls M′M' on the data of its block: T(M′)=C(M′)⊗C(M′)⊗C(M′).T(M') = C(M') \otimes C(M') \otimes C(M').(7)✦ For i=1,2,3i = 1, 2, 3, the phase error EiE_i on ancilla qubit ii is the unitary of (Q⊗D)⊗((Q⊗D)⊗(Q⊗D))(Q \otimes D) \otimes \bigl((Q \otimes D) \otimes (Q \otimes D)\bigr) that applies ZZ to that qubit and the identity everywhere else: E1=(Z⊗1)⊗1⊗1,E2=1⊗(Z⊗1)⊗1,E3=1⊗1⊗(Z⊗1).E_1 = (Z \otimes 1) \otimes 1 \otimes 1, \qquad E_2 = 1 \otimes (Z \otimes 1) \otimes 1, \qquad E_3 = 1 \otimes 1 \otimes (Z \otimes 1).(8)

Theorem 3. Let M′M' be a unitary of a system DD and ii one of the three ancilla qubits. Then T(M′)Ei=EiT(M′).T(M')\, E_i = E_i\, T(M').(9)✦

What Is Checked

The claim (4) is stated over the circuit WZ(M)W_Z(M), built from the gates HH and ZZ and the controlled gate C(M)C(M); the claim (6) over the cat states, the block observable and the phase flips ZiZ_i of the register; and the claim (9) over the transversal coupling and the phase errors EiE_i.

The library proves that the vector |000⟩+(−1)σ|111⟩|000\rangle + (-1)^\sigma |111\rangle is nonzero for both values of σ\sigma, which makes its normalization, the cat state |catσ⟩|\mathrm{cat}_\sigma\rangle, a pure state.✦