Quantum Speedups DoRon Motter August 14, 2001. Introduction Two main approaches are known which...

33
Quantum Speedups DoRon Motter August 14, 2001
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    214
  • download

    0

Transcript of Quantum Speedups DoRon Motter August 14, 2001. Introduction Two main approaches are known which...

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

• The second approach is Grover’s search

Notation

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

• Hn denote taking the tensor product n times

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

Quantum Fourier Transform

• The same transformation

• On an orthonormal basis defined as

1

0

/π21 N

k

Nijk keN

j

1,,0 N

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

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

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

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

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

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

QFT: Implementation

QFT: Implementation

• What is the effect of ?

• Recall:

• Symbolically

102

1

102

11

102

10

.02 ijii ej π

jH

11

11

2

1H

QFT: Implementation

• What is the effect of ?

• Notice:

11

00

2/2 kie π

jR

kik e

R 2/20

01π

QFT: Implementation

• Using these effects we can verify the circuit

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 ππ

QFT: Implementation

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

QFT: Implementation

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 ππ

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 πππ

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

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;

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

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

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

Grover Iteration

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

• This can be written

0

I002

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

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

Grover’s Search

• Takes: A black box oracle O which performs

• n+1 qubits in the state

)(xfqxqxO

0

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 π

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

Conclusion