Lean, informalized

Nielsen & Chuang · Chapter 4, Quantum circuits · p. 188

Exercise 4.35 - A controlled unitary followed by a measurement of its control leaves the same state as the measurement followed by a classically controlled unitary

Measuring the control qubit commutes with the controlled gate.

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 qubit controls a unitary UU acting on a second system SS, the target. In one circuit the controlled gate acts first, applying UU to the target when the control is |1⟩|1\rangle and nothing when it is |0⟩|0\rangle, and the control is then measured in the computational basis. In the other the control is measured first, and its outcome, now a classical bit, decides whether UU is applied to the target. The exercise asks to show that the two circuits cannot be told apart: the measurement of a control qubit commutes with the gate it controls.

A Qubit and a Target

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 quantum systems SS and TT is the system whose state space is the tensor product of their state spaces.✦

A pure state |ψ⟩|\psi\rangle of a system SS is a unit vector in the state space of SS.✦ A state ρ\rho of SS, pure or mixed, is a positive operator of unit trace on the state space of SS.✦

The qubit QQ is the two level system whose state space is ℂ2\mathbb{C}^2 itself.✦ Its computational basis states are the pure states |0⟩=(1,0)|0\rangle = (1,0) and |1⟩=(0,1)|1\rangle = (0,1).✦ The exercise takes place in the composite system Q⊗SQ \otimes S, the control first and the target second.

Gates

A unitary UU of a system SS is an operator on the state space of SS with U†U=UU†=1U^\dagger U = U U^\dagger = 1.✦ A state ρ\rho of SS evolves under a unitary UU of SS as ρ↦UρU†.\rho \mapsto U \rho\, U^\dagger .(1) The identity evolution of SS is the unitary whose operator is the identity 11.✦ 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 the two; with the identity on the first factor it gives the gate 1⊗V1 \otimes V, which acts with VV on the second factor and leaves SS alone.

For a unitary UU of SS, the controlled gate C(U)C(U) is the unitary of Q⊗SQ \otimes S with operator C(U)=|0⟩⟨0|⊗1+|1⟩⟨1|⊗U.C(U) = |0\rangle\langle 0| \otimes 1 + |1\rangle\langle 1| \otimes U .(2)✦ For a unitary UU of SS, the classically controlled gate is the family of unitaries ViV_i of Q⊗SQ \otimes S, one for each outcome i∈{0,1}i \in \{0,1\} of the control: the identity evolution for 00, and UU on the target for 11, V0=1,V1=1⊗U.V_0 = 1, \qquad V_1 = 1 \otimes U .(3)

Measuring the Control

A measurement on a system SS with a finite set of outcomes ι\iota is a family of measurement operators MiM_i on the state space of SS, one for each outcome i∈ιi \in \iota, that satisfies the completeness relation ∑iMi†Mi=1.\sum_i M_i^\dagger M_i = 1 .(4)✦ The effects Ei=Mi†MiE_i = M_i^\dagger M_i of a measurement {Mi}\{M_i\} on SS form the positive operator valued measure (POVM) of the measurement. On a state ρ\rho of SS the outcome ii occurs with the probability given by the Born rule, p(i)=Tr⁡(MiρMi†)=Tr⁡(Eiρ)p(i) = \operatorname{Tr}(M_i \rho M_i^\dagger) = \operatorname{Tr}(E_i \rho), and when it occurs with p(i)≠0p(i) \neq 0 it leaves the system in the state ρi=MiρMi†p(i).\rho_i = \frac{M_i \rho M_i^\dagger}{p(i)} .(5)

The projective measurement of SS in an orthonormal basis {|bi⟩}\{|b_i\rangle\} is the measurement whose operator for the outcome ii is the projector |bi⟩⟨bi||b_i\rangle\langle b_i|.✦ The measurement on the first factor of a composite S⊗TS \otimes T given by a measurement on SS with operators MiM_i is the measurement of S⊗TS \otimes T with the same outcomes and operators Mi⊗1M_i \otimes 1.✦ The measurement of the control qubit is the projective measurement of QQ in its computational basis, made in this way on the first factor of Q⊗SQ \otimes S; its operators are Pi=|i⟩⟨i|⊗1,i=0,1.P_i = |i\rangle\langle i| \otimes 1, \qquad i = 0, 1 .(6)✦

The Claim

The controlled gate does not change the statistics of this measurement: for every state ρ\rho of Q⊗SQ \otimes S and each outcome ii, Tr⁡(PiC(U)ρC(U)†)=Tr⁡(Piρ).\operatorname{Tr}\bigl(P_i\, C(U) \rho\, C(U)^\dagger\bigr) = \operatorname{Tr}(P_i \rho) .(7)✦ Write p(i)p(i) for this common probability.

Theorem 1. Let UU be a unitary of a system SS, let ρ\rho be a state of Q⊗SQ \otimes S, and let ii be an outcome of the measurement of the control qubit with p(i)≠0p(i) \neq 0. Then measuring the control after C(U)C(U) and obtaining ii leaves the same state as measuring it first, obtaining ii, and applying ViV_i: PiC(U)ρC(U)†Pip(i)=ViPiρPip(i)Vi†.\frac{P_i\, C(U) \rho\, C(U)^\dagger P_i}{p(i)} = V_i\, \frac{P_i \rho P_i}{p(i)}\, V_i^\dagger .(8)✦

What Is Checked

The claim (8) is stated over states of the composite system Q⊗SQ \otimes S of the qubit and a target, the controlled gate C(U)C(U) of (2), the measurement of the control qubit (6) with the state (5) after an outcome, and the classically controlled gate ViV_i of (3).

About these constructions the library proves that C(U)C(U) is unitary, and that a product of unitaries, 1⊗U1 \otimes U among them, is unitary. It proves that the projective measurement in a basis and the measurement on the first factor satisfy the completeness relation (4), and that a state evolved by a unitary as in (1), or left by an outcome of nonzero probability as in (5), is again a positive operator of unit trace.