peter høyer hoyer quantum searching august 1, 2005, université de montréal the fifth canadian...

41
Peter Høyer www.cpsc.ucalgary.ca/~hoyer Quantum Searching August 1, 2005, Université de Montréal The Fifth Canadian Summer School on Quantum Information

Upload: milton-carson

Post on 28-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Peter Høyer

www.cpsc.ucalgary.ca/~hoyer

Quantum Searching

August 1, 2005, Université de MontréalThe Fifth Canadian Summer School on Quantum Information

Quadratic speed-up

Cost was O(M)

* Actual running time on a quantum computer might be incomparable to running time on a classical computer. Availability of quantum computers is limited. Additional error correction not included. Not applicable in conjunction with measurements. Verifier required.

*√Now only O( M)

Cost: O(M)

Grover’s Problem

0 1 0 0 1 0 0 0 0 1 0 0

1 N

Input:

Problem:

f:{1,2,,N}{0,1}

Find integer i such that f(i)=1

You can ask questions of the form: “What is f(j)?”

A query

j f(j)

“What is f(j)?”

Query

Remember the input

j f(j)

“What is f(j)?”

Query

Remember the input:

j

f(j)Queryj

Reversible

j f(j)

“What is f(j)?”

Query

Remember the input:

j

f(j)Queryj

Reversible:

j

bf(j)Query

j

b

00 = 001 = 110 = 1

11 = 0

b {0,1}

Unitary Query

j f(j)

“What is f(j)?”

Query

Remember the input:

j

f(j)Queryj

Reversible:

j

bf(j)Query

j

b

Unitary:

Uf

|j

|b

|j

|bf(j)

b {0,1}

Unitary Query

Unitary:

Uf

|j

|b

|j

|bf(j)

|j|b |j|bf(j)

|j|0∑j=1

N∑j=1

N1

√N1

√N |j|f(j)

“Apply function f in superposition”

Computational Cost

Uf

|j

|b

|j

|bf(j)

1 query 1 unit cost

Alternative query model

Sf|j (-1)f(j)|j Uf

|j

|b

|j

|bf(j)

Uf

|j

|1

(-1)f(j)|j

|1H H

Proof of :

|b H |0+(-1)b|1

“Compute the value of f in the phases”

Grover’s Algorithm

0 1 0 0 1 0 0 0 0 1 0 0

1 N

Suppose t solutions (here t=3)

Grover: 1/p√ = N/t queries√

Repetition: 1/p = N/t queries

The “classical” algorithm: N1

√N

Success probability = p = t/N

A|0|

0∑i=1|i

Standard Analysis

0 1 0 0 1 0 0 0 0 1 0 0

1 N

1/N2/N3/N

Success probability

Classical repetition Grover

4/N5/N6/N7/N8/N9/N

N1

√N

A|0|

0∑i=1|i

(1)(2)(3) (1)(2)(3)

Grover’s Algorithm

Rotation

Amplitude Amplification

A = some algorithm p = success probability of A

m repetitions success probability ≈ mp (provided mp ≤ 2/3, say)

Amplitude Amplification

A = some algorithm p = success probability of A

m repetitions success probability ≈ mp (provided mp ≤ 2/3, say)

(Solutions must be verifiable)

General Setting

Algorithm A,

Verifier f, f:{1,2,,N}{0,1}

A|0|0∑i=1 i|i N

0 1 0 0 1 0 0 0 0 1 0 0

1 N

f:{1,2,,N}{0,1}

A|0|

0∑i=1|iN

1√N

Example: Grover

General Setting

Algorithm A,

Verifier f, f:{1,2,,N}{0,1}

A|0|0∑i=1 i|i N

1 application of A

1 query to Uf

1 unit cost Uf

|j

|b

|j

|bf(j)

A|0 |0

General Setting

Algorithm A,

Let |Good~∑i:f(i)=1 i|i

|Bad~∑i:f(i)=0 i|i

Success prob. of A = p = sin2θ

Verifier f, f:{1,2,,N}{0,1}

A|0|0∑i=1 i|i N

A|0|0sinθ|Goodcosθ|Bad

General Setting

Algorithm A,

Let |Good~∑i:f(i)=1 i|i

|Bad~∑i:f(i)=0 i|i

Success prob. of A = p = sin2θ

Verifier f, f:{1,2,,N}{0,1}

A|0|0sinθ|Goodcosθ|Bad

A|0|0∑i=1 i|i N

2-dimensional subspaceA|0|0sinθ|Goodcosθ|Bad

|Good

|Badθ

|02θ |

Q|

Operator Q rotates by angle 2θ

3θ5θ

QA|0

QQA|0

Amplitude Amplification

Algorithm A,

Let |Good~∑i:f(i)=1 i|i

|Bad~∑i:f(i)=0 i|i

Success prob. of A = p = sin2θ

Verifier f, f:{1,2,,N}{0,1}

A|0|0sinθ|Goodcosθ|Bad

A|0|0∑i=1 i|i N

2θ |

Q||Good

|Bad

Amplitude Amplification|Good

|Badθ

A|0|0

A|0 sinθ|Goodcosθ|Bad

QQA|0 sin5θ|Goodcos5θ|Bad

QA|0

sin3θ|Goodcos3θ|Bad

QQQA|0 sin7θ|Goodcos7θ|Bad

QmA |0 = sin((2m+1)θ) |Good + cos((2m+1)θ) |Bad

Maximizing the success prob.|Good

|Bad

QmA |0 = sin((2m+1)θ) |Good + cos((2m+1)θ) |Bad

θA|0|0

4 π √p

Theorem:

Set m= ,

then Prob[Bad] ≤ sin2θ = p

π2

After m rotations, angle is (2m+1)θ.

We want (2m+1)θ ≈ .

Since sin2θ = p, then θ ≈ √p. □

Proof:

Note: Classically, m= . A quadratic speed-up! 1p

“De-randomization” (p known) |Good

|Bad

QmA |0 = sin((2m+1)θ) |Good + cos((2m+1)θ) |Bad

θA|0|0

Theorem:

If prob. p is known,

we can “de-randomize”.

π2

If (2m+1)θ is slightly more than ,

then choose slightly smaller angle θ’<θ

such that (2m+1)θ’ IS equal to . □

π2Proof:

θ’

If m is not known?|Good

|Badθ

A|0|0

Guessing when p unknown

θA|0|0

|Good

|Bad

A random vector yields success prob. = 1/2

Solution: obtain a near-random vector by classically guessing m.

Bizarre example

Viewer discretion is advised...

Kiil, the cat

2

3

4

5

6

7

8

9

10

11

13

1 cat 2 cats

11 trials 7 trials

What is the highest floor from which the cat will survive, if it jumps out the window from that floor?

Guessing when p unknown

θA|0|0

|Good

|Bad

Set M=1, λ=1.99Repeat forever: Set M=λM

Let mR[1,M]

Do QmA|0 Measure, say |i If f(i)=1, then breakOutput i

1)

2)

3)

Algorithm:

Q Rotation

|Good

|Bad

2θ |

Q| S0|0 = |0 S0|i = - |i (i≠0)

Sf|i = |i (f(i)=1) Sf|i = - |i (f(i)=0)

Q = - SfAS0A-1

Q Rotation

|Good

|Bad

S0|0 = |0 S0|i = - |i (i≠0)

Sf|i = |i (f(i)=1) Sf|i = - |i (f(i)=0)

Sf reflection about |Good

AS0A-1 reflection about |0

Q rotation by 2θ

θ

|2θ

|0

Q = SfAS0A-1-

Cost of Q

Q = -AS0A-1Sf

1 application of A

1 query to Uf

1 unit cost Uf

|j

|b

|j

|bf(j)

A|0 |0

1 application of Q 2 applications of Uf

+ 2 applications of A

+ 1 application of S0

5 units cost

The Recipe

Algorithm A,

Verifier f, f:{1,2,,N}{0,1}

A|0|0∑i=1 i|i N

Q = -AS0A-1Sf

S0|0 = |0 S0|i = |i (i≠0)

Sf|i = |i (f(i)=1) Sf|i = |i (f(i)=0)

Define reflections:

Amplitude Amplification operator:

- -

Complete Grover

0 0 0 0 1 0 0 0 0 0 0 0

1 Nf:{1,2,,N}{0,1}

Q = -AS0A-1Sf

S0|0 = |0 S0|i = - |i (i≠0)

Sf|i = |i (f(i)=1) Sf|i = - |i (f(i)=0)

N

A|

0=∑i=1|i

1√N

Apply A on |0, gives |Repeat O(√N) times: Apply Q on |Measure | Return outcome |i

1)2)

3)4)

Grover’s algorithm:

Theorem: Prob[f(i)=1] ≥ 2/3

General rotation

Q = -AS0A-1SfS0|0 = |0 S0|i = |i (i≠0)

Sf|i = |i (f(i)=1) Sf|i = |i (f(i)=0)

-

-

Φs

Φf Φs,Φf C*

-

-

Suitable choices of phases:

Φs = Φf = -1

Φs = Φf = i = √-1

Φs = Φf = eπi/3

Φs = Φf such that Re(Φs)>0

General AnalysisA|0sinθ|Goodcosθ|Bad

Q(Φs,Φf)A|0αsinθ|Goodβcosθ|Bad

-ΦsΦf

-1+Φf-ΦsΦf

1-Φs-Φf

-Φs

sin2θ

cos2θ

α

β=

General AnalysisA|0sinθ|Goodcosθ|Bad

Q(Φs,Φf)A|0αsinθ|Goodβcosθ|Bad

-ΦsΦf

-1+Φf-ΦsΦf

1-Φs-Φf

-Φs

sin2θ

cos2θ

α

β=

Φs = Φf = -1

-1

-3

3

1

sin2θ

cos2θ

α

β=

General AnalysisA|0sinθ|Goodcosθ|Bad

Q(Φs,Φf)A|0αsinθ|Goodβcosθ|Bad

-ΦsΦf

-1+Φf-ΦsΦf

1-Φs-Φf

-Φs

sin2θ

cos2θ

α

β=

Φs = Φf = i

1

i

1-2i

-i

sin2θ

cos2θ

α

β=

General AnalysisA|0sinθ|Goodcosθ|Bad

Q(Φs,Φf)A|0αsinθ|Goodβcosθ|Bad

-ΦsΦf

-1+Φf-ΦsΦf

1-Φs-Φf

-Φs

sin2θ

cos2θ

α

β=

Φs = Φf = eπi/3

-e2πi/3

0

1-2eπi/3

-eπi/3

sin2θ

cos2θ

α

β=

General AnalysisA|0sinθ|Goodcosθ|Bad

Q(Φs,Φf)A|0αsinθ|Goodβcosθ|Bad

-ΦsΦf

-1+Φf-ΦsΦf

1-Φs-Φf

-Φs

sin2θ

cos2θ

α

β=

Φs = Φf such that Re(Φs)>0

<1

sin2θ

cos2θ

α

β=

? ?

?

The Recipe

Algorithm A,

Verifier f, f:{1,2,,N}{0,1}

A|0|0∑i=1 i|i N

Q = -AS0A-1Sf

S0|0 = |0 S0|i = |i (i≠0)

Sf|i = |i (f(i)=1) Sf|i = |i (f(i)=0)

Define reflections:

Amplitude Amplification operator:

- -