Lean, informalized

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

Exercise 4.21 - Controlled VV, controlled V†V^\dagger and two controlled NOT gates implement C2(V2)C^2(V^2) on three qubits

Five controlled gates build a doubly controlled unitary.

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 circuit acts on three qubits, two controls and a target. For a unitary UU of one qubit, the doubly controlled gate C2(U)C^2(U) applies UU to the target exactly when both controls are |1⟩\lvert 1 \rangle.✦ Figure 4.8 of the book builds it from gates on two qubits, given a unitary VV with V2=UV^2 = U. The second qubit first controls VV on the target. A controlled NOT from the first qubit then flips the second, the second qubit controls V†V^\dagger on the target, and a second controlled NOT undoes the flip. Last, the first qubit controls VV on the target. The exercise is to verify that this circuit implements C2(U)C^2(U).

Qubits and Unitaries

A quantum system SS is a physical object 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 quantum system whose state space is the tensor product of the state spaces of SS and TT.✦ The qubit is the two level quantum system whose state space is ℂ2\mathbb{C}^2, and the three qubits of the circuit form the composite system qubit⊗(qubit⊗qubit)\mathrm{qubit} \otimes (\mathrm{qubit} \otimes \mathrm{qubit}): the first qubit beside the pair of the second qubit and the target.

A pure state ψ\psi of a quantum system SS is a vector ψ\psi of unit norm in the state space of SS.✦ The basis states |0⟩\lvert 0 \rangle and |1⟩\lvert 1 \rangle of the qubit are the pure states whose vectors are the standard basis vectors e0e_0 and e1e_1 of ℂ2\mathbb{C}^2.✦

A unitary UU of a quantum system 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.✦ For two unitaries UU and VV of SS, the composite UVUV, first VV then UU, is again a unitary of SS, and so is the adjoint U†U^\dagger, whose operator is the Hilbert space adjoint of that of UU. The identity evolution of SS is the unitary 11.✦

For unitaries UU of a system SS and VV of a system TT, the product unitary U⊗VU \otimes V is the unitary of S⊗TS \otimes T whose operator is the tensor product of the operators of UU and VV.✦ With the identity evolution in one factor it gives the gate U⊗1U \otimes 1 on the first wires of S⊗TS \otimes T, UU acting on SS and nothing on TT, and the gate 1⊗V1 \otimes V on the last wires.

The Pauli XX gate, the quantum NOT, is the unitary of the qubit whose operator on ℂ2\mathbb{C}^2 is the matrix X=(0110).X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}.(1)✦

Controlled Gates

For a unitary UU of a system SS, the controlled gate C(U)C(U) is the unitary of qubit⊗S\mathrm{qubit} \otimes S, a control qubit and the target SS, with operator C(U)=|0⟩⟨0|⊗1+|1⟩⟨1|⊗U.C(U) = \lvert 0 \rangle\langle 0 \rvert \otimes 1 + \lvert 1 \rangle\langle 1 \rvert \otimes U .(2)✦ The target may itself be a composite system: the controlled NOT from the first of three qubits onto the second is C(X⊗1)C(X \otimes 1), with XX of (1) and X⊗1X \otimes 1 the gate on the first wires of the pair.

For a unitary UU of the qubit, the doubly controlled gate C2(U)C^2(U) is the unitary of qubit⊗(qubit⊗qubit)\mathrm{qubit} \otimes (\mathrm{qubit} \otimes \mathrm{qubit}) in which the first qubit controls the two qubit gate C(U)C(U), itself controlled by the second qubit: C2(U)=C(C(U)).C^2(U) = C\bigl(C(U)\bigr).(3)✦

The Circuit

For a unitary VV of the qubit, the circuit of Figure 4.8 is the unitary W(V)W(V) of qubit⊗(qubit⊗qubit)\mathrm{qubit} \otimes (\mathrm{qubit} \otimes \mathrm{qubit}) W(V)=C(1⊗V)C(X⊗1)(1⊗C(V†))C(X⊗1)(1⊗C(V)),W(V) = C(1 \otimes V)\, C(X \otimes 1)\, \bigl(1 \otimes C(V^\dagger)\bigr)\, C(X \otimes 1)\, \bigl(1 \otimes C(V)\bigr),(4)✦ whose rightmost factor acts first.

The Claim

Theorem 1. Let VV be a unitary of the qubit and V2=VVV^2 = VV the composite of VV with itself. Then the circuit W(V)W(V) is the doubly controlled gate of V2V^2: W(V)=C2(V2).W(V) = C^2(V^2).(5)✦

What Is Checked

The claim is stated over the circuit (4) and the doubly controlled gate (3), unitaries of three qubits built from the controlled gate (2), the Pauli XX, adjoints, composites and products of unitaries.