Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm...

24
Faster quantum algorithm for evaluating game trees Ben Reichardt x 9 x 5 x 6 x1 x1 x 9 x 8 x 7 x 5 x 4 x 2 x 3 AND OR AND AND AND OR OR ϕ(x) x 1 x 1 University of Waterloo

Transcript of Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm...

Page 1: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Faster quantum algorithm for evaluating game treesBen Reichardt x9x5x6x1 x1x9

x8x7

x5

x4x2 x3

AND OR AND

AND

AND

OR

OR

!(x)

x1x1

University of Waterloo

Page 2: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

x9x5x6x1 x1x9

x8x7

x5

x4x2 x3

AND OR AND

AND

AND

OR

OR

!(x)

x1x1

Problem: Evaluate the AND-OR formula with minimal queries to the input bits xi.

Page 3: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

x9x5x6x1 x1x9

x8x7

x5

x4x2 x3

AND OR AND

AND

AND

OR

OR

!(x)

x1x1

Motivations:

• Two-player games (Chess, Go, …)- Nodes ↔ game histories

- White wins iff ∃ move s.t. ∀ responses, ∃ move s.t. …

• Decision version of min-max tree evaluation

- inputs are real numbers

- want to decide if minimax is ≥10 or not

• Model for studying effects of composition on complexity

Page 4: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

For balanced, binary formulas

α-β pruning is optimal ⇒ Randomized complexity N0.754

OR

AND

OR

AND AND AND AND

x1 x2 x3 x4 x5 x7x6 x8

!(x)

[Snir ‘85, Saks & Wigderson ’86, Santha ’95]

Deterministic decision-tree complexity = NAny deterministic algorithm for evaluating a read-once AND-OR formula must examine every leaf

N0.51 ≤ Randomized complexity ≤ N [Heiman, Wigderson ’91]

(see also K. Amano, Session 12B Tuesday)

Page 5: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Deterministic decision-tree complexity = NN0.51 ≤ Randomized complexity ≤ N

Quantum query complexity = √N (very special case of the next talk)

This talk: What is the time complexity for quantum algorithms?

U0qu

ery x U1

quer

y x … UT f(x)

w/ prob. ≥2/3

|1!+ |2! "# ($1)x1|1!+ ($1)x2 |2!|x !

{0,1}

n ||j! (!1)xj |j"

Page 6: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

OR

AND

OR

AND AND AND AND

x1 x2 x3 x4 x5 x7x6 x8

!(x)

Farhi, Goldstone, Gutmann ’07 algorithm

• Theorem ([FGG ’07]): A balanced binary AND-OR formula can be evaluated in time N½+o(1).

Page 7: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

• Theorem ([FGG ’07]): A balanced binary AND-OR formula can be evaluated in time N½+o(1).

• Convert formula to a tree, and attach a line to the root

• Add edges above leaf nodes evaluating to one

=0

=1

Farhi, Goldstone, Gutmann ’07 algorithm

Page 8: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

OR

AND

OR

AND AND AND AND

x1 x2 x3 x4 x5 x7x6 x8

!(x)

Farhi, Goldstone, Gutmann ’07 algorithm

• Theorem ([FGG ’07]): A balanced binary AND-OR formula can be evaluated in time N½+o(1).

• Convert formula to a tree, and attach a line to the root

• Add edges above leaf nodes evaluating to one

Page 9: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

x11 = 0x11 = 1

=0

=1

!(x) = 0 !(x) = 1

Page 10: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

|!t! = eiAGt|!0!

!(x) = 0 !(x) = 1

Page 11: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

|!t! = eiAGt|!0!

Wave transmits!Wave reflects!

!(x) = 0 !(x) = 1

Page 12: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

!(x) = 0

What’s going on?

!""""""""""""#

""""""""""""$

Observe: State inside tree converges to energy-zero eigenstate of the graph

Page 13: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

!(x) = 0

What’s going on?

=0

=1!""""""""""""#

""""""""""""$

Observe: State inside tree converges to energy-zero eigenstate of the graph(supported on vertices that witness the formula’s value)

Page 14: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Energy-zero eigenvectors for AND & OR gadgets

• Identify the output edge of one gadget with an input edge of the next.

• (Note: all I/O edge weights are 1.)

• Corollary: Gφ(x) has an eigenvalue-zero eigenstate supported on root aO ⇔

φ(x)=1

1

2

OR:AND:

1

2

+1+1

-1

-1

-1

-1

Together in a formula:

+1

-1

-1

+1

+1 Input adds constraints via dangling edges:

G0

Page 15: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Balanced AND-OR formula evaluation in O(√n) time

Squared norm =

+1

-1

-1

+1

+1

+1

+1

+1

+1

1 + 2 + 2 + 4 + 4 + 8 + 8 + · · · + 212 log2 n = O(

!n)

· · ·

1

2

2

Page 16: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Effective spectral gap lemma

If M u ≠ 0, then M u ⊥ Kernel(M✝)! !!

by the SVD M =!

!

! |v!!"u!| !

!!!!! !projection of M u onto the

span of the left singular vectors of M with singular values ≤λ

≤ λ u

!!!!!

!!!

!since !!!M!u!2 =

!

!!"

"2|"u!|u#|2

Page 17: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Squared norm = O(√n)

1

2

2

-1

-1

+1

+1

+1

+1

+1

+1

· · ·1/n¼

1/n¼

Case φ(x)=1

Constant overlap on root vertex

Page 18: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Case φ(x)=1

Eigenvalue-zero eigenvector with constant overlap on root vertex

Case φ(x)=0

!!!!! !projection of M u onto the

span of the left singular vectors of M with singular values ≤λ

≤ λ u

!!!!!

!!!

n!

-1

-1

+1

+1

+1

+1

+1

+1

· · ·1/n!

1/n!

· · ·1/n¼

1/n¼

n¼-n¼

u!

1M u!

root√n

Root vertex has Ω(1/√n) effective spectral gap

Page 19: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Case φ(x)=1

Eigenvalue-zero eigenvector with constant overlap on root vertex

Case φ(x)=0

n!

-1

-1

+1

+1

+1

+1

+1

+1

· · ·1/n!

1/n!

Root vertex has Ω(1/√n) effective spectral gap

· · ·1/n!

1/n!

n!-n!

n!

n!

u!

1

M u!

Quantum algorithm: Run a quantum walk on the graph, for √n steps from the root.

• φ(x)=1 ⇒ walk is stationary

• φ(x)=0 ⇒ walk mixes

Page 20: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Evaluating unbalanced formulas[Ambainis, Childs, Reichardt, Špalek, Zhang ’10]

Proper edge weights on an unbalanced formula give √(n·depth) queries

depth n, spectral gap 1/n

“Rebalancing” Theorem: For any AND-OR formula with n leaves, there is an equivalent formula with n e√log n leaves, and depth e√log n

[Bshouty, Cleve, Eberly ’91, Bonet, Buss ’94]

n e√log n leaves, and depth (log n) e√log n

O(√n e√log n)query algorithm⇒

Today: O(√n log n)

Page 21: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Tensor-product composition

OR: AND:

Direct-sum composition

Page 22: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

! " !

Tensor-product compositionDirect-sum composition

Page 23: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Tensor-product composition

! "

Properties• Depth from root stays ≤2

— 1/√n spectral gap

• Graph stays sparse—provided composition is along the maximally unbalanced formula

• Middle vertices Maximal false inputs

010100

00101100

01010

10010

00100

Page 24: Faster quantum algorithm for evaluating game treesbreichar/talks/Faster...Faster quantum algorithm for evaluating game trees Ben Reichardt x 1 x 6 x 9 x 5 x 9 x 7 x 8 x 5 x 2 x 3 x

Final algorithm

∧ ∨ ∧∧

sort

sub

form

ulas

by

size

• Identify the output edge of one gadget with an input edge of the next.

• (Note: all I/O edge weights are 1.)

• Corollary: Gφ(x) has an eigenvalue-zero eigenstate supported on root aO ⇔

φ(x)=1

• With direct-sum composition, large depth implies small spectral gap

• Tensor-product composition gives √n-query algorithm (optimal), but graph is dense and norm too large for efficient implementation of quantum walk

• Hybrid approach:• Decompose the formula into paths,

longer in less balanced areas• Along each path, tensor-product• Between paths, direct-sum

• Tradeoff gives 1/(√n log n) spectral gap, while maintaining sparsity and small norm⇒ Quantum walk has efficient implementation

(poly-log n after preprocessing)

ACRŠZ ’10

√n e√log n

today

√n log n