33
Quantum Speedups DoRon Motter August 14, 2001

Quantum Speedups

  • Upload
    vida

  • View
    28

  • Download
    1

Embed Size (px)

DESCRIPTION

Quantum Speedups. DoRon Motter August 14, 2001. Introduction. Two main approaches are known which produce fast Quantum Algorithms The first, and main approach is the Quantum Fourier Transform This is used in number factoring, discrete logarithm, and other algorithms - PowerPoint PPT Presentation

Citation preview

Page 1: Quantum Speedups

Quantum Speedups

DoRon Motter

August 14, 2001

Page 2: Quantum Speedups

Introduction

• Two main approaches are known which produce fast Quantum Algorithms

• The first, and main approach is the Quantum Fourier Transform– This is used in number factoring, discrete

logarithm, and other algorithms

• The second approach is Grover’s search

Page 3: Quantum Speedups

Notation

• Let 0.j1j2j3…= j1/2+j2/4+j3/8…

• Hn denote taking the tensor product n times

Page 4: Quantum Speedups

Discrete Fourier Transform

• Defined as

– where 0 k N – 1

• Fast implementation takes O(N lg N)

1

0

/π21 N

j

Nijkjk ex

Ny

Page 5: Quantum Speedups

Quantum Fourier Transform

• The same transformation

• On an orthonormal basis defined as

1

0

/π21 N

k

Nijk keN

j

1,,0 N

Page 6: Quantum Speedups

Quantum Fourier Transform

• Alternately, on an n qubit computer, use the basis

• N=2n

12,,0 n

12

0

2/π22/2

1n

n

k

ijkn

kej

Page 7: Quantum Speedups

Quantum Fourier Transform

• That’s great, but how do you build it?– Rewriting QFT expression gives rise to a circuit

which implements it

12

0

2/π22/2

1n

n

k

ijkn

kej

Page 8: Quantum Speedups

Quantum Fourier Transform

12

0

2/π22/2

1n

n

k

ijkn

kej

1

01

1

0

2π2

2/1

1 ......2

1

kn

k

kij

nkkej

n

n

l

ll

1

0

1

0

2π2

12/1

...2

1

kl

k

ijkn

lnkej

n

ll

lk

ijkn

lnkej

l

ll

1

0

2π2

12/2

1

Page 9: Quantum Speedups

Quantum Fourier Transform

lk

ijkn

lnkej

l

ll

1

0

2π2

12/2

1

102

1 2π2

12/

lijn

lnej

2/

....0π2.0π2.0π2

2

101010 211

n

jjjijjiji nnnn eee

Page 10: Quantum Speedups

QFT: Gates

• To build the circuit for the QFT, we will need an additional gate:

• We’ll also need the Hadamard gate

kik e

R 2/20

01π

11

11

2

1H

Page 11: Quantum Speedups

QFT: Implementation

• Using R and H we can produce an efficient circuit for the QFT

• The circuit comes naturally since the formula for QFT has been decomposed into the product representation

Page 12: Quantum Speedups

QFT: Implementation

Page 13: Quantum Speedups

QFT: Implementation

• What is the effect of ?

• Recall:

• Symbolically

102

1

102

11

102

10

.02 ijii ej π

jH

11

11

2

1H

Page 14: Quantum Speedups

QFT: Implementation

• What is the effect of ?

• Notice:

11

00

2/2 kie π

jR

kik e

R 2/20

01π

Page 15: Quantum Speedups

QFT: Implementation

• Using these effects we can verify the circuit

Page 16: Quantum Speedups

QFT: Implementation

• Begin in initial state

• The first gate is the Hadamard gate on bit 1

• Next, apply R2

nji

n jjejj ...102

1... 2

.022/11

njjj ...1

njji

nji jjejje ...10

2

1...10

2

12

.022/12

.022/1

211 ππ

Page 17: Quantum Speedups

QFT: Implementation

Page 18: Quantum Speedups

QFT: Implementation

• Continue to apply R3…Rn, giving

• This produces the desired ‘factor’ in the product representation

njji jje ...10

2

12

.022/1

21π

njjji jje n ...10

2

12

....022/1

21π

2/

....0π2.0π2.0π2

2

101010 211

n

jjjijjiji nnnn eee

Page 19: Quantum Speedups

QFT: Implementation

Page 20: Quantum Speedups

QFT: Implementation

• The next level of the circuit acts similarly:

• Applying the Hadamard gate gives

njjji jje n ...10

2

12

....022/1

21π

njijjji jjee n ...1010

2

13

.02....022/2

221 ππ

Page 21: Quantum Speedups

QFT: Implementation

• Applying the gates R2…Rn-1 gives

After all gates are applied, the state will be

njjijjji jjee nn ...1010

2

13

....02....022/2

221 ππ

njijjji jjee n ...1010

2

13

.02....022/2

221 ππ

1010102

1 .02....02....022/

221 nnn jijjijjjin

eee πππ

Page 22: Quantum Speedups

QFT: Summary

• The QFT uses n(n+1)/2 gates not counting swaps

• QFT is unitary, since each gate is unitary

• Using the QFT is subtle– There is no way of directly accessing the result– There is no way (in general) of preparing the

initial state efficiently

Page 23: Quantum Speedups

Search Algorithms

• A simple example of search:

• Everyone’s second C++ program:for(int x = 2; x <= sqrt(n); ++x)

{

if( “n is divisible by x” )

return Composite;

}

return Prime;

Page 24: Quantum Speedups

Search Algorithms

• Oracle Search– Oracle(x) takes the value 1 iff x is a solution to the

search problem

• Grover’s search uses an oracle– In general, a unitary operator

• The specific oracle depends on the search desired

)(xfqxqxO

Page 25: Quantum Speedups

Grover Iteration

• Grover’s Search is the repeated application of a single operation– This operation is called the Grover operator, G

• Understanding G is key to understanding Grover’s search

Page 26: Quantum Speedups

Grover Iteration

• G consists of four ‘steps’1. Apply the Oracle operator O

2. Apply the Hadamard transform Hn

3. Give every basis state except a phase shift of –1

4. Apply the Hadamard transform Hn

0

Page 27: Quantum Speedups

Grover Iteration

• Give every basis state except a phase shift of –1

• This can be written

0

I002

Page 28: Quantum Speedups

Grover Iteration

• Consider the last 3 steps2. Apply the Hadamard transform Hn

3.

4. Apply the Hadamard transform Hn

Together these give:

I002

IHIH nn ψψ2002

Page 29: Quantum Speedups

Grover Iteration

• G consists of four ‘steps’1. Apply the Oracle operator O

2. Apply the Hadamard transform Hn

3.

4. Apply the Hadamard transform Hn

Together these give:

I002

OIψψ2

Page 30: Quantum Speedups

Grover’s Search

• Takes: A black box oracle O which performs

• n+1 qubits in the state

)(xfqxqxO

0

Page 31: Quantum Speedups

Grover’s Search

• Runtime:

• Procedure:– Initialize states:– Apply Hn to the first n quibits, and HX to the

last qubit– Apply the Grover iteration– Measure first n qubits

nO 2

4

2n

R π

Page 32: Quantum Speedups

Grover’s Search

• Procedure:– Initialize states:

– Apply Hn to the first n quibits, and HX to the last qubit

– Apply the Grover iteration

– Measure first n qubits

nO 2

4

2n

R π

00n

2

10

2

1 12

0

n

xn

x

2

10

2

12

12

0

n

xn

RxOIψψ

2

100x

Page 33: Quantum Speedups

Conclusion