Lean, informalized

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

Exercise 6.12 - Evolution under the alternative search Hamiltonian, and its simulation by symmetric Trotter steps

A Hamiltonian that finds the marked state in fixed time.

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 quantum search looks for one marked level xx of a system with dd levels. It starts in the uniform superposition |ψ⟩|\psi\rangle of the dd basis states, whose overlap with the marked state |x⟩|x\rangle is only 1/d1/\sqrt{d}. The exercise lets the system evolve under the Hamiltonian H=|x⟩⟨ψ|+|ψ⟩⟨x|H = |x\rangle\langle\psi| + |\psi\rangle\langle x|, which couples the start state to the solution. Evolution under HH for the time π/2\pi/2 then turns |ψ⟩|\psi\rangle into |x⟩|x\rangle, however large dd is.✦ The evolution can also be simulated: HH splits into three terms built from projectors, and mm symmetric products of their evolutions over a short time step Δt\Delta t follow the evolution under HH with an error of order mΔt3m\Delta t^3.✦

The library states both parts for the qudit with any number of levels d≥1d \ge 1 and any marked level xx.

A Quantum System

A quantum system is a physical system whose state space is a finite dimensional complex Hilbert space.✦ A pure state |φ⟩|\varphi\rangle of a system SS is a unit vector in the state space of SS, determined physically up to a global phase.✦ A state ρ\rho of SS is a positive operator of unit trace on the state space of SS.✦ Each pure state |φ⟩|\varphi\rangle gives the state |φ⟩⟨φ||\varphi\rangle\langle\varphi|, the projector onto its vector.✦

The qudit with dd levels is the quantum system whose state space is ℂd\mathbb{C}^d with its standard inner product.✦ For a level ii among 0,…,d−10, \ldots, d-1, the computational basis state |i⟩|i\rangle is the pure state of the qudit whose vector has entry 11 at ii and 00 elsewhere.✦ For d≥1d \ge 1, the uniform superposition |ψ⟩|\psi\rangle is the pure state of the qudit in which every basis state enters with the same amplitude, |ψ⟩=1d∑k=0d−1|k⟩.|\psi\rangle = \frac{1}{\sqrt{d}} \sum_{k=0}^{d-1} |k\rangle.(1)✦

Evolution Under a Hamiltonian

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.✦ It describes a closed evolution of SS and carries a pure state |φ⟩|\varphi\rangle to the pure state U|φ⟩U|\varphi\rangle. An observable AA of SS is a self adjoint operator on the state space of SS, A†=AA^\dagger = A.✦ Taken as the Hamiltonian, an observable HH has as its propagator from time t1t_1 to time t2t_2 the unitary U(t1,t2)=exp⁡[−iH(t2−t1)/ℏ],U(t_1, t_2) = \exp\bigl[-iH(t_2 - t_1)/\hbar\bigr],(2)✦ which solves the Schrödinger equation, |φ(t2)⟩=U(t1,t2)|φ(t1)⟩|\varphi(t_2)\rangle = U(t_1, t_2)|\varphi(t_1)\rangle. In both claims ℏ=1\hbar = 1 and t1=0t_1 = 0, and evolution for a time tt is e−iHte^{-iHt}.

The coupling Hamiltonian of two pure states |a⟩|a\rangle and |b⟩|b\rangle of a system SS is the observable |a⟩⟨b|+|b⟩⟨a||a\rangle\langle b| + |b\rangle\langle a| on SS.✦ On the qudit with d≥1d \ge 1 levels, the alternative search Hamiltonian for the marked level xx is the coupling Hamiltonian of the basis state |x⟩|x\rangle and the uniform superposition (1): H=|x⟩⟨ψ|+|ψ⟩⟨x|.H = |x\rangle\langle\psi| + |\psi\rangle\langle x|.(3)✦

The Claim

Theorem 1. Let d≥1d \ge 1, let xx be a level of the qudit with dd levels, and let HH be the alternative search Hamiltonian (3). Then e−iHπ/2|ψ⟩⟨ψ|eiHπ/2=|x⟩⟨x|.e^{-iH\pi/2}\,|\psi\rangle\langle\psi|\,e^{iH\pi/2} = |x\rangle\langle x|.(4)✦

Simulating the Evolution

The gate error E(U,V)E(U, V) between two unitaries UU and VV of a system is the operator norm of their difference, E(U,V)=‖U−V‖=max⟨φ|φ⟩=1∥(U−V)|φ⟩∥.E(U, V) = \lVert U - V \rVert = \max_{\langle\varphi|\varphi\rangle = 1} \bigl\lVert (U - V)|\varphi\rangle \bigr\rVert.(5)✦

For observables H1,…,HLH_1, \ldots, H_L of a system and a time step Δt\Delta t, the symmetric Trotter step is the unitary obtained by multiplying the propagators e−iHkΔte^{-iH_k\Delta t} of the terms, first in the order 1,…,L1, \ldots, L and then in the order L,…,1L, \ldots, 1.✦

The coupling Hamiltonian of |a⟩|a\rangle and |b⟩|b\rangle is the sum of three terms built from projectors, H1=(|a⟩+|b⟩)(⟨a|+⟨b|)H_1 = (|a\rangle + |b\rangle)(\langle a| + \langle b|), H2=−|a⟩⟨a|H_2 = -|a\rangle\langle a| and H3=−|b⟩⟨b|H_3 = -|b\rangle\langle b|, and its Trotter step for a time step Δt\Delta t is the symmetric Trotter step of these three. For the alternative search Hamiltonian, where |a⟩=|x⟩|a\rangle = |x\rangle and |b⟩=|ψ⟩|b\rangle = |\psi\rangle, this is the simulation step UΔt=e−iH1Δte−iH2Δte−iH3Δte−iH3Δte−iH2Δte−iH1Δt.U_{\Delta t} = e^{-iH_1\Delta t}\, e^{-iH_2\Delta t}\, e^{-iH_3\Delta t}\, e^{-iH_3\Delta t}\, e^{-iH_2\Delta t}\, e^{-iH_1\Delta t}.(6)✦

A step runs each term for the time 2Δt2\Delta t, so mm steps are set against the evolution under HH for the time 2mΔt2m\Delta t.

Theorem 2. Let d≥1d \ge 1, let xx be a level of the qudit with dd levels, and let HH and UΔtU_{\Delta t} be the alternative search Hamiltonian and its simulation step (6). There is a constant α≥0\alpha \ge 0 such that for every number of steps mm and every time step Δt\Delta t with 0≤Δt≤10 \le \Delta t \le 1, E(UΔtm,e−2iHmΔt)≤mαΔt3.E\bigl(U_{\Delta t}^{\,m},\, e^{-2iHm\Delta t}\bigr) \le m\,\alpha\,\Delta t^3.(7)✦

For m≥1m \ge 1 and Δt=π/(4m)\Delta t = \pi/(4m), the mm steps reach the time π/2\pi/2 of (4) with a gate error of at most απ3/(64m2)\alpha\pi^3/(64m^2).

What Is Checked

The first claim is stated over the qudit with dd levels, its basis state |x⟩|x\rangle, the uniform superposition |ψ⟩|\psi\rangle, the propagator of the alternative search Hamiltonian, and the states |φ⟩⟨φ||\varphi\rangle\langle\varphi| of the pure states it compares; the second adds the simulation step UΔtU_{\Delta t} and the gate error.

About these constructions the library proves that |ψ⟩|\psi\rangle and every basis state |i⟩|i\rangle are unit vectors, that the coupling Hamiltonian and its three terms are self adjoint, that the propagator of an observable and the symmetric Trotter step are unitary, that a unitary takes unit vectors to unit vectors, and that |φ⟩⟨φ||\varphi\rangle\langle\varphi| is a density operator.