Lean, informalized

Nielsen & Chuang · Chapter 6, Quantum search algorithms · p. 260

Exercise 6.10 - A step time for which repeated search steps land exactly on the marked state

Two alternating evolutions find the marked item exactly.

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 list holds N≥2N \ge 2 items, one of which, xx, is marked. The search starts in the uniform superposition |ψ⟩|\psi\rangle of all NN items and repeats a single step: evolve for a time Δt\Delta t under the Hamiltonian |x⟩⟨x||x\rangle\langle x|, then for the same time under |ψ⟩⟨ψ||\psi\rangle\langle\psi|. The exercise asks for a step time Δt\Delta t for which some number jj of steps, of order N\sqrt N, carries |ψ⟩|\psi\rangle to |x⟩|x\rangle exactly, so that a measurement then finds xx with certainty.

Both Hamiltonians act in the plane spanned by |x⟩|x\rangle and the uniform superposition of the N−1N-1 unmarked items. Taken as a qubit, a two level system with basis vectors |0⟩|0\rangle and |1⟩|1\rangle, this plane has |0⟩|0\rangle for the marked item and |1⟩|1\rangle for the superposition of the unmarked ones.

A Quantum System

A quantum system SS is described by its state space, a finite dimensional complex Hilbert space.✦ The qubit is the two level system whose state space is ℂ2\mathbb{C}^2, with basis vectors |0⟩|0\rangle and |1⟩|1\rangle.✦

A pure state |ψ⟩|\psi\rangle of SS is a unit vector in the state space of SS.✦ A state ρ\rho of SS, also called a density operator of SS, is a positive operator of unit trace on the state space of SS.✦ A pure state |ψ⟩|\psi\rangle of SS determines the state |ψ⟩⟨ψ||\psi\rangle\langle\psi| of SS, the rank one projector onto |ψ⟩|\psi\rangle.✦

For real angles θ\theta and ϕ\phi, the pure state |ψ(θ,ϕ)⟩|\psi(\theta,\phi)\rangle of the qubit with polar angle θ\theta and azimuth ϕ\phi is the vector of ℂ2\mathbb{C}^2 with components cos⁡(θ/2)\cos(\theta/2) and eiϕsin⁡(θ/2)e^{i\phi}\sin(\theta/2), |ψ(θ,ϕ)⟩=cos⁡θ2|0⟩+eiϕsin⁡θ2|1⟩.|\psi(\theta,\phi)\rangle = \cos\frac{\theta}{2}\,|0\rangle + e^{i\phi}\sin\frac{\theta}{2}\,|1\rangle .(1)✦ At θ=ϕ=0\theta = \phi = 0 it is |0⟩|0\rangle.

Hamiltonians and Evolution

An observable AA on SS is a self adjoint operator on the state space of SS, A†=AA^\dagger = A.✦ The projector Hamiltonian of a pure state |χ⟩|\chi\rangle of SS is the observable |χ⟩⟨χ||\chi\rangle\langle\chi| on SS, the projector onto |χ⟩|\chi\rangle.✦

A unitary UU of SS is an operator on the state space of SS with U†U=UU†=1U^\dagger U = UU^\dagger = 1.✦ It carries a pure state |ψ⟩|\psi\rangle of SS to the pure state U|ψ⟩U|\psi\rangle.✦ Two unitaries UU and VV of SS compose to the unitary UVUV of SS, VV first and then UU.✦

The propagator of an observable HH of SS, with Planck’s constant ℏ\hbar, from time t1t_1 to time t2t_2 is the unitary U(t1,t2)=exp⁡[−iH(t2−t1)/ℏ],U(t_1,t_2) = \exp\bigl[-iH(t_2-t_1)/\hbar\bigr],(2)✦ the evolution of SS under the Hamiltonian HH over that interval.

For real θ\theta and Δt\Delta t, the search step U(Δt)U(\Delta t) is the unitary of the qubit made of the propagators (2) from 00 to Δt\Delta t, with ℏ=1\hbar = 1, of the projector Hamiltonians of |0⟩|0\rangle and of |ψ(θ,0)⟩|\psi(\theta,0)\rangle, the second after the first: U(Δt)=e−iΔt|ψ(θ,0)⟩⟨ψ(θ,0)|e−iΔt|0⟩⟨0|.U(\Delta t) = e^{-i\Delta t\,|\psi(\theta,0)\rangle\langle\psi(\theta,0)|}\, e^{-i\Delta t\,|0\rangle\langle 0|} .(3)✦

The Claim

With cos⁡θ=2/N−1\cos\theta = 2/N - 1, the state |ψ(θ,0)⟩|\psi(\theta,0)\rangle has weight cos⁡2(θ/2)=(1+cos⁡θ)/2=1/N\cos^2(\theta/2) = (1+\cos\theta)/2 = 1/N on |0⟩|0\rangle, the weight of the marked item in the uniform superposition. It stands for |ψ⟩|\psi\rangle, and (3) is the step of the exercise in units with ℏ=1\hbar = 1.

Theorem 1. Let N≥2N \ge 2 be an integer and θ\theta a real number with cos⁡θ=2/N−1\cos\theta = 2/N - 1. Then there are a step time Δt\Delta t with 0<Δt≤π0 < \Delta t \le \pi and a whole number of steps jj with 1≤j≤(π/4+1)N1 \le j \le (\pi/4 + 1)\sqrt N such that jj search steps (3), applied to the pure state |ψ(θ,0)⟩|\psi(\theta,0)\rangle, give a pure state |ψj⟩|\psi_j\rangle whose state is that of |0⟩|0\rangle: |ψj⟩⟨ψj|=|0⟩⟨0|,|ψj⟩=U(Δt)j|ψ(θ,0)⟩.|\psi_j\rangle\langle\psi_j| = |0\rangle\langle 0| , \qquad |\psi_j\rangle = U(\Delta t)^j\,|\psi(\theta,0)\rangle .(4)✦

What Is Checked

The claim is stated over the search step (3) on the qubit, applied jj times to the pure state |ψ(θ,0)⟩|\psi(\theta,0)\rangle, and over the comparison of the result with |0⟩|0\rangle as states.

The library proves the facts these constructions rest on. The vector (1) has squared norm cos⁡2(θ/2)+sin⁡2(θ/2)=1\cos^2(\theta/2) + \sin^2(\theta/2) = 1, since |eiϕ|=1|e^{i\phi}| = 1. The projector onto a state vector is self adjoint, the propagator (2) of an observable is unitary, and so is the composite of two unitaries.