18.405J/6.841J Advanced Complexity Theory Lecturer: Dan Spielman Lecture 13 March 22, 2001 Scribe: Abhinav Kumar This lecture will be on oracle quantum turing machines. We wish to compare Quantum complexity classes to ordinary complexity classes. Fact 1 BQP PSPACE This is easy to prove, in fact it's on the problem set. A harder proposition is the following. Fact 2 BQP P#P Another result says 9A such that NP A 2= BQP A : So at least in its ability to access an oracle, NP can be more powerful than BQP. We need to dene the notion of accessing an oracle for a quantum computer. The idea is to put quantum gates in the circuit representing the oracle. An oracle is viewed as a function A : f0 1g ! f0 1g. We consider the quantum gate QAn , as shown in the gure. x 2 f0 1gn x y A(x) y Gate QAn To describe the quantum gate QA , assume that A tells us what QA does on basis states jx y >, x 2 f0 1gn y 2 f0 1g. QA sends this to jx A(x) y >. Extend by linearity to get a unitary transformation. Then an oracle quantum turing machine just means a quantum circuit which is allowed to incorporate some gates of this form. Let L(A) = fwj9x 2 A jxj = jwjg. Clearly L(A) 2 NP A . We will see that quantum computers can't decide L(A) very well. Putting in one word of a given length makes very slight dierence to the functioning of a quantum circuit trying to decide L(A). The rough idea is that if jA \ f0 1gn j = 0 or 1, it doesn't make much of a dierence which of these values it is (to a Quantum circuit). The proof idea is similar to the proof of P A ( NP A . Theorem 3 L(A) 2= BQP A 13-1 Proof: Suces to argue about one quantum circuit. The way we elude all Quantum circuits is the same as in the proof of P A ( NP A . In fact, if a quantum circuit with T oracle gates accepts L(A) with error probability less than a xed constant, then T = (2n=2 ) (this bound is tight - see Grover's algorithm). Dene Let the initial state be j0 >. jT >:= UT QA :::QA U1 j0 > where Ui 's are unitary matrices, T refers to time steps for the circuit. the language A acts as an oracle: if x 2 f0 1gn , then A(x) = 0 if x 2 A, 1 if x 2= A. Note that if jA \ f0 1gn j = 0, then QAn , is the identity. We will compare two cases: no words against exactly one word. Dene ji >:= Ui :::U1 j0 > Our goal is to nd x 2 f0 1gn such that if An = fxg, then jjT ; T jj > const: ) T is huge. q Lemma 4 9x 2 f0 1gn such that jjT ; T jj 22Tn2 Before we prove the lemma, we state a corollary: Claim: If T = o(2n=2 ) then this circuit can't distinguish between jA \ f0 1gn j = 0 or 1. Now our goal is to nd x so that it's not queried in a meaningful way. Assume w.lo.g. that there is a distinguished set of wires that are inputs to the QA gate, i.e. assume dedicated input wires for QA . For a state j >= X c basis state we dene the query magnitude of x in to be P c2Sx c jc > jc j2 , where Sx = f basis states with x on oracle wires g Def. The query magnitude of x at time i is qix = the query magnitude of x in i . T Def. The query magnitude of x, qx = P qix . i=1 P Idea: take x of mimimal query magnitude so qx < 2Tn , because qix = 1 for every i. x Claim: jjT ; T jj pT 2qx (this ) Lemma 4). Proof of claim: Let Vi = Ui QA . jT > = (VT VT ;1 :::V1 )j0 > jT > = (UT UT ;1 :::U1 )j0 > ki = Vi Vi;1 :::Vk+1 Uk :::U1 j0 > ( called the k'th hybrid at time i so 0T = VT :::V1 j0 kT = VT :::Vk+1 Uk :::U1 j0 > TT = UT :::U1 j0 > Compare kk+1 with k+1k+1 . k = kk , we apply either Vk or Uk . It is easily veried that jjkk+1 ; k+1k+1 jj 2qkx 13-2 ) jjkk+1 ; k+1k+1jj2 2qkx since jjkT ; k+1T jj2 = jjkk+1 ; k+1k+1 jj2 because unitary transformations preserve norms. Therefore TX ;1 By Cauchy-Schwartz, k=0 jjkT ; k+1T jj2 jjT ; T jj = jj0T ; TT jj Grover's Algorithm p X k TX ;1 k=0 2qkx 2qx p jjkT ; k+1T jj 2qx T Search in O( N ) time. Let H be the Hadamard matrix 1 1 1 M = p 1 ;1 2 Also, let us consider the matrix corresponding to the gate NOT , QNOT2 = 01 10 We shall use the matrices H and NOT to get a unitary transformation that ips the sign of one bit, namely U = H NOT H . 1 1 1 0 1 1 1 1 0 U = 2 1 ;1 1 0 1 ;1 = 0 ;1 Using this machinery, we can construct a gate Q0A for an oracle A, which takes jx > to ; jx > if x 2 A, and leaves jx > unchanged otherwise (note this is a unitary transformation, since it is unitary on the orthogonal basis vectors, and takes them to orthogonal vectors). So if A = 01, Q0A j01 >= ;j01 >. Suppose we apply this transform to a uniform linear combination of states jx0 >= 12 (j00 > +j01 > +j10 > +j11 >) We get out 1 (j00 > ;j01 > +j10 > +j11 >) 2 Now suppose to the result we apply a Hadamard transform to each bit, then apply the matrix 3 2 1 7 6 ;1 7 6 4 ;1 5 (reection about mean) ;1 to it, and again the Hadamard transform to it. We get out just j01 >! The Hadamard transform acts as a Fourier transform. The general algorithm is based on these lines, the idea is to iterate, applying these two gates (the diusion transform and Q0A ), when we have more than 2 inputs. p RQ0 RQ0 :::jx > ( 4 2n times) A A 0 p the dominant term will be the word we want to select. This takes time O( N ) since N 2n . 13-3