SlideShare a Scribd company logo
Quantum approach to information retrieval:
 Adiabatic quantum PageRank algorithm
                 arXiv:1109.6546



     with Silvano Garnerone and Paolo Zanardi

First NASA Quantum Future Technologies Conference

     $:
The WWW
is a big place




                 www.worldwidewebsize.com
The WWW
is a big place
…
and is hard
to 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
Google to the rescue: Brin & Page, 1998




             Google scholar: >8500 citations
What does Google do?
Google calculates an eigenvector

          𝐺𝜋 = 𝜋
Google calculates an eigenvector

                        𝐺𝜋 = 𝜋
 𝜋 is the
stationary state
of a surfer hopping
randomly on the
web graph

the PageRank vector

 𝜋 𝑖 = rank of i’th page:
the relative time spent there by the random surfer
Google calculates an eigenvector

                        𝐺𝜋 = 𝜋
- G is a big matrix: dimension = number of webpages n.
  Updated about once a month
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
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
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
This talk
Can (adiabatic) quantum computation help to compute 𝜋 ?
This talk
Can (adiabatic) quantum computation help to compute 𝜋 ?

PageRank can be:

prepared with exp speedup

read out with poly speedup
for top-ranked log 𝑛 pages

Why?
gap of certain Hamiltonian
having PageRank as ground
state scales as
       1/poly log 𝑛

numerical evidence:
arXiv:1109.6546
Classical PageRank computation

  The PageRank is the principal eigenvector of G;
  unique eigenvector with maximal eigenvalue 1




                     𝐺𝜋 = 𝜋
  How do you get the PageRank, classically?
Classical PageRank computation
                                 1
                         𝐺 = 𝛼𝑆 + 1 − 𝛼 𝐸
                                 𝑛

Power method: G is a Markov (stochastic) matrix, so




 Guaranteed to converge for any initial probability vector.

 Scaling?
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
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]
Classical computation is already efficient;
       why do we need quantum?
    power method:       Markov chain Monte Carlo:
              log(𝜖)
    time ~ 𝑠𝑛               𝑂[𝑛 log(𝑛)]
              log(𝛼)
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.
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 𝑛 ]
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
Quantum approach

Adiabatic quantum computation of the PageRank vector
Adiabatic quantum computation




           ℎ 𝑠 𝑡   = 1 − 𝑠 𝑡 ℎ0 + 𝑠(𝑡)ℎ 𝑃


                       initial Hamiltonian   problem Hamiltonian
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.
The q-algorithm for PageRank
 𝑡 = 𝑇: evolve to ground state of the final Hamiltonian



 The problem Hamiltonian is ℎ 𝑝 =                𝐼 − 𝐺 † (𝐼 − 𝐺)
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)
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 same
ranking order as the PageRank,
and amplify higher ranked pages
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 + 𝑠(𝑡)ℎ 𝑃
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)
Testing the q-algo on webgraph models
We tested the algorithm on random webgraph models,
sparse, small-world, scale-free (power law degree distribution):
Testing the q-algo on webgraph models
We 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
Testing the q-algo on webgraph models
We 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−𝑝)
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)                  𝑑𝑠 𝜀
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)                    𝑑𝑠 𝜀
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 𝜀
So is this really an efficient q-algorithm?

• Problem 1: The Google matrix G is a full matrix...
     ℎ[𝑠(𝑡)] requires many-body interactions...
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 gives
matrix elements of ℎ 𝑠 𝑡   = 1 − 𝑠 𝑡 ℎ0 + 𝑠(𝑡)ℎ 𝑃        PageRank of page i

𝐻 𝑠 (in 1-excitation subspace) and ℎ(𝑠) have same spectrum  same 𝑇 scaling
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(𝑒 𝑖 )
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
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
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
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
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?

More Related Content

PDF
Research Summary: Scalable Algorithms for Nearest-Neighbor Joins on Big Traje...
PDF
Chip Package Co-simulation
PDF
Generating multi-jet events with MadGraph
PDF
Multinomial Logistic Regression with Apache Spark
PDF
A Load-Balanced Parallelization of AKS Algorithm
PPT
0006.scheduling not-ilp-not-force
PPTX
Kalman filter for object tracking
PPTX
Transfer Function
Research Summary: Scalable Algorithms for Nearest-Neighbor Joins on Big Traje...
Chip Package Co-simulation
Generating multi-jet events with MadGraph
Multinomial Logistic Regression with Apache Spark
A Load-Balanced Parallelization of AKS Algorithm
0006.scheduling not-ilp-not-force
Kalman filter for object tracking
Transfer Function

Viewers also liked (17)

PDF
Elementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
PPT
Hamilton
PDF
Steven Duplij - Generalized duality, Hamiltonian formalism and new brackets
PDF
Hamilton application
PPT
Distruct week 15 graphs theory (updated)
PDF
S. Duplij, Constraintless approach to singular theories, new brackets and mul...
PDF
N. Bilic - "Hamiltonian Method in the Braneworld" 1/3
PPT
Basic Ray Theory
PPT
The Variational Method
PPTX
Dirac's Positron
PPT
Time Dependent Perturbation Theory
PPT
Against Space
PPTX
Edith Hamilton’s Mythology Part 1: The Gods
PPT
Time Independent Perturbation Theory, 1st order correction, 2nd order correction
PPT
Lagrange's Theorem
PPTX
Lecture7
PDF
3 Things Every Sales Team Needs to Be Thinking About in 2017
Elementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
Hamilton
Steven Duplij - Generalized duality, Hamiltonian formalism and new brackets
Hamilton application
Distruct week 15 graphs theory (updated)
S. Duplij, Constraintless approach to singular theories, new brackets and mul...
N. Bilic - "Hamiltonian Method in the Braneworld" 1/3
Basic Ray Theory
The Variational Method
Dirac's Positron
Time Dependent Perturbation Theory
Against Space
Edith Hamilton’s Mythology Part 1: The Gods
Time Independent Perturbation Theory, 1st order correction, 2nd order correction
Lagrange's Theorem
Lecture7
3 Things Every Sales Team Needs to Be Thinking About in 2017
Ad

Similar to zanardi (20)

PPT
Link Analysis
PPT
Link Analysis
PDF
Random web surfer pagerank algorithm
PPTX
Page rank method
DOC
Done reread thecomputationalcomplexityoflinkbuilding
PPTX
PageRank Algorithm In data mining
PDF
Markov chains and page rankGraphs.pdf
PDF
A Generalization of the PageRank Algorithm : NOTES
PDF
Page rank
PDF
Page rank
DOC
Done reread deeperinsidepagerank
PDF
Deeper Inside PageRank (NOTES)
PDF
Link Analysis
PPTX
Data Mining Lecture_12.pptx
PPTX
Graph Mining_Module-3_CS7 (PageRank).pptx
PDF
Google in Quantum Network
PPT
The Maths behind Web search engines
PPT
PAGERANK
PPT
Pagerank
Link Analysis
Link Analysis
Random web surfer pagerank algorithm
Page rank method
Done reread thecomputationalcomplexityoflinkbuilding
PageRank Algorithm In data mining
Markov chains and page rankGraphs.pdf
A Generalization of the PageRank Algorithm : NOTES
Page rank
Page rank
Done reread deeperinsidepagerank
Deeper Inside PageRank (NOTES)
Link Analysis
Data Mining Lecture_12.pptx
Graph Mining_Module-3_CS7 (PageRank).pptx
Google in Quantum Network
The Maths behind Web search engines
PAGERANK
Pagerank
Ad

Recently uploaded (20)

PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
Pharma ospi slides which help in ospi learning
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Basic Mud Logging Guide for educational purpose
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
Week 4 Term 3 Study Techniques revisited.pptx
Pharma ospi slides which help in ospi learning
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPH.pptx obstetrics and gynecology in nursing
Basic Mud Logging Guide for educational purpose
Abdominal Access Techniques with Prof. Dr. R K Mishra
Insiders guide to clinical Medicine.pdf
Microbial diseases, their pathogenesis and prophylaxis
Renaissance Architecture: A Journey from Faith to Humanism
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Final Presentation General Medicine 03-08-2024.pptx
102 student loan defaulters named and shamed – Is someone you know on the list?
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
RMMM.pdf make it easy to upload and study
STATICS OF THE RIGID BODIES Hibbelers.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf

zanardi

  • 1. Quantum approach to information retrieval: Adiabatic quantum PageRank algorithm arXiv:1109.6546 with Silvano Garnerone and Paolo Zanardi First NASA Quantum Future Technologies Conference $:
  • 2. The WWW is a big place www.worldwidewebsize.com
  • 3. The WWW is a big place … and is hard to 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. Google to the rescue: Brin & Page, 1998 Google scholar: >8500 citations
  • 6. Google calculates an eigenvector 𝐺𝜋 = 𝜋
  • 7. Google calculates an eigenvector 𝐺𝜋 = 𝜋 𝜋 is the stationary state of a surfer hopping randomly on the web graph the PageRank vector 𝜋 𝑖 = rank of i’th page: the relative time spent there by the random surfer
  • 8. Google calculates an eigenvector 𝐺𝜋 = 𝜋 - G is a big matrix: dimension = number of webpages n. Updated about once a month
  • 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. 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. 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. This talk Can (adiabatic) quantum computation help to compute 𝜋 ?
  • 13. This talk Can (adiabatic) quantum computation help to compute 𝜋 ? PageRank can be: prepared with exp speedup read out with poly speedup for top-ranked log 𝑛 pages Why? gap of certain Hamiltonian having PageRank as ground state scales as 1/poly log 𝑛 numerical evidence: arXiv:1109.6546
  • 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. Classical PageRank computation 1 𝐺 = 𝛼𝑆 + 1 − 𝛼 𝐸 𝑛 Power method: G is a Markov (stochastic) matrix, so Guaranteed to converge for any initial probability vector. Scaling?
  • 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. 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. Classical computation is already efficient; why do we need quantum? power method: Markov chain Monte Carlo: log(𝜖) time ~ 𝑠𝑛 𝑂[𝑛 log(𝑛)] log(𝛼)
  • 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. 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. 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. Quantum approach Adiabatic quantum computation of the PageRank vector
  • 23. Adiabatic quantum computation ℎ 𝑠 𝑡 = 1 − 𝑠 𝑡 ℎ0 + 𝑠(𝑡)ℎ 𝑃 initial Hamiltonian problem Hamiltonian
  • 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. The q-algorithm for PageRank 𝑡 = 𝑇: evolve to ground state of the final Hamiltonian The problem Hamiltonian is ℎ 𝑝 = 𝐼 − 𝐺 † (𝐼 − 𝐺)
  • 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. 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 same ranking order as the PageRank, and amplify higher ranked pages
  • 28. 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 + 𝑠(𝑡)ℎ 𝑃
  • 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. Testing the q-algo on webgraph models We tested the algorithm on random webgraph models, sparse, small-world, scale-free (power law degree distribution):
  • 31. Testing the q-algo on webgraph models We 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. Testing the q-algo on webgraph models We 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. 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. 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. 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. So is this really an efficient q-algorithm? • Problem 1: The Google matrix G is a full matrix...  ℎ[𝑠(𝑡)] requires many-body interactions...
  • 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 gives matrix elements of ℎ 𝑠 𝑡 = 1 − 𝑠 𝑡 ℎ0 + 𝑠(𝑡)ℎ 𝑃 PageRank of page i 𝐻 𝑠 (in 1-excitation subspace) and ℎ(𝑠) have same spectrum  same 𝑇 scaling
  • 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. 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. 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. 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. 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. 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?