Lean, informalized

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

Exercise 6.20 - A quantum algorithm that never wrongly answers zero, and answers zero on all zeros with probability above one half, needs a query per bit

Computing OR without error takes a query per bit.

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

An oracle holds a string XX of NN bits XiX_i, and a quantum computer is to find their OR, OR(X)=0\mathrm{OR}(X) = 0 if every bit is 00 and OR(X)=1\mathrm{OR}(X) = 1 if some bit is 11. The computer learns about XX only by querying the oracle. The zero error query complexity Q0(OR)Q_0(\mathrm{OR}) is the least number of queries with which a quantum algorithm finds OR(X)\mathrm{OR}(X) with certainty for every string XX, and the exercise is to show that Q0(OR)≥NQ_0(\mathrm{OR}) \geq N.

A Quantum System

A quantum system SS is a physical system whose state space is a finite dimensional complex Hilbert space.✦ A state ρ\rho of SS is a positive operator of unit trace on the state space of SS.✦ A pure state |ψ⟩|\psi\rangle of SS is a unit vector in the state space of SS, and it determines the state |ψ⟩⟨ψ||\psi\rangle\langle\psi|, the projector onto that vector. The closed evolutions of SS are its unitaries: a unitary UU of SS is an operator on the state space of SS with U†U=UU†=1U^\dagger U = U U^\dagger = 1.✦

The Query Register

A query register on SS is an orthonormal basis of the state space of SS, the computational basis |i,b,j⟩,i∈Σ,b∈{0,1},j∈Ω,|i, b, j\rangle, \qquad i \in \Sigma, \quad b \in \{0, 1\}, \quad j \in \Omega,(1)✦ where Σ\Sigma is a finite set of NN indices, one for each bit of the oracle, bb is the value of the answer qubit, and Ω\Omega is a finite set labelling the states of the workspace. A string XX assigns a bit XiX_i to each index i∈Σi \in \Sigma, and its oracle is the unitary OXO_X of SS that adds XiX_i to the answer qubit modulo two, OX|i,b,j⟩=|i,b⊕Xi,j⟩.O_X |i, b, j\rangle = |i, b \oplus X_i, j\rangle.(2)✦

Queries and the Read Out

An algorithm starts from a pure state |ψ⟩|\psi\rangle of SS and alternates unitaries U0,U1,U2,…U_0, U_1, U_2, \dots of SS, which do not depend on XX, with calls to the oracle. For a unitary OO in the place of the oracle, the state after tt queries is |ψ0⟩=U0|ψ⟩,|ψt+1⟩=Ut+1O|ψt⟩,|\psi_0\rangle = U_0 |\psi\rangle, \qquad |\psi_{t+1}\rangle = U_{t+1}\, O\, |\psi_t\rangle,(3) The query state |ψt(X)⟩|\psi_t(X)\rangle of the algorithm on the string XX is the state |ψt⟩|\psi_t\rangle after tt queries with O=OXO = O_X.

After the last query the register is measured. A measurement on SS with a finite set of outcomes is a family of measurement operators MkM_k on the state space of SS, one for each outcome kk, satisfying the completeness relation ∑kMk†Mk=1\sum_k M_k^\dagger M_k = 1.✦ The positive operator-valued measure (POVM) of this measurement is the family of effects Ek=Mk†MkE_k = M_k^\dagger M_k, and the probability of the outcome kk when the measurement is performed on a state ρ\rho of SS is given by the Born rule, p(k)=Tr⁡(MkρMk†)=Tr⁡(Ekρ).p(k) = \operatorname{Tr}(M_k \rho M_k^\dagger) = \operatorname{Tr}(E_k \rho).(4) The projective measurement in an orthonormal basis {|ek⟩}\{|e_k\rangle\} is the measurement whose operator for the outcome kk is the projector |ek⟩⟨ek||e_k\rangle\langle e_k|.✦ The read out of the query register is the projective measurement in the computational basis (1), with the labels k=(i,b,j)k = (i, b, j) as its outcomes.✦

The Claim

Let pX(k)p_X(k) be the probability (4) of the outcome kk when the read out is performed on |ψT(X)⟩⟨ψT(X)||\psi_T(X)\rangle\langle\psi_T(X)|. The answer is read from the outcome: a set A0A_0 of labels stands for the answer OR(X)=0\mathrm{OR}(X) = 0, and the algorithm gives that answer with probability PX(A0)=∑k∈A0pX(k)P_X(A_0) = \sum_{k \in A_0} p_X(k). The string of zeros is written X=0X = 0.

Theorem 1. Let SS be a quantum system with a query register of NN indices, and consider the algorithm with unitaries U0,U1,…U_0, U_1, \dots of SS, initial pure state |ψ⟩|\psi\rangle and TT queries, with a set A0A_0 of labels for the answer 00. Suppose that it never answers 00 on a string with a bit equal to 11, PX(A0)=0P_X(A_0) = 0 for every such XX, and that on the string of zeros it answers 00 with probability P0(A0)>1/2P_0(A_0) > 1/2. Then it makes at least as many queries as there are bits, T≥N.T \geq N.(5)✦

What Is Checked

The claim is stated over the query register, the oracle (2), the query states (3) and the probabilities (4) of the read out in the computational basis. About these constructions the library proves that OXO_X is a unitary. It proves that the projectors |ek⟩⟨ek||e_k\rangle\langle e_k| of an orthonormal basis satisfy the completeness relation, each projector PP having P†P=PP^\dagger P = P and all of them summing to the identity, so the read out is a measurement; and that the effects EkE_k of any measurement are positive. The projector onto a unit vector is a density operator, so |ψT(X)⟩⟨ψT(X)||\psi_T(X)\rangle\langle\psi_T(X)| is a state of SS.