Lean, informalized

Nielsen & Chuang · Chapter 7, Quantum computers: physical realization · p. 345

Exercise 7.52 - The exchange coupling of two spins gives the swap gate and, with single qubit gates, a controlled NOT gate

Exchange between two spins gives a swap and a CNOT.

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

Two spins one half, each a qubit, are coupled by the Heisenberg exchange interaction. The exercise is to show that letting the coupling act for a time π\pi exchanges the states of the two qubits, up to a global phase, and that letting it act for half that time gives a square root of the exchange. It also asks for a controlled NOT gate (CNOT) built from two such square roots, with single qubit gates around and between them.

Two Coupled Spins

Each spin has the computational basis |0⟩,|1⟩|0\rangle, |1\rangle. The Pauli matrices σ1,σ2,σ3\sigma_1, \sigma_2, \sigma_3 are the complex 2×22 \times 2 matrices σ1=X=(0110),σ2=Y=(0−ii0),σ3=Z=(100−1)\sigma_1 = X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \qquad \sigma_2 = Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \qquad \sigma_3 = Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}(1) in this basis, the components of the Pauli vector σ→\vec{\sigma}.

The pair has the state space ℂ2⊗ℂ2\mathbb{C}^2 \otimes \mathbb{C}^2, with product basis |00⟩,|01⟩,|10⟩,|11⟩|00\rangle, |01\rangle, |10\rangle, |11\rangle, the first label for spin 1 and the second for spin 2. For spin k=1,2k = 1, 2, the Pauli vector σ→k\vec{\sigma}_k has the matrices σa\sigma_a of (1) acting on spin kk as its components. The isotropic coupling σ→1⋅σ→2\vec{\sigma}_1 \cdot \vec{\sigma}_2 of the two spins is the operator σ→1⋅σ→2=∑a=13σa⊗σa\vec{\sigma}_1 \cdot \vec{\sigma}_2 = \sum_{a=1}^{3} \sigma_a \otimes \sigma_a(2)✦ on this space, the first factor of each term acting on spin 1 and the second on spin 2.

The Heisenberg coupling S→1⋅S→2\vec{S}_1 \cdot \vec{S}_2 of the two spins is the scalar product of their spin vectors S→k=12σ→k\vec{S}_k = \tfrac{1}{2} \vec{\sigma}_k, in units with ℏ=1\hbar = 1: S→1⋅S→2=14σ→1⋅σ→2.\vec{S}_1 \cdot \vec{S}_2 = \tfrac{1}{4} \, \vec{\sigma}_1 \cdot \vec{\sigma}_2 .(3)✦

The exchange evolution U(φ)U(\varphi) of the pair for a time φ\varphi is the operator that the Heisenberg coupling generates as a Hamiltonian: U(φ)=exp⁡(−iφS→1⋅S→2).U(\varphi) = \exp\bigl( -i \varphi \, \vec{S}_1 \cdot \vec{S}_2 \bigr) .(4)✦

The Gates

The swap gate SWAP\mathrm{SWAP} is the operator on the pair that exchanges the states of the two qubits; in the product basis, in the order above, it is the permutation matrix SWAP=(1000001001000001).\mathrm{SWAP} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix} .(5)✦ The square root of swap gate SWAP\sqrt{\mathrm{SWAP}} is the exchange evolution for a time π/2\pi/2: SWAP=U(π/2).\sqrt{\mathrm{SWAP}} = U(\pi/2) .(6)✦

The Hadamard gate HH and the phase gate SS of a qubit are the matrices H=12(111−1),S=(100i)H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, \qquad S = \begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix}(7) in the computational basis, and S†S^\dagger is the adjoint of SS.

The controlled NOT gate CNOT\mathrm{CNOT} of the pair, with spin 1 as control and spin 2 as target, flips the target when the control is in |1⟩|1\rangle: CNOT|a⟩|b⟩=|a⟩|a⊕b⟩,a,b∈{0,1},\mathrm{CNOT} \, |a\rangle |b\rangle = |a\rangle |a \oplus b\rangle , \qquad a, b \in \{0, 1\},(8)✦ with ⊕\oplus addition modulo 2.

The circuit VV of the exercise is the operator on the pair V=(I⊗H)(S⊗S†)SWAP(Z⊗I)SWAP(I⊗H)V = (I \otimes H) \, (S \otimes S^\dagger) \, \sqrt{\mathrm{SWAP}} \, (Z \otimes I) \, \sqrt{\mathrm{SWAP}} \, (I \otimes H)(9)✦ with II the identity on a single qubit; the gate on the right acts first.

The Claim

Theorem 1. The square root of swap gate has the closed form SWAP=eiπ/8(22I⊗I−i22SWAP),\sqrt{\mathrm{SWAP}} = e^{i\pi/8} \Bigl( \tfrac{\sqrt{2}}{2} \, I \otimes I - i \, \tfrac{\sqrt{2}}{2} \, \mathrm{SWAP} \Bigr) ,(10)✦ and its square is the exchange evolution for a time π\pi: (SWAP)2=U(π).\bigl( \sqrt{\mathrm{SWAP}} \bigr)^2 = U(\pi) .(11)✦ The exchange evolution for a time π\pi is the swap gate up to a global phase, U(π)=e−iπ/4SWAP,U(\pi) = e^{-i\pi/4} \, \mathrm{SWAP} ,(12)✦ and the circuit VV is the controlled NOT gate up to the same phase: V=e−iπ/4CNOT.V = e^{-i\pi/4} \, \mathrm{CNOT} .(13)✦

What Is Checked

The claim is stated over the exchange evolution U(φ)U(\varphi) of (4), generated by the Heisenberg coupling (3) built from the Pauli matrices (1), and over the swap and controlled NOT gates and the gates of the circuit (9), each a fixed matrix in the product basis.