Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quantum Computing MAS 725 Hartmut Klauck NTU 19.3.2012.

Similar presentations


Presentation on theme: "Quantum Computing MAS 725 Hartmut Klauck NTU 19.3.2012."— Presentation transcript:

1 Quantum Computing MAS 725 Hartmut Klauck NTU 19.3.2012

2 Simon’s Problem Given: Black box function f:{0,1} n ! {0,1} n Promise: there is an s 2 {0,1} n with s  0 n For all x: f(x)=f(x © s) For all x,y: x  y © s ) f(x)  f(y) Find s ! Example: f(x)=2 b x/2 c Then for all k: f(2k)=f(2k+1); s=00... 01 Simon’s algorithm solve the problem in time/queries poly(n) Every classical randomized algorithm (even with errors) needs  (2 n/2 ) queries to the black box

3 The quantum algorithm Start with|0 n i |0 n i Apply H ­ n to the first n qubits Apply U f Measure qubits n+1,...,2n Result is some f(z) There are z, z © s with f(z)=f(z © s) Remaining state on the first n qubits is (1/2 1/2 |z i + 1/2 1/2 |z © s i ) |f(z) i Forget |f(z) i

4 The quantum algorithm State: 1/2 1/2 |z i + 1/2 1/2 |z © s i Every z 2 {0,1} n is equally likely to have been selected by the measurement (f(z) fixes z and z © s) We really get a probability distribution on the above states for a random z Measuring now would just give us a random z from {0,1} n [f(z) is chosen randomly in measurement 1, then with prob. ½ we get: z, with prob. 1/2: z © s, resulting in a uniformly random z] How can we get information about s? Apply H ­ n

5 The quantum algorithm State: 1/2 1/2 |z i + 1/2 1/2 |z © s i z uniformly random Apply H ­ n Result:  y  y |y i with  y =1/2 1/2 ¢ 1/2 n/2 (-1) y ¢ z + 1/2 1/2 ¢ 1/2 n/2 (-1) y ¢ (z © s) =1/2 (n+1)/2 ¢ (-1) y ¢ z [1+(-1) y ¢ s ] y ¢ z=  i y i z i

6 The quantum algorithm  y  y |y i with   y =1/2 (n+1)/2 ¢ (-1) y ¢ z [1+(-1) y ¢ s ] Case 1: y ¢ s odd )  y =0 Case 2: y ¢ s even )  y = § 1/2 (n-1)/2 Measure now [we are now independent of z] Result: some y:  y i s i ´ 0 mod 2 Hence we get the following equation over Z 2  y i s i ´ 0 mod 2 For a random y

7 Postprocessing Resulting equation  y i s i ´ 0 mod 2 All y with  y i s i ´ 0 mod 2 have the same probability Knowing this equation reduces the number of candidates for s by 1/2 We iterate this: Repeat n-1 times Solve the resulting linear system If we get n-1 linearly independent equations, then s is determined

8 Simon‘s Algorithmus H |0 n i U_fU_f n-1 times, then solve the system of equations H y(1),...,y(n-1)

9 Analysis s is determined as soon as we have n-1 independent equations. Coefficients of equations are randomly y(j) 1,...,y(j) n under the condition y(j) ¢ s=0 mod 2 [i.e. from a subspace U of dim. n-1 in (Z 2 ) n ] Probability that y(j+1) is linear independent from y(1),...,y(j): V j =span[y(1),...,y(j)] has dim. j Prob, that a random y(j+1) from U is in V j : 2 j /2 n-1 Total probability of all being independent:  j=1,...,n-1 (1-2 j-1 /2 n-1 )=  j=1,...,n-1 (1-1/2 j )

10 Analysis Total probability of all equations being independent:  j=1,...,n-1 (1-1/2 j ) This is at least 1/2 ¢ (1-[  j=2,...,n-1 1/2 j ]) ¸ 1/4 [Use (1-a)(1-b) ¸ 1-a-b für 0<a,b<1] I.e. with probability at least 1/4 we find n-1 linear independent equations, and we can compute s Use Gaussian elimination O(n 3 ) or other methods O(n 2.373 )

11 Variation Decision problem: With probability 1/2: s=0 n With prob. 1/2: s uniform from {0,1} n -{0 n } Decide between the two cases

12 Lower bound Consider any randomized algorithm that computes s, given oracle access to f Fix some f=f s for every s If there is a randomized algorithm with T queries and success probability p (both in the worst case), then there is a deterministic algorithm with T queries and success probability p for randomly chosen s Let r 2 {0,1} m be the string of random bits used E s E r [Success for f s with random r]=p ) there is a fixed r with E s [Success f s with r] ¸ p Fix r ) determinististic algorithm

13 Lower bound s is uniformly random from {0,1} n -{0 n } Fix any f=f s Given a deterministic query algorithm, success probability 1/2 for random s Consider the situation when k queries have been asked Fixes queries/answers (x i,f(x i )) If there are x i,x j with f(x i )=f(x j ), then algo. stops, success Otherwise: all f(x i ) are different, never x i © x j =s, number of pairs is Hence there are at least 2 n -1- possible s s is uniformly random from the remaining s

14 Lower bound There are still 2 n -1- ¸ 2 n -k 2 posssible s s uniformly random among those Query x k+1 (may depend on previous queries and answers) For every x k+1 there are k candidates s‘(1),...,s‘(k): s‘(j)=x j © x k+1 for s Hence we find the real s with prob. · k/ (2 n -k 2 ) [over choice of s]

15 Lower bound Probability to find the real s · k/(2 n -k 2 ) Total success probability: If T<2 n/2 /2 the success probability is too small

16 Variation Decision problem: With probability 1/2: s=0 n with prob. 1/2: s uniform from {0,1} n -{0 n } Algorithm decides between the two cases Analysis similar, with less than 2 n/2 /2 queries error larger than 1/4

17 Summary Simon‘s problem can be solved by a quantum algorithm with time O(n 2.373 ) and O(n) queries with success probability 0.99 Every classical randomized algorithm with success probability 1/2 needs  (2 n/2 ) queries

18 Algorithms so far Deutsch-Josza and Simon: DJ: f balanced or constant S: f has „Period“ s (over (Z 2 ) n ) First Hadamard, then U f, then Hadamard and measurement D-J: black box with output (-1) f(x) S: standard black box

19 Order finding over Z N Given numbers x, N, x<N Order r(x) of x in Z N : min. r: x r =1 mod N „Period“ of the powers of x We will use a black box U x,N that computes U x,N |j i |k i = |j i |x j k mod N i x and N have no common divisors Quantum algorithm to find r(x) ? Note: we will not really need a black box, since U x,N can be computed easily

20 But first…. We need to say what it means to have an efficient quantum algorithm Don’t want to count queries to a black box, but just computation time (or space) Efficient classical computation is captured by complexity classes like P or BPP P : problems solvable by poly-time Turing machines BPP : problems solvable by poly-time randomized Turing machines with bounded error The classes are believed to be the same (derandomization)

21 Computing with circuits Circuit: inputs x 1,…,x n 2 {0,1} n Gates g 1,…,g m Gate: takes inputs or output of a previous gate, computes a function {0,1} 2  {0,1} Gates form a directed acyclic graph Output gate g m Size: m (corresponds to sequential computation time) Circuit bases (allowed function for the gates): AND, OR, NOT NAND All Boolean function with 2 inputs Size changes only by a constant factor with the basis

22 Probabilistic circuits Additional inputs r 1,…,r m For all inputs x 1,…,x n : if r 1,…,r m are uniform random bits, the correct result will be computed with probability 2/3

23 Circuit families A circuit C n computes on inputs with n bits Circuit family (C n ) n 2 N Uniformity condition: C n can be computed in polynomial time from n (given in unary) Without this condition circuit families can compute everything Now we can define P, BPP in terms of circuits Polynomial size and uniform Equivalent to Turing machine definitions

24 Facts about circuits Almost all function {0,1} n  {0,1} need circuit size  (2 n /n) Established by a counting argument This bound is tight for non-uniform circuits, i.e., every function f:{0,1} n  {0,1} can be computed in size  (2 n /n) We don‘t know any explicit function that needs ! (n) circuit size

25 Quantum circuits n qubits initialized with the input (classical state) s qubits workspace At all times there is a global state on n+s qubitts Unitary operations (on 1, 2, or 3 qubits) U 1,…,U T ; given together with choice of the qubits Applying operation U i : take the tensor product with the identity on the other qubits, multiply with the current state in the order: 1,...,T One or more fixed qubits are measured in the end (standard basis)

26 Quantum circuits Uniform families defined as before, but we need to restrict the set of allowed unitaries (since the set of all unitaries on a single qubit is already not even countable) Class BQP: functions computable by uniform families of polynomial size quantum circuits with error < 1/3 EQP: same, but no error allowed It is possible to show that these classes coincide with definitions for them based on quantum Turing machines

27 Relationships between complexity classes P µ BPP µ BQP µ PSPACE P µ EQP µ BQP All inclusions except the first and the last need to be proved Conclusion: BQP does not contain uncomputable functions Widely believed that P=BPP On the other hand the factorization problem is BQP, not known to be in BPP Generally considered (very) unlikely BQP=PSPACE, or NP µ BQP, i.e. not likely that we can solve NP -complete problems

28 Simulating quantum circuits Theorem: Every quantum circuit with m gates and n+s can be simulated by a deterministic circuit of size m ¢ 2 O(n+s) This implies that at most exponential speedups are possible Uniformity is preseved by the simulation Idea: store the global quantum state on n+s qubits explicitly (with limited precision), apply the m unitary operations one after another by performing matrix multiplication (with limited precision)

29 P vs. BQP Simulation of classical circuits Problem: Quantum circuits are reversible (up to the final measurement) „Fan-Out“ is not implementable due to no- cloning (i.e., using a computation result several time is not directly possible) Solution: Simulate a classical circuit first by a classical reversible circuit

30 Simulation Toffolli Gate: maps a,b,c to a,b, (a Æ b) © c The Toffolli gate is reversible [given a,b,d can compute c=(a Æ b) © d ] The gate is universal [AND: set c=0, NOT: set c=1, b=1] Fan-out: To copy a set b=1, c=0 (copies classical bits) Classical reversible circuits are also quantum circuits Simulation of probabilistic circuits is immediate, hence BPP µ BQP Measure 1/2 1/2 ( |0 k i +|1 k i ) to get k copies of a random bit

31 Which classes of unitaries are universal? We can use one of the following CNOT and every unitary gate on 1 Qubit CNOT, Hadamard, plus O(1) rotation gates (approximately universal) Toffoli Gate and Hadamard gates (approximately universal) We can approximate any circuit with 2 qubit gates to any precision using only gates from one of the above sets with limited overhead

32 Approximate computation What is the influence of error?

33 Limited precision Suppose a quantum circuit computes |  T i =U T U T-1  U 1 |x i |0…0 i U i unitary Instead of U T apply V T errors due to implementation while simulating the circuit with limited precision Result is V T |  T-1 i =|  T i +|E T i, where |E T i =(V T -U T ) |  T-1 i (not normalized)

34 Limited precision Result V T |  T-1 i =|  T i +|E T i, where |E T i =(V T -U T ) |  T-1 i Use V i instead of U i for all i: |  1 i =V 1 |  0 i =|  1 i +|E 1 i |  2 i =V 2 |  1 i =|  2 i +|E 2 i +V 2 |E 1 i |  T i =V T |  T-1 i =|  T i +|E T i +V T |E T-1 i +  + V T  V 2 |E 1 i Hence k |  T i  |  T i k ·  i=1…T k |E i i k  i=1…T k (V i -U i ) |  i-1 i k

35 Approximating unitaries Let U be an arbitrary unitary on n qubits And U‘ be any operator What is the approximation error? Spectral norm k U k =max x: k x k =1 k U x k Approximation error: k U – U‘ k

36 Total approximation error  i=1…T k (V i -U i ) |  i-1 i k ·  i=1…T k (V i -U i ) k If k V i -U i k ·  /T, then the total distance is at most  k |  T i  |  T i k ·  implies what error? Measure all n+s qubits in the standard basis Measurement result a appears with probability P(a)=| h a|  T i | 2 resp. Q(a)=| h a|  T i | 2

37 Total approximation error Measurement result a appears with probability P(a)=| h a|  T i | 2 resp. Q(a)=| h a|  T i | 2 Hence the total error is at most  a |P(a)-Q(a)| · 2 k |  T i  |  T i k · 2 

38 Conclusion For polynomial time computations we need to apply unitaries with precision 1/poly(n) in the spectral norm In particular: quantum computing is not an analogue model of computation requiring infinite precision

39 Efficiency of approximating Number of gates from a finite set we need to simulate any 1-qubit gate? Depends on the required precision [Solovay, Kitaev] show  approximation with log 2 (1/  ) gates If poly(n) gates have to be approximated with error 1/poly(n) we only need an overhead factor log 2 (n)


Download ppt "Quantum Computing MAS 725 Hartmut Klauck NTU 19.3.2012."

Similar presentations


Ads by Google