Quantum random walks – new method for designing quantum algorithms Andris Ambainis University of...

Post on 04-Jan-2016

223 views 5 download

Transcript of Quantum random walks – new method for designing quantum algorithms Andris Ambainis University of...

Quantum random walks – new method for designing quantum algorithms

Andris AmbainisUniversity of Latvia

Quantum computing New model of computing, based on

quantum mechanics. More powerful than conventional

(classical) computing.

Talk outline

1. Main results of quantum computing.

2. The model.3. Quantum algorithms based on

quantum walks.

Shor’s algorithm Factoring: given N=pq, find p and q. Best algorithm - 2O(n1/3), n – number of

digits. Quantum algorithm - O(n3) [Shor, 94]. Cryptosystems based on hardness of

factoring/discrete log become insecure.

Grover's search

Find i such that xi=1. Queries: ask i, get xi. Classically, N queries required. Quantum: O(N) queries [Grover, 96]. Speeds up any search problem.

0 1 0 0...

x1 x2 xNx3

NP-complete problems Does this graph

have a Hamiltonian cycle?

Hamiltonian cycles are: Easy to verify; Hard to find (too

many possibilities).

Quantum algorithm

Let N – number of possible Hamiltonian cycles.

Black box = algorithm that verifies if the ith candidate – Hamiltonian cycle.

Quantum algorithm with O(N) steps.

0 1 0 0...

x1 x2 xNx3

Applicable to any search problem

Pell’s equation Given d, find the smallest solution

(x, y) to x2-dy2=1. Probably harder than factoring and

discrete logarithm. Best classical algorithms:

for factoring; 2O(N) for discrete logarithm.

)( 3/1

2 NO

Hallgren, 2001: Quantum algorithm for Pell’s equation.

Number theory and algebraic problems Polynomial time quantum

algorithms: Factoring [Shor, 94] Discrete logarithm [Shor, 94]; Pell’s equation [Hallgren, 02]. Principal ideal problem [Hallgren, 02]. Computing the unit group [Hallgren,

05].

Grover's search

Find i such that xi=1. Queries: ask i, get xi. Classically, N queries required. Quantum: O(N) queries [Grover, 96]. Speeds up any search problem.

0 1 0 0...

x1 x2 xNx3

Amplitude amplification [Brassard et al., 01] Algorithm A that finds a certain

object with probability . How many repetitions to achieve

probability 2/3? Classically, (1/). Quantum: O(1/). “Quantum black box”.

One way to design quantum algorithms

Search procedure

Amplify quantumly:

Classical algorithm + amplitude amplification

Quantum counting

Determine the fraction of xi=1. E.g., distinguish whether the fraction is 1/2- or 1/2+.

Classical random sampling: O(1/2) steps. Quantum: O(1/) steps.

0 1 0 0...

x1 x2 xNx3

Can be used for more complicated statistics.

Element distinctness

Numbers x1, x2, ..., xN.

Determine if two of them are equal. Classically: N queries. Quantum: O(N2/3).

7 9 2 1...

x1 x2 xNx3

Triangle finding [Magniez, Santha, Szegedy, 03]

Graph G with n vertices.

n2 variables xij; xij=1 if there is an edge (i, j).

Does G contain a triangle?

Classically: O(n2). Quantum: O(n1.3).

The model of quantum computing

Probabilistic computation Probabilistic system

with finite state space.

Current state: probabilities pi to be in state i.

1

2 3

4

0.6

0.1 0.2

0.1

i

ip 1

Quantum computation Current state:

amplitudes i to be in state i.

1

2 3

4

0.4+0.3i

-0.7 0.4-0.1i

0.3

i

i 12

For most purposes, real (but negative) amplitudes suffice.

Probabilistic computation Pick the next

state, depending on the current one.

1

2 3

4

2/3

1/3

Probabilistic computation

1

2 3

4

Transitions: rij - probabilities to move from i to j.

i

ijij rpp'2/3

1/3

Probabilistic computation Probability vector (p1, …, pM). Transitions:

before the transition

MMM

M

rr

rr

...

.........

...

1

111

transition probabilities

Mp

p

'

...

'1

after the transition

Mp

p

...1

Allowed transitions

R –stochastic: If i pi = 1, then i p’i = 1.

MMMM

M

M p

p

rr

rr

p

p

...

...

.........

...

'

...

' 1

1

1111

Quantum computation Amplitude vector (1, …, M),

. Transitions:

before the transition

MMM

M

uu

uu

...

.........

...

1

111

transition matrix

M'

...

'1

after the transition

M

...1

i

i 12

Allowed transitions

U – unitary: If , then .

MMM

M

uu

uu

...

.........

...

1

111

M'

...

'1

M

...1

i

i 12

ii 1'2

Geometric interpretation (1, …, M),

- vectors on the unit sphere.

Transformations that preserve - rotations of the unit sphere.

i

i 12

i

i 12

1

0

Summary so far Quantum probabilistic with

complex probabilities. Instead of i pi = 1 we have

(l2 norm instead of l1). i

i 12

How do we go from quantum world to conventional world?

Measurement

Quantum state:

1 1 + 2 2 + … + M M

|1|2

1

prob. |2|2

2

|M|2

M…

Measurement

Quantum walks and quantum algorithms

1. Quantum random walks.2. Grover’s quantum search

algorithm.3. Quantum walks + quantum

algorithms.

Random walk on line

Start at location 0.

At each step, move left with probability ½, right with probability ½.

-2 -1 0 1 2... ...

Random walk on line

State (x, d), x –location, d-direction. At each step,

Let d=left with prob. ½, d=right w. prob. ½.

(x, left) => (x-1, left); (x, right) => (x+1, right).

-2 -1 0 1 2... ...

Quantum walk on line

States |x, d, x –location, d-direction.

-2 -1 0 1 2... ...

rightxleftxrightx

rightxleftxleftx

,|2

1,|

2

1,|

,|2

1,|

2

1,|

rightxrightx

leftxleftx

,1,

,1,

“Coin flip”:

Shift:

Quantum walk on line

-2 -1 0 1 2... ...

-2 -1 0 1 2... ...

Left:

Right:

Quantum walk on line

-2 -1 0 1 2... ...

-2 -1 0 1 2... ...

Left:

Right:

Quantum walk on line

-2 -1 0 1 2... ...

-2 -1 0 1 2... ...

Left:

Right:

Quantum walk on line

-2 -1 0 1 2... ...

-2 -1 0 2... ...

Left:

Right:

Quantum walk on line

-2 -1 0 1 2... ...

-2 -1 0... ...

Left:

Right:

1

Quantum walk on line

-2 -1 0 1 2... ...

-2 -1 0... ...

Left:

Right:

1

Quantum walk on line

-2 -1 0 1 2... ...

-2 -1 0... ...

Left:

Right:

1

Quantum walk on line

-2 -1 0 1 2... ...

-2 -1 0... ...

Left:

Right:

1

-3

-3

3

2

1/21/8 1/8

1/8 1/8

Classical vs. quantum

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0.18

0.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

0.00E+00

5.00E-02

1.00E-01

1.50E-01

2.00E-01

2.50E-01

3.00E-01

3.50E-01

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Run for t steps, measure the final location.

Distance: (N) Distance: (N)

Grover’s quantum search algorithm

Grover's search

Find i such that xi=1. Queries: ask i, get xi.

0 1 0 0...

x1 x2 xNx3

Queries in the quantum world States |1, |2, …, |N. Query:

|i |i, if xi=0; |i -|i, if xi=1;

(a state with amplitude 1 at location i gets mappedto a state with amplitude –1 at i)

Queries in the quantum world

12 3

N…

xi=1

12

Grover’s algorithm times repeat:

Query; Diffusion transformation:

N4

NNN

NNN

NNN

21...

22............

2...

21

2

2...

221

Analysis of Grover’s algorithm

For simplicity, assume exactly one i:xi=1.

N

1

… N

1

N

1

1st query

Diffusion transformation

N

1

N

1

Inversion against average

N

1

N

1

N

3

D

2nd query

N

1

N

1

N

3

N

1

N

1

N

3

N

3

2nd diffusion

N

1

N

1

N

3

N

3

N

1

N

1

N

3

N

3

N

5

Grover: summary Query+diffusion increases the

amplitude of i:xi=1, decreases the amplitude of i:xi=0.

After repetitions the amplitude of i: xi=1 is almost 1.

Measuring at this point gives the solution i.

N4

Why N?

Probabilities vs. amplitudes

Probabilities: 1/N probability to

query the right i in 1 step.

N steps to obtain the probability 1.

Amplitudes: The amplitude of

the right i is 1/N. Each

query+diffusion increases it by 2/N.

After N steps it becomes 1.

Measurement: amplitude 1 probability 12=1.

Grid with N elements. Task: find the location

storing a certain value. In one step, we can

check the current location or move distance 1.

Search on grids

[Benioff, 2000] n* n grid. Distance between

opposite corners = 2n. Grover’s algorithm

takes

steps. No quantum speedup.

nnn

Quantum walks solve this problem!

Quantum walk search [Szegedy, 04]

Finite search space. Some elements might

be marked. Find a marked

element!

1

2 3

4 5

6 Perform a random

walk, stop after finding a marked element.

Conditions on Markov chain

Random walk must be symmetric: pxy=pyx.

Start state = uniformly random state.

T = expected time to reach marked state, if there is one.

1

2 3

4 5

6

Main result [Szegedy, 04]

Theorem Assume that:1. There are no marked states, or2. A marked state is reached in

expected time at most T.

A quantum algorithm can distinguish the two cases in time O(T).

Quadratic speedup for a variety of problems.

Application 1 N states. Is there a marked state? Random walk: at each

step move to a randomly chosen vertex.

Finds a marked vertex in N expected steps.

Quantum: O(N) steps[Grover]

Application 2: search on grids

Random walk: at each step move to a random neighbour.

Finding marked state: O(N log N) steps.

Quantum algorithm:

[A, Kempe, Rivosh, 2005]

Application 3: element distinctness

Numbers x1, x2, ..., xN.

Determine if two of them are equal. Well studied problem in classical CS. Classically: N steps.

7 9 2 1...

x1 x2 xNx3

Johnson graph Vertices: sets S, |S|

=k, S{1, 2, …, N}. Edges: (S, T), for S, T

that differ only in 1 element.

{1, 2, 3}

{1, 2, 4} {1, 3, 5}

{2, 3, 4} {3, 4, 5}

Random walk Marked vertices =

those for which S contains i, j: xi = xj.

Random walk in which we maintain xi, iS.

{1, 2, 3}

{1, 2, 4} {1, 3, 5}

{2, 3, 4} {3, 4, 5} K queries to start; 1 query to move to

adjacent vertex.

Search by random walk Time to find a marked

vertex: K queries to start; moving

steps.

{1, 2, 3}

{1, 2, 4} {1, 3, 5}

{2, 3, 4} {3, 4, 5}

K

NO

2

Quantum:

k

NO

Quantum algorithm Quantum time:

K queries to start; moving

steps.

Total:

{1, 2, 3}

{1, 2, 4} {1, 3, 5}

{2, 3, 4} {3, 4, 5}

k

NO

k

NkO

K=N2/3 O(N2/3)

Triangle finding [Magniez, Santha, Szegedy, 03]

Graph G with n vertices.

n2 variables xij; xij=1 if there is an edge (i, j).

Does G contain a triangle?

Classically: O(n2). Quantum: O(n1.3).

Matrix multiplication [Buhrman, Špalek, 05] A, B, C – n*n matrices. Finding C=AB: O(n2.37…) steps; Given A, B and C, we can test

AB=C in: O(n2) steps by a probabilistic

algorithm; O(n5/3) steps by a quantum algorithm.

Inside the Szegedy’s black box

How do we turn random walksinto quantum algorithms?

Quantum walk State space with states |i. Starting state

Quantum walk with two transition rules: “usual” for unmarked

vertices; “special” for marked.

1

2 3

4 5

6

M

i

iM 1

1

Quantum walk algorithm No marked

vertices: The starting state

is unchanged.

Some marked vertices: The starting state is

changed at the marked vertices.

Changes spread and accumulate.

Run for sufficiently many steps, test if the system is still in the starting state.

As in Grover’s search…

N

1

N

1

N

3

N

3

N

1

N

1

N

3

N

3

N

5

Mathematics

Mp

p

...1 - vector of probabilities

1 step: P’ = MP

k steps: P’ = MkP

Eigenvectors and eigenvalues of M,M – transition matrix.

Mathematics II

Eigenvectors of M: v1, …, vN.

M vi= i vi

Mt vi= (i)t vi

Express starting distribution via eigenvectors:

i

iivP i

it

iit vPM

Mathematics III Random walk

Probability matrix M;

Expected time T to hit a marked vertex.

Quantum walk Unitary matrix U; Time T’ at which the

state becomes sufficiently different from the starting state.

TOT '

Other applications of quantum walks

“Glued trees” [Childs et al., 02]

Two full binary trees of depth d;

Randomly connect leaves of the two graphs.

“Glued trees” [Childs et al., 02]

Start position: the left root.

Task: find the other root.

Vertices and edges not labeled.

2d+2-2 vertices.

Any classical algorithm takes (cd) steps.

“Glued trees” [Childs et al., 02]

Perform a quantum walk, starting from the left root.

After O(d2) steps, a quantum walk is at the right root.

Exponential speedup: O(d2) vs (cd).

[A, Childs, et al., 07] AND-OR formula of size M. Variables accessed by

queries: ask i, get xi. Theorem Any formula can

be evaluated with O(M1/2+o(1)) queries.

AND

OR OR

x11 x22 x33 x44

Speedup for anything that canbe expressed as a formula

Conclusion Quantum walks can be used to

design quantum algorithms for many problems.

Quantum walk search: create a classical random walk, quantize it with a speedup.

“Quantum black box” within a classical algorithm.

Building a quantum computer Classical computer operates on bits (0

or 1). Quantum bit: a system with basis

states |0, |1, general state 0|0+ 1|1.

Need physical systems that act like quantum bits…

10s of candidates…

NMR quantum computing (IBM, Waterloo, etc.)

Quantum computer = molecule.

Quantum bits = nuclear spins.

Operations performed using magnetic fields.

Spin – property that determines how the particle behave in a magnetic field

0, 1

NMR quantum computing

12 quantum bits (IQC): Creating a certain

quantum state. 7 quantum bits

(IBM): Factoring 15; Grover’s search

among 4 items.

Quantum cryptography Secure data

transmission, using quantum mechanics.

Only requires single quantum bits.

Implemented over 200km distance.

Available commercially.

QKD device ofId Quantique(Geneva)