zanardi

627 views

Published on

Published in: Education, Technology, Sports
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
627
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

zanardi

  1. 1. Quantum approach to information retrieval: Adiabatic quantum PageRank algorithm arXiv:1109.6546 with Silvano Garnerone and Paolo ZanardiFirst NASA Quantum Future Technologies Conference $:
  2. 2. The WWWis a big place www.worldwidewebsize.com
  3. 3. The WWWis a big place…and is hardto search www.worldwidewebsize.com "The certitude that some shelf in some hexagon held precious books and that these precious books were inaccessible seemed almost intolerable" J.L. Borges in The library of Babel
  4. 4. Google to the rescue: Brin & Page, 1998 Google scholar: >8500 citations
  5. 5. What does Google do?
  6. 6. Google calculates an eigenvector πΊπœ‹ = πœ‹
  7. 7. Google calculates an eigenvector πΊπœ‹ = πœ‹ πœ‹ is thestationary stateof a surfer hoppingrandomly on theweb graphthe PageRank vector πœ‹ 𝑖 = rank of i’th page:the relative time spent there by the random surfer
  8. 8. Google calculates an eigenvector πΊπœ‹ = πœ‹- G is a big matrix: dimension = number of webpages n. Updated about once a month
  9. 9. Google calculates an eigenvector πΊπœ‹ = πœ‹- G is a big matrix: dimension = number of webpages n. Updated about once a month- G is computed from the directed adjacency matrix of the webgraph 1 𝐺 = 𝛼𝑆 + 1 βˆ’ 𝛼 𝐸 𝑛 hyperlink matrix of webgraph, normalized columns; reflects the directed connectivity structure of the webgraph
  10. 10. Google calculates an eigenvector πΊπœ‹ = πœ‹- G is a big matrix: dimension = number of webpages n. Updated about once a month- G is computed from the directed adjacency matrix of the webgraph + random hopping to avoid traps from nodes with no outgoing links: 1 𝐺 = 𝛼𝑆 + 1 βˆ’ 𝛼 𝐸 𝑛 matrix of all 1’s hyperlink matrix of webgraph, normalized columns; reflects the β€œteleport” parameter: 0.85 directed connectivity structure of the webgraph
  11. 11. Google calculates an eigenvector πΊπœ‹ = πœ‹- G is a big matrix: dimension = number of webpages n. Updated about once a month- G is computed from the directed adjacency matrix of the webgraph + random hopping to avoid traps from nodes with no outgoing links: 1 𝐺 = 𝛼𝑆 + 1 βˆ’ 𝛼 𝐸 𝑛 matrix of all 1’s hyperlink matrix of webgraph, normalized columns; reflects the β€œteleport” parameter: 0.85 directed connectivity structure of the webgraph- G is a β€œprimitive” matrix (𝐺 𝑖𝑗 β‰₯ 0, βˆƒπ‘˜ > 0 s.t. (𝐺 𝑖𝑗 ) π‘˜ > 0, βˆ€π‘–, 𝑗):Perron-Frobenius theorem  πœ‹ is unique, and a probability vector: πœ‹ encodes the relative ranking of the nodes of the webgraph
  12. 12. This talkCan (adiabatic) quantum computation help to compute πœ‹ ?
  13. 13. This talkCan (adiabatic) quantum computation help to compute πœ‹ ?PageRank can be:prepared with exp speedupread out with poly speedupfor top-ranked log 𝑛 pagesWhy?gap of certain Hamiltonianhaving PageRank as groundstate scales as 1/poly log 𝑛numerical evidence:arXiv:1109.6546
  14. 14. Classical PageRank computation The PageRank is the principal eigenvector of G; unique eigenvector with maximal eigenvalue 1 πΊπœ‹ = πœ‹ How do you get the PageRank, classically?
  15. 15. Classical PageRank computation 1 𝐺 = 𝛼𝑆 + 1 βˆ’ 𝛼 𝐸 𝑛Power method: G is a Markov (stochastic) matrix, so Guaranteed to converge for any initial probability vector. Scaling?
  16. 16. Classical PageRank computation 1 𝐺 = 𝛼𝑆 + 1 βˆ’ 𝛼 𝐸 𝑛Power method: G is a Markov (stochastic) matrix, so Guaranteed to converge for any initial probability vector. Scaling? log(πœ–) time ~ 𝑠𝑛 |log(𝛼)| πœ– = desired accuracy s = sparsity of the adjacency (or hyperlink) matrix. Typically s~10
  17. 17. Classical PageRank computation Markov Chain Monte Carlo: Uses direct simulation of rapidly mixing random walks to estimate the PageRank at each node. time ~ 𝑂[𝑛 log(𝑛)] [Modulus of the second eigenvalue of G is upper-bounded by Ξ±  G is a gapped stochastic matrix  walk converges in time 𝑂[log 𝑛 ] per node]
  18. 18. Classical computation is already efficient; why do we need quantum? power method: Markov chain Monte Carlo: log(πœ–) time ~ 𝑠𝑛 𝑂[𝑛 log(𝑛)] log(𝛼)
  19. 19. Classical computation is already efficient; why do we need quantum? power method: Markov chain Monte Carlo: log(πœ–) time ~ 𝑠𝑛 𝑂[𝑛 log(𝑛)] log(𝛼) 𝑛 updating PageRank already takes weeks; will only get worse.
  20. 20. Classical computation is already efficient; why do we need quantum? power method: Markov chain Monte Carlo: log(πœ–) time ~ 𝑠𝑛 𝑂[𝑛 log(𝑛)] log(𝛼) 𝑛 updating PageRank already takes weeks; will only get worse. With q-adiabatic algo can prepare PageRank in time 𝑂[poly log 𝑛 ]
  21. 21. Classical computation is already efficient; why do we need quantum? power method: Markov chain Monte Carlo: log(πœ–) time ~ 𝑠𝑛 𝑂[𝑛 log(𝑛)] log(𝛼) 𝑛 updating PageRank already takes weeks; will only get worse. With q-adiabatic algo can prepare PageRank in time 𝑂[poly log 𝑛 ] Application: run successive PageRanks and compare in time 𝑂(1); use to decide whether to run classical update
  22. 22. Quantum approachAdiabatic quantum computation of the PageRank vector
  23. 23. Adiabatic quantum computation β„Ž 𝑠 𝑑 = 1 βˆ’ 𝑠 𝑑 β„Ž0 + 𝑠(𝑑)β„Ž 𝑃 initial Hamiltonian problem Hamiltonian
  24. 24. The q-algorithm for PageRank 𝑑 = 0: prepare ground state of the initial Hamiltonian Uniform superposition over the complete graph of n nodes. This requires log 𝑛 qubits so assume 𝑛 is power of 2.
  25. 25. The q-algorithm for PageRank 𝑑 = 𝑇: evolve to ground state of the final Hamiltonian The problem Hamiltonian is β„Ž 𝑝 = 𝐼 βˆ’ 𝐺 † (𝐼 βˆ’ 𝐺)
  26. 26. The q-algorithm for PageRank 𝑑 = 𝑇: evolve to ground state of the final Hamiltonian The problem Hamiltonian is β„Ž 𝑝 = 𝐼 βˆ’ 𝐺 † (𝐼 βˆ’ 𝐺)- Positive semidefinite, with 0 the unique min eigenvalue- If πΊπœ‹ = πœ‹ then |πœ‹ = πœ‹/ πœ‹ 2 is corresponding ground state of β„Ž 𝑝 Note for experts: since G is not reversible (doesn’t satisfy detailed balance) we cannot apply the standard β€œSzegedy trick” of quantum random walks (mapping to a discriminant matrix)
  27. 27. The q-algorithm for PageRank 𝑑 = 𝑇: evolve to ground state of the final Hamiltonian The problem Hamiltonian is β„Ž 𝑝 = 𝐼 βˆ’ 𝐺 † (𝐼 βˆ’ 𝐺)- Positive semidefinite, with 0 the unique min eigenvalue- If πΊπœ‹ = πœ‹ then |πœ‹ = πœ‹/ πœ‹ 2 , |πœ‹ 𝑖 β‰  πœ‹π‘– is corresponding ground state of β„Ž 𝑝Yet the amplitudes of the final ground state respect the sameranking order as the PageRank,and amplify higher ranked pages
  28. 28. Efficiency of the q-algorithmAccording to the adiabatic theorem, to get adiabatic error πœ€ ≔ 1 βˆ’ 𝑓 2 , fidelity 𝑓 ≔ | πœ“ 𝑇 |πœ‹ | actual final state desired ground statefor β„Ž 𝑠 𝑑 = 1 βˆ’ 𝑠 𝑑 β„Ž0 + 𝑠(𝑑)β„Ž 𝑃
  29. 29. Efficiency of the q-algorithm According to the adiabatic theorem, to get adiabatic error πœ€ ≔ 1 βˆ’ 𝑓 2 , fidelity 𝑓 ≔ | πœ“ 𝑇 |πœ‹ | actual final state desired ground state for β„Ž 𝑠 𝑑 = 1 βˆ’ 𝑠 𝑑 β„Ž0 + 𝑠(𝑑)β„Ž 𝑃 1 π‘‘β„Ž 1 need 𝑇~poly , max π‘ βˆˆ[0,1] , min π‘ βˆˆ[0,1] (gap) 𝑑𝑠 πœ€- not necessarily min gap βˆ’2 : can have -1 (best case) or -3 (worst case)- scaling of numerator can be important; needs to be checked DAL, A. Rezakhani, and A. Hamma, J. Math. Phys. (2009)
  30. 30. Testing the q-algo on webgraph modelsWe tested the algorithm on random webgraph models,sparse, small-world, scale-free (power law degree distribution):
  31. 31. Testing the q-algo on webgraph modelsWe tested the algorithm on random webgraph models,sparse, small-world, scale-free (power law degree distribution):- preferential attachment model links are added at random with a bias for high-degree nodes drawback: requires global knowledge of graph Degree distribution: 𝑁(𝑑) ∝ 𝑑 βˆ’3
  32. 32. Testing the q-algo on webgraph modelsWe tested the algorithm on random webgraph models,sparse, small-world, scale-free (power law degree distribution):- preferential attachment model links are added at random with a bias for high-degree nodes drawback: requires global knowledge of graph Degree distribution: 𝑁(𝑑) ∝ 𝑑 βˆ’3- copy-model - start from a small fixed initial graph of constant out-degree - each time step: - choose pre-existing β€œcopying vertex” uniformly at random - Probability 1 βˆ’ p: For each neighbor of the copying vertex, add a link from a new added vertex to that neighbor - Probability p: add link from newly added vertex to uniformly random chosen one requires only local knowledge of graph; has tuning parameter p Degree distribution: 𝑁 𝑑 ∝ 𝑑 (2βˆ’π‘)/(1βˆ’π‘)
  33. 33. Efficiency of the q-algorithm numerical diagonalization ave. min gap scaling: [Note: we computed same for generic sparse random matrices and found gap ~1/poly 𝑛 instead] 1 π‘‘β„Ž 1 𝑇~poly , max π‘ βˆˆ[0,1] , min(gap) 𝑑𝑠 πœ€
  34. 34. Efficiency of the q-algorithm preferential attachment, n=16, 1000 graphs run Schrodinger equation with different 𝑇: 𝑇~πœ€ βˆ’2 π‘‘β„Ž = 𝑑𝑠 1 π‘‘β„Ž 1 𝑇~poly , max π‘ βˆˆ[0,1] , min(gap) 𝑑𝑠 πœ€
  35. 35. Efficiency of the q-algorithm Ξ΄~1/poly(log𝑛) & 𝑇~πœ€ βˆ’2 & π‘‘β„Ž =poly(loglog𝑛) 𝑑𝑠 1 π‘‘β„Ž 1 𝑇~poly , max π‘ βˆˆ[0,1] , small integer >0 min(gap) 𝑑𝑠 πœ€checked and confirmed using solution of the full Schrodinger equation, for 𝑏 = 3: actual error always less than πœ€
  36. 36. So is this really an efficient q-algorithm?β€’ Problem 1: The Google matrix G is a full matrix...  β„Ž[𝑠(𝑑)] requires many-body interactions...
  37. 37. So is this really an efficient q-algorithm?β€’ Problem 1: The Google matrix G is a full matrix...  β„Ž[𝑠(𝑑)] requires many-body interactions...β€’ Can be reduced to 1&2 qubit interactions by using one qubit per node: go from log(𝑛) qubits to 𝑛 qubits (unary representation), i.e., map to 𝑛-dim. β€œsingle particle excitation” subspace of 2 𝑛 -dim Hilbert space: probability of finding excitation at site i givesmatrix elements of β„Ž 𝑠 𝑑 = 1 βˆ’ 𝑠 𝑑 β„Ž0 + 𝑠(𝑑)β„Ž 𝑃 PageRank of page i𝐻 𝑠 (in 1-excitation subspace) and β„Ž(𝑠) have same spectrum  same 𝑇 scaling
  38. 38. Measuring the PageRankβ€’ Problem 2: Once the ground-state has been prepared one needs to measure the site occupation probabilities (πœ‹ 𝑖 )2 / πœ‹ 2 To recover the complete length-n PageRank vector takes βˆ— at least n measurements (Chernoff bound )  back to the classical performanceβ€’ Same problem as in the quantum algorithm for solving linear equations [Harrow, Hassidim, Lloyd, PRL (2009)]; actually our algorithm is an instance of solving linear equations, but assumes a lot more structure βˆ— To estimate ith prob. amplitude with additive error 𝑒 𝑖 need number of measurements ~ 1/poly(𝑒 𝑖 )
  39. 39. Measuring the PageRankβ€’ Problem 2: Once the ground-state has been prepared one needs to measure the site occupation probabilities (πœ‹ 𝑖 )2 / πœ‹ 2 To recover the complete length-n PageRank vector takes βˆ— at least n measurements (Chernoff bound )  back to the classical performanceβ€’ However: one is typically interested only in the top ranked pagesβ€’ For these pages we nevertheless obtain (again using the Chernoff bound) a polynomial speed-up for estimating the ranks of the top π₯𝐨𝐠 𝒏 pagesβ€’ This is because of the amplification of top PageRank entries and power-law distribution of the PageRank entries
  40. 40. Summary of results and applicationsβ€’ Can map adiabatic PageRank algo to Hamiltonians with 1&2 body interactions, with one qubit per nodeβ€’ Polynomial speed-up for top-log 𝑛 set of nodesβ€’ Exponential speedup in preparation of PageRank
  41. 41. Summary of results and applicationsβ€’ Can map adiabatic PageRank algo to Hamiltonians with 1&2 body interactions, with one qubit per nodeβ€’ Polynomial speed-up for top-log 𝑛 set of nodesβ€’ Exponential speedup in preparation of PageRank allows for an efficient decision procedure about updating of the classical PageRank: β€’ Prepare pre-perturbation PageRank state |πœ‹ : 𝑇~𝑂[poly log 𝑛 ] β€’ Prepare post-perturbation PageRank state |πœ‹β€² : 𝑇′~𝑂[poly log 𝑛′ ] β€’ Compute | πœ‹ πœ‹β€² | using the SWAP test: ~𝑂(1)  Decide whether update needed
  42. 42. Conclusionsβ€’ Information retrieval provides new set of problems for Quantum Computationβ€’ Given the existence of efficient classical algorithms it is non- trivial that QC can provide some form of speedupβ€’ The humongous size of the WWW is an important motivation to look for such a speedupβ€’ Showed tasks for which adiabatic quantum PageRank provides a speedup with respect to classical algorithms
  43. 43. Conclusionsβ€’ Information retrieval provides new set of problems for Quantum Computationβ€’ Given the existence of efficient classical algorithms it is non- trivial that QC can provide some form of speedupβ€’ The humongous size of the WWW is an important motivation to look for such a speedupβ€’ Showed tasks for which adiabatic quantum PageRank provides a speedup with respect to classical algorithmsβ€’ Why does it work? Sparsity alone seems insufficient.β€’ Other key features of the webgraph are β€’ small-world (each node reachable from any other is log(𝑛) steps) β€’ degree distribution of nodes is power-law Which of these is necessary/sufficient?

Γ—