quantum computing dave bacon department of computer science & engineering university of...

61

Post on 20-Dec-2015

225 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms
Page 2: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Computing

Dave BaconDepartment of Computer Science & Engineering

University of Washington

Lecture 4: Quantum Algorithms

Page 3: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Summary of Last Lecture

Page 4: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Classical Promise Problem Query Complexity

Given: A black box which computes some function

k bit input k bit output

Problem: What is the minimal number of times we have to use (query) the black box in order to determine which subset the function belongs to?

black boxPromise: the function belongs to a set which is a subsetof all possible functions.

Properties: the set can be divided into disjoint subsets

Page 5: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Promise Query ComplexityGiven: A quantum gate which, when used as a classical devicecomputes a reversible function

k qubit input k qubit output

Problem: What is the minimal number of times we have to use (query) the quantum gate in order to determine which subset the function belongs to?

black box

Promise: the function belongs to a set which is a subsetof all possible functions.

Properties: the set can be divided into disjoint subsets

Page 6: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

FunctionsWe can write the unitary

k qubit input k qubit output

black boxin outer product form as

so that

Page 7: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

FunctionsNote that the transform is unitary

When

precisely when f(x) is one to one!

Page 8: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Functions

One to one

Example: Not one to one:

Page 9: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

An Aside on Functions

n qubits

k qubits

function from n bitsto k bits:

is a bitwise exclusive or

Generically we can compute a non-reversible function usingthe following trick:

Such that, with proper input we can calculate f:

ancilla

Page 10: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

An Aside on Functions

n qubits

k qubits

function from n bitsto k bits:

is a bitwise exclusive or

Page 11: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

From This Perspective

“identity” NOT 2nd bit controlled-NOT controlled-NOT+ NOT 2nd bit

constant functions balanced functions

Deutsch’s problem is to distinguish constant from balanced

Page 12: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Query Complexitiesblack box

Exact classicalquery complexity

Bounded error classicalquery complexity

Exact quantum query complexity

Bounded error quantumquery complexity

probability of failure

Bounded error algorithms are allowed to fail with a bounded probability of failure.

Page 13: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Algorithms

DavidDeutsch

RichardJozsa

1992: Deutsch-Jozsa Algorithm

Exact classical q. complexity:

Bounded error classical q. complexity:

Exact quantum q. complexity:

1993: Bernstein-Vazirani Algorithm(non-recursive)

UmeshVazirani

EthanBernstein

Exact classical q. complexity:

Bounded error classical q. complexity:

Exact quantum q. complexity:

Page 14: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Algorithms1993: Bernstein-Vazirani Algorithm(recursive)

UmeshVazirani

EthanBernstein

Bounded error classical q. complexity:

Exact quantum q. complexity:

(first super-polynomial separation)

DanSimon

1994: Simon’s Algorithm

Bounded error classical q. complexity:

Bounded error quantum q. complexity:

(first exponential separation)

Generalizing Simon’s algorithm, in 1994, Peter Shor was able to derive an algorithm for efficiently factoring and discrete log!

Page 15: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

The Factoring Firestorm188198812920607963838697239461650439807163563379417382700763356422988859715234665485319060606504743045317388011303396716199692321205734031879550656996221305168759307650257059

472772146107435302536223071973048224632914695302097116459852171130520711256363590397527

398075086424064937397125500550386491199064362342526708406385189575946388957261768583317

Best classical algorithmtakes time

Shor’s quantum algorithm takes time

An efficient algorithm for factoring breaks the RSA public key cryptosystem

PeterShor 1994

Page 16: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Deutsch-Jozsa ProblemGiven: A function with n bit strings as input and one bit asoutput

(this will be a non-reversible function)

Promise: The function is either constant or balance.

constant function:

balanced function:

constant balanced

Problem: determine whether the function is constant orbalanced.

Page 17: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Classical Deutsch-Jozsaconstant balanced

Problem: determine whether the function is constant orbalanced.

No failure allowed: we need to query in the worst case values of to distinguish between constant and balanced

Exact classical q. complexity:

Page 18: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Classical Deutsch-Jozsaconstant balanced

Problem: determine whether the function is constant orbalanced.

Bounded error: Query two different random values ofthe function.

If they are equal, guess constant.Otherwise, guess balanced.

Bounded error classical q. complexity:

Page 19: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Deutsch-JozsaGiven: A quantum gate on n+1 qubits strings which calculatesthe promised f

n qubit

1qubit

Page 20: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Trick 1: Phase Kickback

Input a superposition over second register:

Function is computed into phase:

Page 21: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Trick 2: Hadamarding Qubits

Note:and

Page 22: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Tricks 1 and 2 Together

n qubits

Page 23: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Tricks 1 and 2 Together

n qubits

Page 24: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Function in the Phase

constant balanced

Page 25: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Function in the PhaseWhen the function is constant:

When the function is balanced:

amplitude in zero state

Page 26: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Deutsch-Jozsa

n qubits

If function is constant, r is always 0.If function is balanced, r is never 0.

Distinguish constant from balanced using one quantum query

Page 27: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Deutsch-Jozsa

DavidDeutsch

RichardJozsa

1992: Deutsch-Jozsa Algorithm

Exact classical q. complexity:

Bounded error classical q. complexity:

Exact quantum q. complexity:

Page 28: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Bernstein-Vazirani ProblemGiven: A function with n bit strings as input and one bit asoutput

Promise: The function is of the form

Problem: Find the n bit string

Page 29: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Classical Bernstein-VaziraniGiven: A function with n bit strings as input and one bit asoutput

Promise: The function is of the form

Problem: Find the n bit string

Notice that the querying yields a single bit of information.But we need n bits of information to describe .

Bounded error classical q. complexity:

Page 30: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Bernstein-Vazirani

n qubits

Page 31: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Hadamard It!

Page 32: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Bernstein-Vazirani

n qubits

We can determine using only a single quantum query!

Page 33: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Bernstein-Vazirani

1993: Bernstein-Vazirani Algorithm(non-recursive)

UmeshVazirani

EthanBernstein

Exact classical q. complexity:

Bounded error classical q. complexity:

Exact quantum q. complexity:

Page 34: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms
Page 35: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Bernstein-Vazirani1993: Bernstein-Vazirani Algorithm(recursive)

UmeshVazirani

EthanBernstein

Bounded error classical q. complexity:

Exact quantum q. complexity:

(first super-polynomial separation)

NP P

RFS (recursive Fourier sampling)

Page 36: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Simon’s ProblemGiven: A function with n bit strings as input and one bit asoutput

Promise: The function is guaranteed to satisfy

Problem: Find the n bit string

(is that nobody does what Simon says)

Page 37: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Classical Simon’s ProblemPromise: The function is guaranteed to satisfy

Suppose we start querying the function and build up a listof the pairs

If we find such that then we solve theproblem:

But suppose we start querying the function m times….

Probability of getting a matching pair

Bounded error query complexity:

Page 38: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Simon’s Problemblack box

Unlike previous problems, we can’t use the phase kickbacktrick because there is no structure in the function.

Charge ahead:

Page 39: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Simon’s Problem

n qubits

n qubits

Page 40: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Simon’s ProblemMeasure the second register

Using the promise on the function

This implies that after we measure, we have the state

For random uniformly distributed

Measuring this state at this time does us no good….

uniformly distributed = all strings equally probable

Page 41: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Simon’s Problem

Measuring this state in the computational basis at this time does us no good….

For random uniformly distributed

Measurement yields either

or

But we don’t know x, so we can’t use this to find s.

Page 42: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Simon’s Problem

n qubits

n qubits

Page 43: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Simon’s Problem

Measuring this state, we obtain uniformly distributed randomvalues of such that

If we have eliminated the possible values of by half

Page 44: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Simon’s Problem

On values of which are 0, this doesn’t restrict

On values of which are 1, the corresponding mustXOR to 0. This restricts the set of possible ‘s by half.

Example:

possible ‘s:

Page 45: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n Vectors

Think about the bit strings as vectors in

If single run eliminates half, multiple runs….how to solve?

vectors in

We can add these vectors:

Where all additions are done module 2

Page 46: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n VectorsExample:

We can multiply these vectors by a scalar in

Example:

Page 47: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n Vectorsdot product of vectors in

Example:

Page 48: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n Vectorsvectors in

one possible basis:

Page 49: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n Vectorsvectors in

But we can expand in about a different set of vectors

Example:

Page 50: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n Vectorsvectors in

But we can expand in about a different set of vectors

When these n vectors are linearly independent

linearly independent linearly dependent

Page 51: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Simon’s ProblemThink about the bit strings as vectors in

Multiple runs of the quantum algorithm yield equations

random uniform

If we obtain linearly independent equations of this form,we win (Gaussian elimination)

Page 52: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n Vectors

Notice that if y is one of vectors with only one 1:

th bit

then this implies

Notice that if y is one of vectors with only one two 1’s:

then this implies or

Page 53: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n Gaussian Elimination

is equivalent to (remember, we know the y’s)

Page 54: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n Gaussian Elimination

We can add rows together to get new equations

We can always relabel the and correspondingly

Page 55: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n Gaussian EliminationUsing these two techniques it is always possible to changethe equations to the form:

Where the prime indicates that the may have been permuted.

Depending on the v’s this allows us to find the

Page 56: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

(Z2)n Gaussian Elimination

Example:

already in correct form

add all three equations

already in correct form

solutions:

Page 57: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Simon’s ProblemThink about the bit strings as vectors in

Multiple runs of the quantum algorithm yield equations

random uniform

If we obtain linearly independent equations of this form,we win (Gaussian elimination)

Suppose we have linearly independent ‘s. What is theprobability that is linearly independent of previous ‘s?

Page 58: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Quantum Simon’s Problem

What is the probability that our equations are linearlyindependent?

With constant probability we obtain linearly independence andhence solve Simon’s problem.

Page 59: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

DanSimon

1994: Simon’s Algorithm

Bounded error classical q. complexity:

Bounded error quantum q. complexity:

(first exponential separation!)

Simon’s Problem

Page 60: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Pooh-Pooh?People like to pooh-pooh these early problems because theydo not solve problems which are “natural”

This is silly. These results show that treating a device asclassical or as quantum show amazing differences.

Page 61: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 4: Quantum Algorithms

Killer Application?In 1994, after Simon’s algorithm, quantum computers wereinteresting, but were still a novelty.

Next Lecture we will see how this all changed, when PeterShor discovered how to factor efficiently using a quantumalgorithm.

PeterShor