Google in Quantum Network

11

Click here to load reader

Transcript of Google in Quantum Network

Page 1: Google in Quantum Network

arX

iv:1

112.

2079

v1 [

quan

t-ph

] 9

Dec

201

1

Google in a Quantum Network

G.D. Paparo and M.A. Martin-DelgadoDepartamento de Fısica Teorica I, Universidad Complutense, 28040. Madrid, Spain.

We introduce the characterization of a class of quantum PageRank algorithms in a scenario inwhich some kind of quantum network is realizable out of the current classical internet web, but noquantum computer is yet available. This class represents a quantization of the PageRank protocolcurrently employed to list web pages according to their importance. We have found an instanceof this class of quantum protocols that outperforms its classical counterpart and may break theclassical hierarchy of web pages depending on the topology of the web.

PACS numbers: 03.67.Ac, 03.67.Hk, 89.20.Hh, 05.40.Fb

I. INTRODUCTION

The possibility of establishing a quantum networkof practical use is currently under active investigation.Some early versions of them, modest as they may be,have been designed and realized in real world in the re-cent years [1–6], or in some instances they are under way.In fact, building a quantum network has been targetedas a fundamental goal in quantum information [7, 8] aneven a more feasible goal to accomplish than the firstscalable quantum computer. There are other more ad-vanced proposals for quantum networks [9, 10] based onentanglement connections that need quantum repeaters[11–13] in order to function properly and being stable[14–16]. Related to this, some physical quantum mod-els exhibit very remarkable long-distance entanglementproperties [17–20]. Another alternative to build differenttypes of quantum networks make use of quantum perco-lation protocols [21–24].Thus, it is interesting to study how different possibil-

ities of quantum networks would behave regarding whatwe know about the world wide web. In particular, an es-sential ingredient in the classical network that we enjoytoday is the ability to search web pages in the immensechanging world that the web has come to be known. Thekey tool for performing those searches is the notion ofthe PageRank algorithm [25–33].Since the notion of a quantum PabeRank is by no

means unique, it is convenient to introduce a class orcategory of possible quantum PageRanks. They mustsatisfy a set of properties that define an admissible class:Quantum PageRank Class:

P1 The classical PageRank must be embedded into thequantum class in such a way that the directed graphstructure is preserved at the quantum level.

P2 The sum of all quantum PageRanks must add to 1i.e.

i Iq(Pi) = 1.

P3 The Q-PageRank admits a quantized Markov Chain(MC) description.

P4 The classical algorithm to compute the quantumPageRank belongs to the computational complex-ity class P.

Property P1 reflects the fact originally we would havean internet that is a classical network represented by adirected graph and then shall apply some kind of quan-tization procedure in order to turn it into a quantumnetwork. The latter must be compatible with the clas-sical one, particularly preserving the directed structurewhich is crucial to measure a page’s authority. This isnon-trivial and some quantization methods may fail toproduce a unitary quantum PageRank importance for thequantum case, as shown in Sect.III.

With property P2 we guarantee that we have a globallywell-defined notion of the importance of a web page at thequantum level. This allows us to have the probabilisticinterpretation of the surfer’s position (see Sect.III).

Property P3 is the key to a wide class of natural quan-tization methods for the classical PageRank based in theequivalence of this one with a classical Markov chain pro-cess (see Sect.III). Thus, it is natural that the equivalentproperty holds true in the quantum version of the PageR-ank, and consequently, its description in terms of a quan-tized surfer’s motion.

The reason for property P4 relies on the assumptionthat we envisage a near-future scenario when a certainclass of quantum network will be operative but not yeta scalable quantum computer. Therefore, we demandthat the computation of the quantum PageRank Iq beefficiently carried out on a classical computer.

In this paper we have constructed a valid quantumPageRank that fulfills all these requirements. We remarkthat there may be other solutions to the quantum ver-sion of the PageRank within the class defined above, butnevertheless we shall show that finding one instance ofthis quantum PageRank class is a non-trivial task.

The explicit step-by-step description of our quantumPageRank algorithm is presented in Sect.IV. A key dis-tinctive feature of this quantum algorithm is that theimportance of the quantum pages exhibit quantum fluc-tuations unlike its classical counterpart. These quantumfluctuations, as shown in the simulations in Sect.V, showup in the form of time dependent importances Iq(Pi, t),which causes in turn that sometimes one certain pair ofpages satisfy Iq(Pi, t1) > Iq(Pj , t1), and some other timesthe relative importance is reversed Iq(Pi, t2) < Iq(Pj , t2),for time-steps such that t1 < t2. We may use an anal-

Page 2: Google in Quantum Network

2

ogy to understand this situation: the classical PageR-ank gives us a snapshot or photo with a fixed hierarchyof web pages according to their calculated importance.On the contrary, the quantum PageRank is more like amovie since the quantum importance of the pages varywith time. In order to produce a fixed output made ofa list with the quantum pages sorted according to theirimportance, a natural choice we make is to compute thetemporal average of the quantum PageRanks and theirstandard mean deviation.

There are additional features that a certain quantumPageRank may have as a consequence of the definition ofthe class above. We provide hereby several useful defini-tions:

Strong Hierarchical Preserving PageRank: whenthe classical hierarchical structure of a PageRank is pre-served upon quantization.

This notion is too strong when the PageRank varies withtime as it is the case at the quantum level.

Weak Hierarchical Preserving PageRank: whenthe node with highest classical PageRank is preservedafter quantization, but not so for the rest of pages.

Outperforming: when the highest classical PageRankof a page is overcome by the quantum PageRank of thatpage.

Outperforming may occur at one given instant or onaverage thereby leading to the natural extended conceptsof instantaneously outperforming or average outperform-ing, respectively.

In section VI we provide a list of main results that wehave obtained with our quantized version of the quantumPageRank algorithm. Remarkably, quantum fluctuationsmay change the classical hierarchy of web pages bothinstantaneously and in terms of mean values.

This paper is organized as follows: in Sect.II we give anintroduction to the classical notion of PageRank neededto present in Sect.III the quantum version of it. InSect.IV we present our proposal for a quantum version ofGoogle PageRank algorithm. In Sect.V we perform nu-merical simulations of the quantum algorithm to repre-sentative directed graphs representing either an intranetor a general web with no special symmetry. Sect.VI isdevoted to conclusions.

II. CLASSICAL PAGERANK

Brin and Page introduced Google in 1998 [25–27], atime when the pace at which the web was growing beganto outstrip the ability of current search engines to yielduseable results. A major distinction between their algo-rithm, called PageRank (PR), and previous approaches isthe fact that PR has an objective character, while othersearchers were based up on the subjective criterium ofthe contents of the pages , because they were built as acollection of links that people in companies stored on aregular basis. In order words, PR is dynamical while the

other approaches were static and subjective w.r.t. con-tents of the pages.The way most search engines, including Google, work

is to continually retrieve pages from the web, index thewords in each document, and store this information.Each time a user asks for a web search using a searchphrase, such as ”search engine”, the search engine de-termines outputs all pages on the web that contain thewords in the searched phrase or are semantically relatedto it.Then, a problem arises naturally: Google now claims

to index 50 billion pages. Roughly 95 % of the text in webpages is composed from a mere 10,000 words. This meansthat, for most searches, there will be a huge number ofpages containing the words in the search phrase. Whatis needed is a mean of ranking the importance of thepages that fit the search criteria so that the pages can besorted with the most important pages at the top of thelist. Their success is largely due to PageRank’s ability torank the importance of pages in the WWW.

A. Google PageRank

The key idea of Google PageRank algorithm is that theimportance of a page is given by how many pages link toit. If we define I(Pi) as the importance of a page Pi andBi as the set of pages linking to it, then we might thinkto put in equations the key idea put forward above asfollows:

I(Pi) :=∑

j∈Bi

I(Pj)

outdeg(Pj). (1)

Let us define a matrix, called the hyperlink matrix, inwhich the entry in the ith row and jth column is:

Hij :=

{

1/outdeg(Pj) if Pj ∈ Bi

0 otherwise(2)

We will also form a vector I whose components arethe PageRanks I(Pi). The condition above defining thePageRank can be expressed in matrix form as:

I = HI (3)

Thus, we have recast the problem of finding the PageR-anks as the problem of finding the eigenvalues of a ma-trix [28]. We are in for a special challenge since the ma-trix H is a square matrix with one column for each webpage indexed by Google. This means that H has aboutn = 50 billion columns and rows. However H is a sparsematrix, i.e. most of the entries in H are zero; in fact,studies show that web pages have an average of about10 links, meaning that, on average, all but 10 entries inevery column are zero.We will choose a method known as the power method

for finding the stationary vector I of the matrix H. Howdoes the power method work? We begin by choosing

Page 3: Google in Quantum Network

3

a vector I0 as a candidate for I and then producing asequence of vectors Ik by:

Ik+1 = HIk (4)

However, as it is formulated the PageRank algorithm willnot output a meaningful vector. We will need to patchthe procedure in various ways.

B. Patching the Algorithm

It can be seen that if there are dangling nodes, pagesthat are not linked to by any one, then the power methodwill output the null vector. If we consider the followingexample:

P1 P2

whose hyperlink matrix is:

H =

(

0 01 0

)

,

and start from I0 = (1, 0)t one ends up with I = (0, 0)t.The first patch in the tinkering of the PageRank algo-rithm will be replacing the column corresponding to adangling node with a column of all 1/n with n the num-ber of nodes. This means that virtually every danglingnode is linking to every single node in the web, includingitself. This prevents the power method from giving thenull vector. This way, the disconnected graph becomeseffectively connected at the price of giving a very lowweight to the artificial bonds (added links).The graph, with the addition of the extra links wouldlook like:

P1 P2

with a modified hyperlink matrix, E:

E =

(

0 1/21 1/2

)

The matrix E that we obtain is, in general, (column)stochastic, i.e. its columns all sum up to one. Fromthe theory of stochastic matrices one knows that 1 isalways an eigenvalue. Furthermore, the convergence ofIk = EIk−1 to I depends on the second eigenvalue of E,λ2. If it is smaller than 1, then the power method willconverge. In addition, it is more rapid if |λ2| is as closeto 0 as possible.Let us consider the graph in fig. 1, with E matrix:

P1 P2

P3 P4

Figure 1: (Color online) A graph whose matrix E’s secondeigenvalue, λ2, is zero (see text in section II).

P1 P2

P3 P4

Figure 2: (Color online) A graph that is not strongly con-

nected, or equivalently, whose matrix E’s is reducible (see textin section II).

E =

0 0 0 11 0 0 00 1 0 00 0 1 0

One can see that the second eigenvalue of E, |λ2| is equalto one in this case, and actually all the eigenvalues areon the circle of radius 1 in the complex plane. If wecompute I with the power method starting from, say,I0 = (1, 0, 0, 0)t it will fail to converge.We will need to patch the algorithm again to ensure

that |λ2| < 1. In order to guarantee it, we will requireE to be primitive, i.e. that there is an integer m suchthat Em contains all positive entries. The meaning ofthis assumption is that the graph is such that any pageis connected by a path of at least m links to any other.Anticipating the interpretation of a diffusion phe-

nomenon associated to searching the web, we can inter-pret the requirement of E to be primitive as the require-ment of finding the walker with nonzero probability onany site after a minimum time m. Let us now considerthe graph in fig. 2. One can divide the graph in twosubgraphs G1 and G2 . There are no links pointing fromthe subgraph G2, made of the nodes 3 and 4 to the firstsubgraph G1, made of nodes 1 and 2. If we write downthe matrix E:

E =

0 1/2 0 01/3 0 0 01/3 1/2 0 11/3 0 1 0

,

we can see that there is a block that is zero, precisely theone that carries the information of the edges linking thenodes of G2 to the nodes of G1.If we calculate I we find: I = (0, 0, 3/5, 2/5)t. Yet, one

is not satisfied from giving an interpretation to the vector

Page 4: Google in Quantum Network

4

I because the nodes from the first subgraph G1 have zeroimportance albeit being linked by other nodes. This iscaused by the reducibility of E that causes a drain ofimportance from G1 to G2. In order to have a meaningfulvector I, one that has all nonzero entries, one shoulddemand that the matrix be irreducible. A necessary andsufficient condition for it is that the graph is strongly

connected, i.e. that given two pages there is always apath connecting one to the other (see [29]) chap. 8).

1. The Patched Algorithm

In order to implement all these patches, let us imaginea walk of a surfer on the graph. With probability αthe surfer will follow the web with stochastic matrix Eand with probability 1 − α, it will jump to any page atrandom. The matrix of this process would be:

G := αE +(1 − α)

n1, (5)

where 1 is a matrix with entries all set to 1. Now, the ma-trix G is irreducible because the matrix 1 is irreducible.Furthermore, it is also primitive since it has all positiveentries. We have thus obtained a matrix that is bothprimitive and irreducible. This means it has a uniquestationary vector that may be calculated with the powermethod. Furthermore, the result does not depend on theinitial value I0 because the underlying graph is stronglyconnected, which is equivalent to the irreducibility of G,see [29].The parameter α is free and needs to be tuned. It isknown [30] that the second eigenvalue ofG λ2 is such thatλ2 ≤ α , so one would choose α as close to zero as possiblebut in this way the structure of the web, described by Ewould not be taken into account at all. Brin and pagechose α = 0.85 to optimize the calculation.

2. Formulation as a Random Walk

It is very appealing and useful to rethink the problemof assigning the importance of a page as the task of cal-culating the fraction of time a walker diffusing on thegraph according to the stochastic process given by theGoogle matrix G. In fact we, can reformulate the GooglePageRank as the algorithm that computes the fractionof the time the walker spends on each node by definingthe fraction on the jth page Tj as:

Ti =∑

j

GijTj . (6)

Equivalently, one can say that the operational meaning ofthe PageRank algorithm is to give the probability to findthe walker on the node Pi. Let us make it clearer by defin-ing a set of random variables: X(0), X(1), . . . , X(n), . . . ,

one for every time step. For each step, the random vari-able can take on values in the set of nodes {Pi} of theweb. We can recast Google PageRank in the language ofa Markov Chain (MC). Thus, from eq. (6) written as:

Pr(X = Pi) =∑

j

GijPr(X(n) = Pj) (7)

and from the law of total probability:

Pr(X(n+1) = Pi) =∑

j Pr(X(n+1) = Pi|X(n) = Pj) Pr(X

(n) = Pj),(8)

one can interpret the stochastic matrix G as the condi-tional probability linking one time step to the other, i.e.:

Gij = Pr(X(n+1) = Pi|X(n) = Pj). (9)

We will make use in the following of the latter interpreta-tion of Google PageRank to devise methods to quantizeit.

III. QUANTUM PAGERANKS

Quantum walks in their discrete time formulation wereknown already to Feynman [34] and since then, they wererediscovered many times [35] and in contexts as differentas quantum cellular automata [36, 37] and the haltingproblem of the quantum Turing machine [38, 39]. Forsimplicity, let us discuss possible ways for quantizing aquantum walk taking place on the line. Later, we shallgeneralize it to an arbitrary graph. From now on, weshall make the notation lighter denoting each node (orpage) Pi simply by i as shown in the following figure:

−2 −1 0 1 2

The naive way of quantizing this random walk would beto go from the index set {i | i ∈ Z} to a Hilbert space ofstates H = span{| i 〉 | i ∈ Z} as shown in figure 3:Following the key idea outlined above, one could definethe quantum importance of a page as:

I(Pi) = Pr(X = Pi) := 〈i|ψ 〉 (10)

| − 2 〉 | − 1 〉 |0 〉 |1 〉 |2 〉

Figure 3: (Color online) The naive way to quantize a randomwalk on a line.

Page 5: Google in Quantum Network

5

where |ψ 〉 is the state of the system after it has diffusedon the graph. However, this quantization procedure isnot viable. This is because the direct quantization of thetime step evolution operator as

U =√p |i+ 1〉〈i|+

1− p |i− 1〉〈i| (11)

is not unitary. Indeed, while 〈0|2〉 = 0 one has that〈0|U †U |2〉 6= 0 in the general case of p ∈ [0, 1].This difficulty can be overcome enlarging the Hilbertspace. There are various ways to do it:

• adding a coin spaceHC to each site on the quantumnetwork. A coin space encodes the possibility to goleft or right i.e. HC = span{|L〉, |R〉}.

• defining the Hilbert space as the space of (ori-ented) edges and treating the vertices as scatteringcenters. The resulting walk is called a ScatteringQuantum Walk.

• using Szegedy’s [40] procedure to quantize Markovchains.

We will discuss the latter way for it will give us avalid quantization of Google’s PageRank that satisfiesthe properties 1− 4 introduced in Sect.I.

3. Szegedy’s Quantization of Markov Chains

We have seen that the Google matrix G can be seenas the time step evolution operator of a MC Markovchain, or equivalently, of a discrete-time classical ran-dom walk: the two terms will be used interchangeablyfrom now on. Szegedy put forward a general scheme toquantize a Markov chain. Let G be a N × N stochasticmatrix representing a MC Markov chain on an N -vertexgraph. In order to introduce a discrete-time quantumwalk on the same graph we use as the Hilbert space thespan of all vectors representing the |V | × |V | (directed)edges of the graphs i.e. H = span{|i〉1|j〉2 ,with i, j ∈|V | × |V |} = C|V | ⊗ C|V | = CN ⊗ CN . The order of thespaces in the tensor product is important here becausewe are dealing with a directed graph. We stress this factin the notation using subindices 1 and 2. Let us definethe vectors:

|ψj〉 := |j〉1 ⊗N∑

k=1

Gkj |k〉2, (12)

that is a superposition of the vectors representing theedges outgoing from the jth vertex. The weights are givenby the (square root of the) stochastic matrix G.One can easily verify that due to the stochasticity of

G the vectors |ψj〉 for j = 1, 2, . . . ,N are normalized. Theoperator

Π :=

N∑

j=1

|ψj〉〈ψj |, (13)

is then a projector onto the equal superposition of thevectors |ψj〉 for j = 1, 2, . . . ,N. With this, the step of thequantum walk is then given by

U := S(2Π− 1) (14)

where S is the swap operator i.e.

S =

N∑

j,k=1

|j, k〉〈k, j|. (15)

Before continuing let us point out that the time stepoperator is unitary:

UU † = S(2Π−1)(2Π−1)S† = S(4Π2−2Π−2Π+1)S† = 1(16)

from the unitarity of S and the fact that Π is a projectorand squares to itself. Analogously:

U †U = (2Π− 1)S†S(2Π− 1) = 4Π2 − 2Π− 2Π + 1 = 1(17)

The time step is thus the effect of a coin flip followed bya swap operator. Let us look more closely at the coin flipoperation:

2Π− 1 =N∑

j=1

(

2 |ψj〉〈ψj | −1

N1

)

. (18)

The vectors |ψj〉 contain the information of the directedlinks that connect the jth node to all its neighbors towhich it is connected through the stochastic matrix G.The operator 2 |ψj〉〈ψj | − 1

N 1 is nothing but a reflectionaround |ψj〉 and has the effect of enhancing the ampli-tudes of the mentioned directed edges at the expenses ofthe others. The swap operator ensures that the step beunitary.

4. Solving the Eigenvalue Problem for the Walk Operator

The quantization procedure based on the unitary op-erator (14) allows us to get remarkable insight on theproperties of the walk by a systematic analysis of thespectral properties of U . The spectrum of the quantizedwalk is related to the spectrum of the original stochasticmatrix that in turn we have seen has a key role on theproperties of the related classical random walk.Let us define the following N ×N matrix D that will

play an important role in relating the spectra of the clas-sical and quantum walks by specifying its entries as fol-lows:

Dij :=√

GijGji , (19)

where there is no sum over repeated indexes. Let us alsodefine the following operatorA from the space of vertices,CN , to the space of edges, CN ⊗ CN :

A :=

N∑

j=1

|ψj〉〈j| (20)

Page 6: Google in Quantum Network

6

It has the following properties, which are straightforwardto prove:

1. A†A = 1

2. AA† = Π

3. A†SA = D

The matrix D is symmetric by construction. The eigen-value problem D|λ〉 = λ|λ〉 can in principle be solvedyielding N eigenvalues λ with the associated eigenvec-tors |λ〉:

σ(D) := {λ, |λ〉}. (21)

Let us now consider the the following vectors out ofthem: |λ〉 := A|λ〉 on the space of the quantized Markovchain i.e. CN ⊗ CN . In order to obtain the spectrum ofU , we will first isolate an invariant subspace for U andlook for eigenvalues and eigenvectors in this space. Wewill then concentrate on the orthogonal complement ofit. We will argue that the interesting part of the Hilbertspace for the dynamics is the aforementioned invariantsubspace. In order to identify the invariant subspace ofthe walk operator let us see the effect of U on |λ〉:

U |λ〉 = S(2AA† − 1)A|λ〉 = S|λ〉, (22)

where we used the property 1 and 2. Let us see also itseffect on S|λ〉:

US|λ〉 = S(2AA† − 1)SA|λ〉 = (2λS − 1)|λ〉, (23)

using properties 2 and 3 and the fact that the vectors |λ〉are eigenvectors of D. From (22) and (23) we can deducethat the subspace

IU := {|λ〉, S|λ〉}, (24)

is invariant under the walk operator U . It is thus sensibleto solve the eigenvalue problem:

U |µ〉 = µ|µ〉, (25)

for the walk operator restricted to the invariant subspace(24). Following what we have said, let us make an edu-cated ansatz for the eigenstates of U:

|µ〉 = |λ〉 − µS|λ〉. (26)

We have that:

U |µ〉 = µ|λ〉+ (1− 2µλ)S|λ〉, (27)

thereby the condition for |µ〉 to be eigenstate of U is

− µ2 = (1− 2µλ), (28)

which yields µ = λ±√λ2 − 1 = exp(±i arccosλ).

We note also that the span of the vectors |λ〉 coin-cides with the span of the vectors |ψj〉. Indeed we have∑

λ |λ〉〈λ| = A∑

λ |λ〉〈λ|A† = Π =∑

j |ψj〉〈ψj | .

To complete our analysis let us point out that on theorthogonal complement to the span of the vectors |ψj〉,the action of the walk operator U = S(2Π − 1) is just−S, which has eigenvalues ±1. This is because Π gives0 on this subspace. We conclude that the spectrum of Uis the set

σ(U) := {±1, exp(±i arccosλ)}, (29)

where λ are the eigenvalues of D. In the following wewill need the quantum walk where two steps at a timeare performed, with operator U2. We can advance thatthe interesting subspace, where we have dynamics, is thespan of the vectors |ψj〉 and S|ψj〉 where the walk oper-ator acts nontrivially.Furthermore, considering the two-step evolution opera-tor, one can see that:

U2 = (2SΠS − 1)(2Π− 1). (30)

Therefore under the two-steps operator U2 the Hilbertspace splits naturally into the subspaces Hdyn =span{|ψj〉, S|ψj〉} where dynamics takes place and its or-thogonal complement Hnodyn = H⊥

dyn as can be seen

from (30) U2 acts trivially in such a way that, obvi-ously, H = Hdyn ⊕ Hnodyn. The dimension of Hdyn

is at most 2N and, remembering that the dimension ofH = C|V |⊗C|V | is N2 we can conclude that the spectrumof U2 corresponding toHdyn is composed by, at most, the2N values

{exp(±2i arccosλ)}, (31)

and the rest of the spectrum, corresponding to Hnodyn

where U2 acts trivially, is composed of at least N2 − 2N1’s.

IV. A QUANTIZATION OF GOOGLEPAGERANK

In this section we define a valid Quantum PageRankand take advantage of the analysis presented above toprovide an efficient algorithm for its calculation as re-quested in Sect.I. A natural way to define a quantiza-tion of the importance of a node or page in the quantumnetwork associated to a directed graph is to exploit theconnection with the Markov chain process in which thefictitious walker is now subjected to quantum superposi-tions of paths throughout the quantum web. In this way,theinstantaneous importance of a quantum web page, de-

noted as Iq(Pi,m), is given by the probability of findingthe walker in that page Pi at the node i of the networkafter m time steps. As we have said before, the Hilbertspace of this quantum walk is the set of directed linksof the graph, H = C|V | ⊗ C|V | where the numbering ofthe vector spaces is meaningful due to the directedness ofthe underlying Graph and the second space in the tensor

Page 7: Google in Quantum Network

7

product contains the information of where the directedlink points to. It seems natural then to project onto avector of this second space |i〉2 obtaining the quantumstate |Iq(Pi,m)〉 that contains the superposition of thenodes that were linked to it. To quantify the importanceone can then extract a positive number calculating thenorm of |Iq(Pi,m)〉, and with this we obtain an instanta-neous list of page ranks including quantum fluctuationsof the network. Thus we expect its instantaneous valueto oscillate in time as a result of the underlying coherentdynamics.The method for computing the instantaneous PageR-

ank of the page Pi is to start from an initial vector |ψ(0)〉and to let it evolve according to the two-step evolutionoperator U2 (in order to swap the directions of the edgesan even number of times, thus preserving the graph’sdirectedness). Then, we need to project onto |i〉2, andfinally to take the norm of the resulting quantum state:

Iq(Pi,m) = 〈ψ(0)|U †2m|i〉2〈i|U2m|ψ(0)〉. (32)

In order to implement the full procedure, one starts fromthe stochastic matrix G representing the classical Googlesearch that we want to quantize, forms the matrix D andobtains its spectrum σ(D) = {λ}. One then forms the

states |λ〉 = A|λ〉, in terms of which the eigenvectors ofthe walk operator, |µ〉, in the subspace where the dynam-ics takes place are written.Using the spectral decomposition of U one can then

arrive at a closed analytical expression for our quantuminstantaneous PageRank:

Iq(Pi,m) =

µ

µ2m2〈i|µ〉〈µ|ψ(0)〉

2

, (33)

where |µ〉 = |λ〉 − µS|λ〉 and µ = exp(±i arccosλ). Notethat due to the fact that |i〉2 are a basis of CN , in otherwords

i |i〉2〈i| = 1 , from (32) one can see:∑

i Iq(Pi,m) =

= 〈ψ(0)|U †2m|∑

i |i〉2〈i|U2m|ψ(0)〉 = 1 ∀m, (34)

meaning that in the quantum version of Google PageR-ank we have that the normalization condition (34) ispreserved at all times allowing to interpret the quantityIq(Pi,m) as the instantaneous relative importance of thepage Pi, thereby reproducing a basic sum rule that alsoholds in the classical domain.In order to integrate out the fluctuations arising from

the coherent evolution we also introduce the average im-portance of the page i sitting on the ith node 〈Iq(Pi)〉as:

〈Iq(Pi)〉 :=1

M

M∑

m=0

Iq(Pi,m). (35)

We also use its variance or standard mean deviation:

∆Iq(Pi) :=√

〈I2q (Pi)〉 − 〈Iq(Pi)〉2, (36)

1

2

3

4

5

6

7

Figure 4: (Color online)The three level tree considered inthe text to benchmark the Quantum PageRank (see text insection V). Each node represents a web page in an intranetwith the root node being its home page.

as a measure of its fluctuations.

In order to obtain the Quantum PageRank values of thenodes of a digraph we apply the algorithm that comesout of the analysis presented above. Namely the stepsone has to perform are:

Quantum PageRank Protocol

Step 1/ Write the Google matrix for the digraph G.

Step 2/ Write down the matrix D (see eq. (19)) andcalculate its eigenvalues and eigenvectors.

Step 3/ Find the eigenvectors and eigenvalues of thetwo-step quantum diffusion operator U2 in the dy-namical subspace Hdyn (see section III for the de-tails).

Step 4/ Extract the Quantum PageRank value intime (33), its mean (35) and standard deviation(36) starting from the initial condition |ψ0〉 =1√N

∑Ni=1 |ψj〉.

V. RESULTS: SIMULATIONS FOR QUANTUMPAGERANKS

After developing a quantum version of the GooglePageRank in the previous section, it is necessary to applyit to specific networks and by means of simulations, seehow it behaves as compared with the classical algorithmof PageRank.

We have put to test our new quantum version of thePageRank algorithm in the case of a binary directed treewith 3 levels (see fig. 4) and a small albeit general, withno special property, directed graph (see fig. 5). We willdescribe the results in subsections VA and VB respec-tively.

Page 8: Google in Quantum Network

8

5

4

71

6

3

2

Figure 5: (Color online) The general graph with 7 nodes con-sidered in the text for benchmarking the Quantum PageRank(see text in section V) . Each node represents a web page inthis directed quantum network.

A. Case Study 1: A Tree Graph

In this subsection we will display the results obtainedin the case of a tree graph (see fig. 4). This type ofdirected graph has a clear meaning in terms of a webnetwork: it represents an intranet with the root nodebeing the home page of a certain website and its leavesrepresenting internal web pages. This case of study hasbeen extensively studied classically [31]. The quantumalgorithm presented above is implemented numerically.The quantum PageRank of the root page clearly oscil-lates in time and attains values that are higher than theclassical counterpart, as shown in Fig. 6. According tothe properties studied in Sect.I, our quantum PageRankis instantaneously outperforming.It is rather remarkable that a quantum version of the

PageRank may have an enhancement of the importancein the home page with respect to its classical counter-part. This is achieved merely by quantum means, with-out changing the connectivity of the original directedgraph as has been proposed classically [31].As for the quantum fluctuations present in the im-

portance of the root page, it is important to emphasizethat they remain bounded during the evolution as can bechecked from Fig. 6. In addition, the classical value is al-ways inside the range of the quantum fluctuations. Thisfeature is found to be true for all pages in the directed bi-nary tree network configuration (see Fig.7). A distinctivefeature of the Quantum PageRank is that the hierarchyis not preserved at every time. Figure 7 clearly displaythe crossings of the instantaneous Quantum PageRanks.In order to extract a fixed value for the relative impor-tances of the pages, we compute the mean value of theinstantaneous quantum PageRank in time from eq. (35)and its variance from eq. (36).One can notice that the hierarchy of the pages is pre-

served on average and that the errors i.e. the variancesare negligible compared to the means. We can thus inferthe pages’ hierarchy as predicted by the classical algo-rithm from the Quantum PageRanks’ averages as can be

0 50 100 150 200 250 300 350 400 450 5000.1

0.2

0.3

0.4

0.5

0.6

Time

Quantu

mP

ageR

ank

root

Figure 6: (Color online) The evolution of the instantaneousQuantum PageRank Iq with time for the root page (homepage) in the case of a directed binary tree in Fig.4.

0 50 100 150 200 250 300 350 400 450 5000

0.1

0.2

0.3

0.4

0.5

0.6

Time

Quantu

mP

ageR

anks

root

level 2

level 3

Figure 7: (Color online) The evolution with time of the instan-taneous Quantum PageRank algorithm Iq defined in Sect.IVfor web pages (nodes) in the case of a directed binary treegraph in Fig.4. Only one page per level of the tree is dis-played because pages that are in the same level have equalQuantum PageRank.

clearly seen in figure 8 for this particular case of directedbinary tree graph.Furthermore we can calculate a coarse grained evolu-

tion in time of the instantaneous Quantum PageRank.We divide its total evolution time of M steps in L equalsegments made of an integer number M/L steps. Wecalculate the mean in every segment:

Iq(Pi, n) :=L

M

(n+1)M/L∑

m=nM/L

Iq(Pi,m) , n = 0, . . . , L− 1.

(37)The result of integrating out the oscillations in a coarsegrained time step is shown in figure 9. An interestingfeature of this case is that the quantum PageRank oscil-lations shows a modulation with a clearly visible envelopefor each node. It strongly enforces the idea that the pro-posed algorithm has a solid grounding on the classical

Page 9: Google in Quantum Network

9

0 1 2 3 4 5 6 7 80.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Nodes

PageR

anks

Quantum PageRank

Classical PageRank

Figure 8: (Color online) Comparison of the hierarchies thatresult from the Classical and the Quantum PageRank in thecase of the directed graph tree shown in Fig.4. Error barsin the quantum case are computed with the standard meandeviation (35),(36).

0 10 20 30 40 50 600.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Coarse grained time

Quantu

mP

ageR

anks

root

level 2

level 3

Figure 9: (Color online) The evolution in a coarse grainedtime (see text in section V) of the Quantum PageRanks inthe case of the directed graph tree shown in Fig.4. Againonly one page per level is being displayed because pages thatare in the same level have equal Quantum PageRank.

PageRank algorithm and it is a valid quantization of it.

B. Case Study 2: A General Graph

We have performed a calculation of the quantumPageRank also in the case of a general directed graphwith no particular symmetry (see fig. 5).The value of the instantaneous quantum PageRanks arefound to display oscillations that are bounded and in-clude the value found by the classical PageRank. TheQPR of the node with the highest classical PageRank at-tains, at given times, values of the QPR that are higherthan the classical counterpart (see fig. 10). As seen inthe case of the binary tree treated above the QuantumPageRank is found to be instantaneously outperforming

according to the definition given in section I.The classical hierarchy is not preserved by the QPR atany given time (as is clearly shown by Fig. 10, see cap-tion). We can notice crossings in the importance given by

0 50 100 150 200 250 300 350 400 450 5000

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

Time

Quantu

mP

ageR

ank

node 7

node 5

node 4

Figure 10: (Color online)The evolution in time of the Quan-tum PageRank Iq of pages 7, 5 (that classically have the high-est and nearly degenerate PageRank) and of page 4 (that clas-sically has the lowest PageRank) in the case of general graphshown in Fig.5.

0 1 2 3 4 5 6 7 80

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Nodes

PageR

anks

Quantum PageRank

Classical PageRank

Figure 11: (Color online) Comparison of the hierarchies thatresult from the Classical and the Quantum PageRank in thecase of the general graph shown in Fig.5. Error bars in thequantum case are computed with the standard mean devia-tion (35),(36).

the instantaneous Quantum PageRAnk even between thepages that classically have hishest and lowest PageRank.Furthermore, the nodes that have a very close classicalPageRank are shown to have a very similar behaviour intime of their instantaneous Quantum PageRank.

Remarkably enough, we find that the Quantum PageR-anks’ averages do not give us the same hierarchy as in theclassical case (see Fig. 11). Nevertheless, it is possibleto clearly distinguish, within the error bar given by thevariance, which pages have highest and lowest classicalPageRank.

The analysis with a coarse graining in time of the in-stantaneous Quantum PageRank (see Fig. 12) reinforcesthe conclusion that the classical PageRanks are still dis-tillable in the case of pages with highest and lowest clas-sical importances.

Page 10: Google in Quantum Network

10

0 10 20 30 40 50 600.06

0.08

0.1

0.12

0.14

0.16

0.18

0.2

0.22

0.24

coarse grained time

Quantu

mP

ageR

anks

node 1

node 2

node 3

node 4

node 5

node 6

node 7

Figure 12: (Color online) The evolution in a coarse grainedtime (see text in section V) of the Quantum PageRanks inthe case of the general graph shown in Fig.5.

VI. CONCLUSIONS

In this paper we have proposed a notion of a classof protocols that qualify to be considered a quantumversion of the classical PageRank algorithm employedby the Google search engine (see Sect.I). In addition,we have constructed a step-by-step protocol explicitly inSect.IV based on the quantization of Markov chains fordirected graphs. This is a non-trivial problem since deal-ing with quantum versions of digraphs may produce uni-tarity problems (see Sect.III). We have tested our quan-tum PageRank algorithm with two web networks in orderto gain insight into the specific behaviour of this protocol.One network is a binary tree graph representing an in-tranet with the root being the home page of it. The otheris a general directed graph with no specific structure.From our numerical simulations we have found that

our quantum PageRank has very interesting properties.For the directed binary tree:i/ The quantum PageRank for the root page is instanta-neously outperforming with respect to the classical value.This is a manifestation of the quantum fluctuations in-herent to the quantum version of the algorithm and al-lows us to have an enhancement of the importance of the

root page without changing the topology of the originalnetwork.

ii/ The instantaneous values of the quantum PageRanksfor the nodes violate the hierarchy of the classical values.

iii/ The mean values of the quantum PageRanks includ-ing its standard deviation preserve the hierarchy of theclassical values.

For the general directed graph:

i/ The quantum PageRank for the web page with thehighest classical PageRank is some times higher than theclassical values obtained with the standard algorithm.This means that the quantum version of the PageRankis instantaneously outperforming with respect to the clas-sical value.

ii/ The instantaneous values of the quantum PageRanksfor the nodes violate the hierarchy of the classical values.

iii/ Remarkably enough, there are pages with mean val-ues, including its standard deviation, of their quantumPageRank that violate the hierarchy of the classical val-ues.

These properties are a clear manifestation that our pro-posal for a quantum version of the PageRank algorithmbehaves appropriately with respect to the classical algo-rithm and exhibit non-trivial features.

As the main purpose of our work is to devise a quantumPageRank algorithm by overcoming certain difficultiesexplained in the paper, thus far we have dealt only withsmall networks representing different types of web. Itwould be very interesting to perform computations withthe quantum PageRank applied to very large networkswith the properties exhibited by the complex structureof the real web [41–47].

Acknowledgments

We thank the Spanish MICINN grant FIS2009-10061,CAM research consortium QUITEMAD S2009-ESP-1594, European Commission PICC: FP7 2007-2013,Grant No. 249958, UCM-BS grant GICC-910758.

[1] C. Elliott; “The DARPA Quantum Network”;arXiv:quant-ph/0412029.

[2] A. Poppe, M. Peev and O. Maurhart; “Outline of theSECOQCQuantum-Key-Distribution Network in Vienna”; International Journal of Quantum Information Volume6, 209-218 ( 2008).

[3] Tokyo Quantum Network 2010. www.uqcc2010.org[4] Swiss Quantum Network.

http://swissquantum.idquantique.com/[5] D. Lancho, J. Martinez, D. Elkouss, M. Soto and V. Mar-

tin; “QKD in Standard Optical Telecommunications Net-works”; Lecture Notes of the Institute for Computer Sci-ences, Social Informatics and Telecommunications Engi-neering. Volume 36, pp 142-149 (2010). arXiv:1006.1858

[6] T. Langer and G. Lenhart; “Standardization of quantumkey distribution and the ETSI standardization initiativeISG-QKD”; New J. Phys. 11 055051 (2009).

[7] M. A. Nielsen and I. L. Chuang, Quantum Computation

and Quantum Information (Cambridge University Press,Cambridge, 2000).

[8] A. Galindo and M.A. Martin-Delgado; “Infor-mation and Computation: Classical and Quan-tum Aspects”; Rev.Mod.Phys. 74:347-423, (2002);arXiv:quant-ph/0112105.

[9] H. J. Kimble; “The quantum internet”; Nature (London)453, 1023 (2008).

[10] D. S. Wiersma; “Random Quantum Networks”; Science327, 1333 (2010).

Page 11: Google in Quantum Network

11

[11] H.-J. Briegel, W. Dur, J.I. Cirac and P. Zoller; “Quan-tum Repeaters: The Role of Imperfect Local Opera-tions in Quantum Communication”; Phys. Rev. Lett. 81,59325935 (1998).

[12] W. Dur, H.-J. Briegel, J.I. Cirac and P. Zoller; “Quantumrepeaters based on entanglement purification”; Phys.Rev. A 59, 169181 (1999).

[13] N. Sangouard, Ch. Simon, H. de Riedmatten and N.Gisin; “Quantum repeaters based on atomic ensemblesand linear optics”; Rev. Mod. Phys. 83, 3380 (2011).

[14] B. Lauritzen, J. Minar, H. de Riedmatten, M. Afzelius,and N. Gisin; “Approaches for a quantum memoryat telecommunication wavelengths”; Phys. Rev. A 83,012318 (2011).

[15] C. Simon, M. Afzelius, J. Appel, A. Boyer de la Giroday,S.J. Dewhurst, N. Gisin, C.Y. Hu, F. Jelezko, S. Kroll,J.H. Muller, J. Nunn, E. Polzik, J. Rarity, H. de Riedmat-ten, W. Rosenfeld, A.J. Shields, N. Skold, R.M. Steven-son, R. Thew, I. Walmsley, M. Weber, H. Weinfurter, J.Wrachtrup, R.J. Young; “Quantum Memories. A Reviewbased on the European Integrated Project ’Qubit Appli-cations (QAP)”; The European Physical Journal D 58,1-22 (2010).

[16] B. Lauritzen, J. Minar, H. de Riedmatten, M.Afzelius, N. Sangouard, Ch. Simon and N. Gisin;“Telecommunication-Wavelength Solid-State Memory atthe Single Photon Level”; Phys. Rev. Lett. 104, 080502(2010).

[17] F. Verstraete, M. A. Martin-Delgado and J. I. Cirac;“Diverging Entanglement Length in Gapped Quan-tum Spin Systems”; Phys. Rev. Lett. 92, 087201.arXiv:quant-ph/0311087.

[18] M. Popp, F. Verstraete, M.A. Martin-Delgado and J.I. Cirac; “Localizable entanglement”; Phys. Rev. A 71,042306 (2005). arXiv:quant-ph/0411123.

[19] V.E. Korepin and Ying Xu, “Entanglement in Valence-Bond-Solid States”; International Journal of ModernPhysics B 24, pp. 1361-1440 (2010).

[20] M. Hein, W. Dur, J. Eisert, R. Raussendorf, M. Vanden Nest, H.-J. Briegel; “Entanglement in Graph Statesand its Applications”; Proceedings of the InternationalSchool of Physics “Enrico Fermi” on “Quantum Comput-ers, Algorithms and Chaos”, Varenna, Italy, July, 2005.arXiv:quant-ph/0602096.

[21] A. Acin, J.I. Cirac and M. Lewenstein; “Entanglementpercolation in quantum networks”; Nature Physics 3, 256- 259 (2007).

[22] S. Perseguers, J.I. Cirac, A. Acin, M. Lewenstein and JanWehr; “Entanglement distribution in pure-state quantumnetworks”; Phys. Rev. A 77, 022308 (2008).

[23] M.Cuquet and J. Calsamiglia; “Entanglement Percola-tion in Quantum Complex Networks”; Phys. Rev. Lett.103, 240503 (2009).

[24] M.Cuquet and J. Calsamiglia; “Limited-path-length en-tanglement percolation in quantum complex networks”;Phys. Rev. A 83, 032319 (2011).

[25] S. Brin, L. Page; “The anatomy of a large-scale hypertex-tual Web search engine”; Computer Networks and ISDNSystems 33 (1998) 107-17.

[26] S. Brin, R. Motwami, L. Page, T. Winograd; “What canyou do with a web in your pocket?”; Data Engineeringbulletin 21 (1998) 37-47.

[27] S. Brin, R. Motwami, L. Page, T. Winograd; “ThePageRank Citation Ranking: Bringing order to theWeb”; Technical Report, Computer Science Department,Stanford University (1998).

[28] A. Langville, C. Meyer; “Deeper Inside PageRank”; In-ternet Mathematics Vol. I, 3 (2004) 335-380.

[29] C.D. Meyer; Matrix Analysis and Applied Linear Algebra

Philadelphia, PA SIAM (2000).[30] T. Haveliwala, S. Kamvar; “The Second Eigenvalue of the

Google Matrix”; Stanford University Technical Report,2003-20 (2003).

[31] A. Arratia and C. Marijuan;“Ranking pages and thetopology of the web”; arXiv:1105.1595.

[32] B. Georgeot, O. Giraud and D.L. Shepelyansky; “Spec-tral properties of the Google matrix of the World WideWeb and other directed networks”. Phys. Rev. E 81,056109 (2010).

[33] R. Cilibrasi and P. M. B. Vitanyi; “The Google SimilarityDistance”; IEEE Trans. Knowledge and Data Engineer-ing, 19:3 (2007), 370-383

[34] R. P. Feynman and A. R. Hibbs; Quantum mechanics and

path integrals. International series in pure and applied

physics (McGraw-Hill, New York, 1965).[35] Y. Aharonov, L. Davidovich, and N. Zagury; “Quantum

random walks” Phys. Rev. A, 48(2) : 16871690 (1993).[36] D. Meyer; “From quantum cellular automata to quantum

lattice gases”; J. Stat. Phys., 85, 551574 (1996).[37] D. Meyer; “On the absence of homogeneous scalar uni-

tary cellular automata”; Phys. Lett. A, 223(5), 337340,1996.

[38] J. Watrous; “Quantum simulations of classical randomwalks and undirected graph connectivity”; Journal ofComputer and System Sciences, 62(2), 376391 (2001).

[39] M.A. Martin-Delgado; “Alan Turing and the Origins ofComplexity”; arXiv:1110.0271.

[40] M. Szegedy; “Quantum Speed-up of Markov Chain BasedAlgorithms”; Proceedings of the 45th Annual IEEE Sym-posium on Foundations of Computer Science (2004), pp.32-41.

[41] D.J. Watts and S.H. Strogatz, “Collective dynamics of’small-world’ networks”; Nature 393 409, (1998).

[42] A.-L. Barabasi and R. Albert; “Emergence of scaling inrandom networks”; Science 286 509, (1999).

[43] C. Song, S. Havlin and H. A. Makse; “Self-similarity ofComplex Networks”; Nature 433 392, (2005).

[44] E. Ravasz, A. L. Somera, D. A. Mongru, Z.N. Oltvai andA.-L. Barabasi; “Hierarchical Organization of Modular-ity in Metabolic Networks”; Science 297 1551, (2002).

[45] R. Albert, A.-L. Barabasi; “Statistical mechanics of com-plex networks”; Rev. Mod. Phys. 74 47-97, (2002).

[46] M.E.J. Newman; “The structure and function of complexnetworks”; SIAM Rev. 45 167256, (2003).

[47] F. Comellas, J. Ozon and J.G. Peters; “Determinis-tic small-world communication networks”; Inform. Proc.Lett. 76 8390, (2000).