Introduction

It is of great interest to explore and classify the large amount of information that is stored in huge complex networks like the World Wide Web (WWW). A central problem of bringing order to classical information stored in networks such as the WWW amounts to rank nodes containing such information according to their relevance. A highly successful and nowadays widespread tool for this purpose is the PageRank algorithm1,2, which lies at the core of Google's ranking engine. In the foreseeable future where large-scale quantum networks have become a reality, classifying the quantum information stored in these networks will become a priority. In this context, the recently introduced quantum PageRank algorithm3 represents an important achievement as it constitutes a quantisation of the classical PageRank protocol. When applied to small networks, this new quantum algorithm has shown remarkable features. These include the possibility to produce a different hierarchy of the nodes, paired with increased performance properties. In this paper we investigate the properties of the quantum algorithm for networks which model large real-world complex systems and also test the algorithm on real-world data stemming from a part of the WWW.

Complex networks are more and more pervasive and essential in our everyday's life. Consequently, network science has become a very active field of research and considerable research is devoted to analyse and understand networks like the World Wide Web, the Internet, networks associated to transportation and communication systems and even biological and social networks. Starting with the seminal papers by Watts and Strogatz on small-world networks4 and by Barabási and Albert on scale-free networks5, researchers realised that most relevant networks belong to a class known as small-world scale-free networks. They exhibit both strong local clustering, i.e. nodes have many mutual neighbours and a small average path length, while sharing another important characteristic: the number of links of nodes usually obeys a power-law distribution, thus the network is scale-free. Moreover, it has been found that many real networks, including the WWW, are also self-similar, see6. Such properties can often be related to a modular and hierarchical structure and organisation which is essential for their communication and dynamical processes7,8,9. On the other hand, this hierarchical structure could explain the existence of nodes with a relatively large number of links (termed hubs), which play a critical role in the information flow of the system. Hubs are also associated with a low average distance in the network. Several review papers and books on complex networks are now available, to which we refer the reader interested in more information on this topic10,11,12.

The networks considered in this paper are modelled by three classes of graphs: The first type are Erdős-Rényi random graphs13. These graphs are constructed by connecting a given set of nodes with directed edges, each one added according to a certain fixed probability. The second class of graphs are scale-free graphs which were introduced by Barabási and Albert to model the WWW5,14. In this case, a graph can be dynamically formed by a continuous addition of new vertices. In this growth process, the new nodes are connected preferentially to vertices which already have a large degree. In this work, we consider a version of directed scale-free graphs15. The third family of graphs we consider are hierarchical graphs. They are also scale-free but their clustering and degree distributions are negatively correlated, i.e. hubs have a smaller clustering coefficient than nodes with a lower degree. It has been found that hierarchical graphs constitute also a good model for the WWW7,8.

In the next sections we apply the quantum Google algorithm proposed in ref. 3 to representatives and statistical ensembles of graphs falling into the aforementioned categories of graphs. Our focus lies on directed scale-free networks and also on hierarchical graphs as they are good models for the WWW. However, in addition we also consider Erdős-Rényi random networks as a reference in order to contrast the results which we find for the other network classes.

In particular, two main fundamental questions will be addressed:

  1. 1

    Does the quantum PageRank algorithm preserve the structure of a scale-free network? In other words, does the ranking distribution obtained by the quantum algorithm follow the same pattern of node-importance as the underlying scale-free network and can it be clearly distinguished from the distribution corresponding to a random Erdős-Rényi network? Complementary, for Erdős-Rényi networks we study the characteristic behaviour of the quantum Page Rank algorithm applied to these random networks and contrast it with the results for scale-free networks.

  2. 2

    To which extent does the quantum Google algorithm provide an improvement on the information gained on some properties of scale-free networks, as compared to the classical PageRank algorithm?

Before outlining in more detail and answering these questions in the main body of the paper, here we briefly summarise some of our main results:

  • We find that the quantum PageRank algorithm is able to detect to which class of complex networks a particular instance of a graph belongs to. More precisely, the classification results show that the ranking of the nodes follows a similar distribution law than the degrees of the network. In particular, for scale-free networks this distribution remains scale-free under the application of the quantum PageRank algorithm. This implies that the quantum PageRank algorithm is expected to be robust with respect to random external noise.

  • Remarkably, the detection of the hubs for a network in the class of scale-free networks with the QG algorithm is clearly enhanced with respect to the classical PageRank algorithm. In particular, the quantum PageRank algorithm is able to more clearly reveal the existence of secondary hubs in scale-free networks.

  • We find that the quantum PageRank algorithm and the resulting rankings are more stable than the classical PageRank protocol with respect to the variation of the damping parameter α that appears in the Google algorithm. The weak dependence on this parameter, which inevitably has to be arbitrarily tuned in the classical algorithm, provides the quantum algorithm with a higher objectivity of the importance rankings.

  • Our study shows that the quantum PageRank algorithm displays for scale-free graphs a power law scaling behaviour of the importances of the nodes. Furthermore, this power law behaviour is more favourable than the one the classical algorithm exhibits: Indeed, a smoother behaviour is related to a more harmonious distribution of importance among the nodes. This property enables the algorithm to better uncover the structure of hubs in the underlying scale-free graphs.

  • Based on a numerical study of the quantum PageRank algorithm applied to scale-free networks of mesoscopic size, we conjecture that the enhanced sensitivity of the quantum PageRank algorithm to structural details of the networks comes at the cost of an increased sensitivity with respect to coordinated attacks of the most important nodes in scale-free networks.

Motivated by the fact that in a near-future scenario a certain class of quantum networks will be operative16,17,18,19,20,21, but not yet a scalable quantum computer, in ref. 3 a class of quantum algorithms to rank the nodes in a quantum networks was put forward. The algorithms in this class must be compatible with the classical one. Indeed, existing projects for large-scale quantum networks contemplate using the backbone of existing communication networks, upgrading them to include the quantum hardware in order to store and manipulate quantum information. In particular, the directed structure of the graph must be preserved, a feature which is crucial to measure a node's authority. An instance of this class of algorithms was explicitly constructed and analysed for graphs of small size and it was found to serve as a valid quantum counterpart of Google's PageRank algorithm (for details see ref. 3).

To perform such a quantum task, it is important that the ranking algorithm incorporates some of the quantum properties of the network, such as quantum fluctuations and that it is objective. Indeed, the latter property earned much of Google's PageRank's success. For the classical protocol it was achieved by embedding in the algorithm the random walk of a surfer, who stochastically explores the WWW based on simple sensible rules. Within the same line of reasoning, we set up a quantum walk based algorithm that mimics the exploration of nodes in a quantum network. In this setting the nodes are represented by states of a Hilbert space and the simple rules are encoded in the quantum dynamics. In doing so the quantum nature of the networks and the information stored is properly taken into account. In the setting where a fully fledged large-scale quantum computer is not yet available, a key property of the quantum algorithm is that it can be efficiently simulated on a classical computer. This means that it must belong to the computational complexity class P. For the class of quantum ranking algorithms proposed in ref. 3, this is guaranteed since the quantum PageRank algorithm is based on a single particle quantum walk, which is classically efficiently simulatable.

Furthermore, the fact that the quantum algorithm contains a quantum walk at its heart allows one to analyse its dynamics from a purely physical perspective: In our work, we analyse extensively the localisation properties of the quantum walk contained in the algorithm, by applying it to several classes of networks (see sect. IV) and studying its effects on ranking. To achieve this, we introduce the new concept of a quantum Inverse Participation Ratio (IPR). This is a generalisation of the classical IPR. The IPR is the principal quantity that has been used extensively to probe localisation properties in the study of classical random walks.

Besides its application to future quantum networks, the Quantum PageRank algorithm can also be regarded as a valuable “quantum tool”, which can be run efficiently on a classical computer and which constitutes an interesting alternative method to perform the “classical” task of ranking nodes in existing classical networks. Indeed, embedding nontrivially the network connectivity structure in the quantum dynamics, our protocol turns out to show several features that improve those present in the classical algorithm.

Here we do not concentrate on possible quantum speedups and a detailed resource analysis for the quantum algorithm, which lies in the computational complexity P of efficiently simulatable algorithms. Instead, we focus on the advantages that ranking nodes in classical networks using the quantum algorithm displays. These advantages include an increased resolution in the structure analysis of scale-free graphs and an increased stability with respect to the variation of the damping parameter.

Let us briefly review the quantum PageRank algorithm from an operational point of view; a reader familiar with the quantum algorithm can skip this part. More details of the construction and the computational complexity class of the algorithm can be found in ref. 3. This quantum PageRank algorithm satisfies all the properties of the general requirements of the class of ranking algorithms proposed in ref. 3 and represents a valid quantisation of Google's PageRank algorithm. A step-by-step illustration of the quantum algorithm is presented in fig. 1.

Figure 1
figure 1

Schematic outline and summary of the quantum PageRank algorithm as proposed in3.

(a) The internet can be thought of as a set of pages (nodes of a graph) connected by directed hyperlinks (edges of the graph). The classical (quantum) PageRank algorithm can be regarded as a single walker performing a directed classical (quantum) random walk on the graph. (b) The connectivity structure of the graph, captured by the connectivity matrix C, is of paramount importance to perform the ranking of the importance of pages both in the classical and the quantum case. In the classical (quantum) case the walker performs an incoherent (coherent) walk according to a combination of two hopping processes along the graph. The dynamics is governed by the “Google matrix” G, which describes the dynamics as a combination of contributions: (i) the first corresponds to a hopping according to a (patched) connectivity matrix E of the graph (parameter α, see main text and3 for more details). (ii) The second contribution represents a completely random hopping process (parameter 1 − α), where each node is connected to all other nodes of the graph. (c) In the quantum PageRank algorithm the Hilbert space is spanned by the set of directed links between all pairs i and j of nodes of the graph, as tensor product states |i1|j2. The initial state |ψ0〉 as well as the coherent discrete time evolution operator U2 for the directed quantum walk (see main text) are determined by the Google matrix G. (d) Quantum fluctuations can lead to a reversal of the order of importances of pages at certain instances of (discrete) time (so-called instantaneous hierarchy non preserving property), as well as on the average over longer times (average hierarchy non preserving property). The latter effect is reflected by changes in the ordered list of pages (nodes) when the importance of pages according to the quantum PageRank algorithm is compared to its classical counterpart, the list of classical PageRank values. Red, blue and green curves in (d) show the instantaneous quantum PageRank of nodes # 4, 5 and 7 of the seven-node-graph shown in (c), which was explored in Ref. 3 and leads to the quantum PageRank and classical PageRank lists displayed in (e).

In Google PageRank's algorithm the ranking is performed by setting up a classical random walk on the network. The dynamics of the walk are based on a transition matrix, known as the Google matrix G. The Google matrix is the weighted sum of two transition matrices. The first contribution describes a walk, which is driven by a modified connectivity matrix E where outgoing links to all other nodes have been added to every node that has no outgoing link. The second part accounts for a simple random hopping process, where every node it connected to any other node of the graph. Accordingly, the Google matrix G associated to a given graph is defined as

where 1 is a matrix with entries all set to 1 and N denotes the number of nodes. The parameter α is known as the damping parameter.

The ranking of the nodes is performed according to the importance values stored in the vector I, which quantify the probability to find the walker on a specific node once the stationary probability distribution I has been reached, i.e. when GI = I.

In the quantum PageRank algorithm the idea is to set up a quantum walk on the nodes of the network and to perform a ranking of the nodes accordingly by measuring the probability of finding the quantum walker on such nodes. The quantum walk is a quantisation of the Markov chain underlying the classical PageRank algorithm and is set up using Szegedy's method22. In particular, this approach allows one to take into account explicitly the connectivity structure and the directedness of the network. The quantisation of the Markov chain on the N-vertex graph with transition matrix G is performed by introducing a discrete-time quantum walk, which embeds the stochastic N × N matrix G on the same graph.

The Hilbert space is the span of all vectors representing the N × N (directed) edges of the graphs i.e. , with i, . The order of the spaces in the tensor product is crucial because we are dealing with a directed graph. For each vertex j of the graph one defines the quantum state vector,

This state is a weighted superposition of the quantum states representing the edges, which are outgoing from the jth vertex and with the weights given by the (square root of the) Google matrix G.

The quantum PageRank algorithm corresponds then to a quantum walk starting from the initial state . Its dynamics is governed by the quantum evolution operator where S is the swap operator i.e. and . The Hilbert space is N2 dimensional, however it can be shown that the dynamics takes place in an invariant subspace which is at most 2N dimensional3. In practice, this allows one to numerically treat networks with a larger number of nodes.

The ranking of the nodes in the quantum network can be done based on the instantaneous quantum PageRank:

The average quantum PageRank is defined as the time-average of Iq(Pi, t),

Whereas the latter quantity can be shown to converge for T sufficiently large and will be used in the following when we refer to the quantum PageRank of a graph, the Instantaneous Quantum PageRank does not converge in time23.

The exploratory study in ref. 3 revealed nontrivial features of the quantum PageRank algorithm: these include the effect of instantaneous outperformance, i.e. the change of the hierarchy of nodes at certain instances of time (as measured by the instantaneous quantum PageRank). Furthermore, the violation of the hierarchy of nodes as predicted by the classical algorithm, was observed for the quantum PageRank, when the time-averaged importance values were studied (average quantum PageRank). These properties motivate us to investigate the persistence of these novel effects on larger complex networks.

This paper is organised as follows: in the next chapter we present an analysis on graphs of the scale-free type for networks with hundreds of nodes and in particular for a real-world network. We extend the analysis of the quantum PageRank algorithm on Erdős-Rényi and hierarchical graphs. From this we conclude that the behaviour of the quantum PageRank displays features which are characteristic for each type of complex networks. Moreover, the behaviour of the quantum algorithm is different from the classical PR algorithm, as in the quantum scenario the classical ranking of nodes can change due to quantum fluctuations. The new quantum dynamics incorporated in the task of ranking also raises other important questions on the properties of the quantum walk embedded in the algorithm such as the localisation phenomenon of the walker on the network. In the next chapter we analyse this issue and the stability of the ranking with respect to the noise (or damping) parameter α. We address the question whether the power law behaviour displayed by the classical PageRanks is preserved by the quantised algorithm and compute the corresponding scaling exponent. We partially address the question how sensitive the quantum PageRank algorithm is under coordinated attacks in scale-free graphs. In the Discussion we present our conclusions and discuss possible future work.

Results

Quantum pagerank on scale-free networks

In the following, we will analyse the quantum PageRank algorithm applied to complex networks. We will in particular focus on random scale-free networks because of their widespread appearance and relevance in real-world applications. In the next section we will also deal with the important cases of random (Erdős-Rényi) and hierarchical networks in order to check whether the quantum PageRank algorithm preserves the characteristics of different classes of complex networks. Moreover, the study of random and hierarchical networks results to be useful to confront its features with scale-free networks.

Random scale-free graphs24,25 are ubiquitous in nature. They appear as good models of the World Wide Web26, airline networks27 or metabolic networks28,29, just to name a few. Networks belonging to this class display a small fraction of hubs, i.e. nodes with a high connectivity. This characteristic property follows from the degree distribution P(k) that shows a scale-free behaviour, P(k) ≈ k−γ. Scale-free networks exhibit intriguing properties which have been studied extensively, such as robustness against uncoordinated attacks30,31,32, good navigability33,34,35 and controllability36,37,38.

One of the first models proposed to describe scale-free networks is the preferential attachment model5,14. In this model links are preferentially formed to already highly connected nodes. A random directed scale-free model for the WWW was introduced in39 and a generalisation appeared in15. To produce the characteristic power-law degree distribution of degrees, the models consider two main mechanisms: growth and preferential attachment. A graph is dynamically formed by a continuous addition of new vertices and each new vertex is joined to several existing vertices, which are selected with a probability that is proportional to their in and out degrees. The generalised model allows also the introduction of directed edges between two already existing nodes. In this work we study the quantum (and classical) Page Rank algorithm on graphs created with this model as implemented in NetworkX40.

Let us now discuss results from the application of the quantum PageRank to complex networks of the scale-free type with sizes that range up to hundreds of nodes. We find that the algorithm clearly identifies that the networks are of scale-free type and is able to point out the most important hubs. This is a task already well performed by the classical PageRank. However, the quantum PageRank algorithm has improved ranking capabilities in the sense that is does not concentrate all the importance on these few nodes. Indeed, it is capable to unveil the structure of the graph in more detail as it also highlights the secondary hubs of the scale-free networks (see figures 2, 3, 4 and captions therein for examples, as well as the appendix for a statistical analysis of an ensemble of random graphs).

Figure 2
figure 2

Scale-free graph with 64 nodes and the comparison of the importance of the nodes when evaluated with the quantum and classical PageRank.

The classical PageRank shows a very sharp concentration of importance on the three main hubs, nodes 0, 1 and 2. The quantum PageRank algorithm is able to better distinguish and to highlight the secondary hubs (in this graph nodes: 12 and 25) whose importance rises with respect to the primary hubs. (see text in the section entitled Results).

Figure 3
figure 3

Scale-free graph with 128 nodes (see text in the section entitled Results) and a comparison of the importance of the nodes when evaluated with the quantum and classical PageRank.

The classical PageRank shows a very sharp concentration of importance on the three main hubs, nodes 0, 1 and 2. One can see from the comparison of the predictions of the two algorithms the relative emergence of secondary hubs (nodes 8, 9, 10, 20 and 21) when the importance is calculated with the quantum PageRank (see text in the section entitled Results).

Figure 4
figure 4

Comparison of the quantum and classical PageRank on a real network originating from the hyperlink structure of www.epa.gov41.

One can clearly see how the hubs in the classical algorithm tend to concentrate nearly all the importance. The insets show that the quantum algorithm is capable to lift the degeneracy of nodes in the the low part of the list (see text in the section entitled Results).

Furthermore, we find that the hierarchy as predicted by the classical PageRank is not preserved. This is a property already found in3 for smaller networks. From the present study we are able to clearly conclude that far from being an artefact of choosing small networks, this results are a generic feature of the quantum PageRank algorithm. We also found that the quantum PageRank is able to lift the degeneracy of the nodes that have a lower importance. This feature can be seen clearly in figure 5 where we analyse a subgraph of the WWW obtained by exploring pages linking to www.epa.gov and available from Pajek41.

Figure 5
figure 5

Scale-free graph with 32 nodes and the comparison of the importance of the nodes when evaluated with the quantum and classical PageRank.

The classical PageRank shows a very sharp concentration of importance on the three main hubs, nodes 0, 1 and 2. One can see from the comparison of the predictions of the two algorithms the relative emergence of secondary hubs (nodes 6, 7 and 14) when the importance is calculated with the quantum PageRank (see text in the section entitled Results).

Quantum pagerank on Erdős-Rényi networks and hierarchical networks

Erdős-rényi networks

In this section we will briefly introduce the Erdős-Rényi class of random networks and analyse the performance of the quantum PageRank algorithm applied to them. This class of graphs was introduced by Paul Erdős and Alfred Rényi more than fifty years ago13,42,43 and is of particular importance in the context of graph theory. There are different equivalent methods to describe this family. To allow an easy computer implementation we use the following procedure: a graph of order N can be constructed by connecting N vertices randomly by adding edges with a given probability, which is independent from other edges. We use directed versions of the graphs created with NetworkX40.

The graphs falling into this class follow a Poissonian degree distribution, i.e., P(k) ≈ 〈kk exp (−〈k〉)/k! where 〈k〉 is the average degree. Thus, most nodes have a degree not very different from the average and therefore the graphs do not display relevant hubs when applying the PageRank algorithm. We have performed a numerical study on graphs of the Erdős-Rényi type, which leads to two principal conclusions: i/ Applied to networks of the Erdős-Rényi class, the quantum PageRank algorithm shows a characteristic behaviour: in particular, the absence of hubs is reflected at the quantum level by the structureless importance distribution. ii/ However, the quantum PageRank algorithm leads to changes in the ranking of nodes as predicted by the classical algorithm (see figure 6).

Figure 6
figure 6

Quantum and classical PageRank in random (Erdős-Rényi) networks.

Subfigure a shows a prototypical example of a random network of 64 nodes clearly indicating the absence of hubs in this class. (b) A comparison of the importance as obtained from the quantum and classical PageRank applied to a 64 nodes random graph. The importances calculated using the quantum PageRank algorithm display a change in hierarchy (see text in the section entitled Results).

Hierarchical networks

Some relevant real-life networks which describe technological and biological systems, such as the WWW, some electronic circuits and protein or metabolic networks are usually scale-free but have also a modular structure6,44. That is, they are composed of modules that group different sets of nodes. These modules can be distinguished by the fact that nodes belonging to the same module are usually strongly connected. Conversely, modules are relatively weakly connected among them. Thus, even when the networks are scale-free, their hubs use to have a low clustering as they joint different modules. Several authors claim that a signature for a hierarchical network is that, different from the small-world scale-free characteristics, the scaling of the clustering of the vertices of the graph with their degree follows a Ci 1/ki scaling behaviour7,8.

Hierarchical network models usually are constructed based on recursive rules. For example, one can start from a complete graph Kn and connect to a selected root node n − 1 replicas of Kn. Next, n − 1 replicas of the new whole structure are added to this root. At this step the graph will have n3 vertices. The process continues until the desired graph order is reached. There are many variations for these hierarchical networks, depending on the initial graph, the introduction of extra edges among the different copies of the complete subgraphs, etc. However, once the starting graph is given, these networks do not have adjustable parameters and their main characteristics are fixed.

In45, Barabási et al. introduced a simple hierarchical family of networks and showed that it had a small-world scale-free nature. The model was generalised in7 and further studied in46. For our analysis we have designed a directed version based on these graphs, see figure 7b. In this case the starting point of the construction process is a directed 3-cycle.

Figure 7
figure 7

Construction of hierarchical networks.

(a) The family of outerplanar directed hierarchical graphs. Note that the generation labeled by n has 2n+1 nodes. We consider graphs of the generations with n = 4, 5, 6. (b) The family of directed hierarchical graphs. In this case the generation labeled by n has 3n nodes. We consider graphs of the generations with n = 2, 3, 4.

Another interesting family of hierarchical directed graphs has been obtained by giving directions to the edges of the construction published in47,48, see figure 7a. The graphs are in this case of small-world type, self-similar, unclustered and outerplanar (a planar graph is called outerplanar if it has an embedding where all vertices lie on the boundary of the exterior face). However, they are not scale-free, but follow an exponential distribution. It has been shown that many algorithms which are NP-complete for general graphs perform polynomially in outerplanar graphs49.

We have performed a numerical study on hierarchical networks using the quantum PageRank algorithm. We analysed two families of graphs (see figure 7 for the construction) and we find that the hierarchy (similarly to what was found in ref. 3 for the binary tree) is preserved by the average PageRanks. Interestingly, though, the quantum PageRank is able to highlight the connectivity structure of the nodes that belong to the same level in the hierarchical construction (see figures 8 and 9). We observe that the difference in importance between nodes belonging to the same hierarchical level but with different local connectivity is amplified when calculated using the quantum PageRank algorithm.

Figure 8
figure 8

Comparison of the quantum and classical PageRank for the family of hierarchical graphs described in the text (see the section entitled Results and figure 7b for the construction).

We consider graphs with n = 2, 3, 4 (see subfigures a, b and c respectively). We find that the quantum PageRank preserves the hierarchy of the nodes but in addition it is able to highlight the connectivity structure of the nodes belonging to the same level. Indeed, in subfigure a, for example, the difference in importance between nodes 2 and 3 and 5 and 6 is amplified when calculated using the quantum algorithm.

Figure 9
figure 9

Comparison of the quantum and classical PageRank for the family of hierarchical graph described in the text (see section entitled Results and figure 7a for the construction).

We considered graphs with n = 4, 5, 6 (see subfigures a,b and c respectively). Also in this case we find that the quantum PageRank preserves the hierarchy of the nodes highlights moreover the connectivity structure of the nodes belonging to the same level.

Localisation-delocalisation transition

We have seen in the previous sections that the quantum PageRank algorithm is able to distinguish between networks of Erdős-Rényi and scale-free type. In particular, the quantum algorithm, as compared to the classical one, is also able to highlight more clearly the secondary hubs in the case of scale-free networks. Furthermore, regarding the classical and quantum algorithms as walks on a network, a necessary condition that few nodes (the hubs) account for the majority of the importance is that the walker is localised. This means that the number of nodes with a significant probability to find the walker on them is negligible with respect to the number of nodes in the network.

In this section we will, therefore, study the localisation properties of the walker on different networks of Erdős-Rényi and scale-free type. We will first briefly review the case of the walker in the classical PageRank algorithm. Then, we explore which phases the quantum walker chooses in the case of the quantum PageRank as a function of the structural properties of the underlying network. In order to measure the localisation phenomenon we will employ the Inverse Participation Ratio (IPR). This concept was introduced in the context of condensed matter and, more specifically, to study the Anderson localisation phenomenon in disordered systems (see for example50). It is particularly useful to study localisation-delocalisation transitions.

The IPR ξcl, for the case of a classical walker, is defined as:

where r > 0 is an integer parameter which can be freely chosen and is fixed.

If we consider a classical walker on a network, we can have two extreme behaviours. The first one corresponds to the case where the walker is completely delocalised, i.e., the probability distribution of finding it on a site is uniform. Therefore, introducing a random variable X whose realisations are the sites of the lattice, one can write Pr(X = i) = 1/N, i. The other limiting case is that the walker is localised only on one site. In this case the probability of finding the walker is a Kronecker delta, that is Pr(X = i) = δij, if the walker is localised on say, site j. The IPR (eq. (5)) yields for the two limiting behaviours:

Thus the IPR, displaying respectively, a power law or a constant behaviour as a function of the number of nodes, is an appropriate witness of the localisation of the walker over the graph.

One can rewrite the IPR ξcl as . In order to study the localisation-delocalisation transition, it is useful to introduce the normalised anomalous dimension Δ2r:

This quantity interpolates between the two phases when the system undergoes a transition from a localised regime (where Δ2r = 1 − 2r) to a delocalised one (where Δ2r = 0).

In ref. 51 the localisation-delocalisation transition for a classical walker performing a random walk (with transition matrix given in (1)) was characterised by studying its dependence on the damping parameter α where 0 < α < 1. This study is important to understand at a deeper level the classical PageRank algorithm. Indeed, as we have anticipated, in the case of a scale-free graph observing localisation over a broad range of values for α is a necessary condition for the algorithm, quantum or classical, to perform well the task of ranking the nodes. The PageRank vector I, is given by:

and represents the stationary probability distribution of the walker on the network. In ref. 51 it was found that delocalisation is absent for a very large range of values of α ranging from 0.4 to 1.

This is quite natural because for the range of values of the damping factor α stated above, the second term, corresponding to random hopping in the Google matrix (see eq. (1)) is suppressed. This yields the localisation effect. On the other hand, for α close to 0, it was found that the walker is delocalised over the network. This can be understood by remembering that indeed for α close to 0 the second term in the Google matrix is dominant. In this case, the walker is only subject to random uniform hopping between any pair of nodes. This leads to a trivial phenomenon of delocalisation of the walker over the whole network.

Let us now focus on the localisation phenomenon in the case of the quantum walk on a network according to the quantum PageRank protocol. In order to carry out the analysis we need to generalise the definition of the IPR given above reinterpreting the notion of probability of finding a walker on a node when dealing with the quantum PageRank. In doing so, we will choose as a guiding principle the interpretation of the average quantum PageRank of a node (see eq. (4)) as the probability of finding the quantum walker on a particular node. Therefore, we will employ the definition given in eq. (4) that can be rewritten as:

Here, is the (strong) measurement operator on the second space (indexing the nodes where the edges point to, see the introduction), i.e. .

We are now in a position to define the IPR ξ in the case of a quantum walk as

Also in the case of a quantum walk we have and it is evident that one can extract the localisation phase of a walker from the scaling exponent of the IPR as a function of the number of nodes N. Indeed, from equation

it is clear that the witness of the localisation lies in the slope of the graph of the aforementioned log-log plot.

We consider two kinds of networks, of the scale-free and of the Erdős-Rényi type. In order to study the localisation phenomenon we generated networks with different numbers of nodes belonging to the two aforementioned classes. We then calculate the IPR (in the following we will fix the parameter r = 1) in order to understand whether for α = 0.85 the quantum walker was localised or delocalised on the network.

We find that the IPR in the case of the class of scale-free networks does not vary appreciably (see fig. 10) signalling localisation of the walker on the graph. Notice however that also in ref. 51 for these values of α a similar behaviour was found.

Figure 10
figure 10

The IPR (for r = 1) for networks of different classes, using the classical and the quantum walk, plotted versus the number of nodes in a log-log scale.

(a) The IPR using the quantum walk in the case of a scale-free graph and b) an Erdős-Rényi graph. (c) The IPR using the classical walk in the case of an Erdős-Rényi graph. The value of α is set to 0.85 in all cases. In order to obtain the data we created using NetworkX 4 networks in the same class and with the same parameters having 32, 64,128 and 256 nodes. We then calculated the IPR. In order to infer the phase of the walker we plotted log ξ vs. log N. A constant behaviour signals that the walker is localised whether a monotonically decreasing behaviour signal delocalisation over the network. We can infer that the quantum walker is in a localised phase in the case of the scale-free network (see (a)). This behaviour is in contrast with what is displayed in the case of the Erdős-Rényi graph where delocalisation is found in both the quantum and classical case (see subfigures (b) and (c)). This result holds true also when one considers graphs with a significantly lower link to node ratio. In this case we have superimposed two lines that result from a linear fit. These have equation log ξ = aq log N + bq with aq = −0.8565 and bq = −0.2482 for the quantum PageRank (see subfigures (d)). In the case of the classical PageRank the equation is log ξ = acl log N + bcl with acl = −1.0932 and bcl = 0.7125 (see subfigures (e)). These results are consistent with delocalisation (confront text in the section entitled Results).

We have analysed also the graphs in the Erdős-Rényi class performing the same steps as above. Our study shows that, albeit the fact that the networks are random graphs and that for this value of the damping parameter α the walk is strongly influenced by the topology of the network, the quantum walker is delocalised in this case. Indeed it can be seen from figure 10 that the behaviour of the logarithm of the IPR is linear in the logarithm of the number of nodes. This is a clear witness of the delocalisation phenomenon.

This behaviour is remarkable for two reasons. The first reason is that in the classical random walk case localisation of the walker was found51. The second reason is that albeit randomness being expected to give rise to localisation, in the case of graphs of Erdős-Rényi type, our study shows that the opposite is true.

We conclude that the scale-free graph seems to favour a localisation phase in both the random and the quantum walks, which underlie the classical and quantumPageRank algorithm. This result in the latter case was obtained with a value of α = 0.85. This is consistent with a good ranking of nodes in a network. Indeed, in order to unveil the main hubs the random or quantum walk must be able to localise the walkers on few important nodes. Interestingly, instead, the Erdős-Rényi graphs seem to prefer a delocalised phase albeit the networks being grown randomly. Both for the classical and the quantum PageRank one finds delocalisation for this class of graphs. This can be correlated with the absence of a small number of main hubs in this class of networks.

For the classical PageRank the localisation-delocalisation transition was characterised as a function of the damping parameter α. On the same footing, it is important to understand how the quantum PageRank depends on the value of α. We will study this dependence in the next section.

Stability of the quantum Google algorithm with respect to the noise parameter

In the previous section we have analysed the localisation properties of the quantum PageRank algorithm. We have studied this phenomenon having fixed the damping parameter using the value α = 0.85. Here, we will study how the quantum PageRank varies with respect to the variation of α.

The stability of the quantum PageRank is an important issue to consider because the damping parameter is arbitrarily tuned to a specific value. Indeed there is no a priori argument to fix the value of α. The value of 0.85 was originally chosen in the classical PageRank protocol to mimic the behaviour of a surfer (or a random walker) that randomly hops to any other page once every seven times. Only a posteriori it turned out that this is indeed a sensible choice given that the network is of small-world type, being in fact a crucial ingredient for the PageRank algorithm to yield reasonable ranking results. In view of the ad-hoc choice of the precise of the parameter α, it is a desirable property that the output of the algorithm is stable, i.e. the ranking vary slowly with respect to the variation of the damping parameter. A question that was addressed in the computer science community is to quantify how susceptible to changes in this parameter the classical PageRank algorithm is. It was found that the effect of this parameter on ranking is large and that two rankings obtained by running the algorithm using different values of this parameter can be very different51.

To tackle this problem in the quantum case we will make use of two quantities. The first one is related to the quantum fidelity (see e.g.52,53,54) that provides a way to measure the distance between two quantum states. The second quantity that we will use is the classical fidelity. It is employed for the same task when dealing with probability distributions.

Since in the classing ranking algorithm the PageRank vectors are classical probability distributions one can measure the distance between two PageRank vectors, calculated using different values of the damping parameter, with the classical fidelity. The latter can be written as:

In ref. 51 it was found that there is a plateau around (α, α′) ≈ (0.5, 0.5) and that the fidelity f(α, α′ = 0.85) does not display a significant variation for α ≈ 0.85. In particular, one can observe that the fidelity varies less than 5% for α [0.8, 0.9], thus implying that the classical PageRank is rather robust against perturbations.

The quantum fidelity is a quantity that measures the distance of two quantum states.

In the case of commuting density matrices it reduces to the classical fidelity.

Another valid measure of the distance of two quantum states is the trace distance:

where |τ| denotes the square root of the (positive) operator ττ.

The fidelity and the trace distance turn out to be equivalent measures of distance. Indeed, if the fidelity of quantum states is near to one then their trace distance is close to zero and viceversa (this can be seen from a general formula that relates the two measures of distance: , see e.g.53 chap. 9). Therefore, either can be used for our purpose of measuring the stability of the quantum PageRanks and the choice is a mere matter of convenience. To tackle the problem of stability in the case of the quantum PageRank we will use the trace distance and the classical fidelity.

Let us rewrite explicitly the definition of the averaged quantum PageRank 〈Iq(Pi, α)〉 by adding the dependence on α as:

The α-dependence enters in the initial state and in the evolution operator of the walk. Here, and for bookkeeping purposes it has been made explicit to which spaces the density matrix refers to.

Let us discuss how to apply the concept of trace distance in our case. We might measure the instantaneous distance Dα(2t), ρα(2t)), thus measuring the distance of the quantum states. However, it is more significant to take the time-average of the distance between the partial traces of the states, because we are interested in the quantum PageRank as an observable, rather than the state itself. We can thus make use of a less refined measure of distance (that is, one that appreciates less the difference of two states). This can be written in the following form (see the section entitled Methods for the derivation):

To summarize, we will study the stability making use of the classical fidelity and the quantity in (16), i.e., is a simpler measure descending from the trace distance (which turns out to be equivalent to the quantum fidelity).

We perform an analysis of how the quantum PageRank varies with respect to the rankings when the value of α goes from 0.01 to 0.98. We analyse a scale-free graph with 128 nodes that was generated with NetworkX, a python module. The results show clearly that the quantum PageRanks vary very little when the quantum walk underlying the quantum PageRank has a different damping parameter α. Indeed, it can be seen from figure 11 that the minimum fidelity between two values of α and α′ does not fall below the value of 0.91. One should compare this with the analysis of the classical PageRank51, where the fidelity between different values of α and α′ can be approximately 0. It can thus be inferred that the ranking is more robust when it is performed with the quantum PageRank.

Figure 11
figure 11

Measures of distance of quantum PageRanks obtained with different values of the damping parameter.

The network analysed is a scale free network with 128 nodes (generated with NetworkX). The damping parameter varies ranging from 0.01 to 0.98. (a) The fidelity obtained by applying the classical fidelity (see eq. (12)). One can see that there is a plateau for values of α around 0.8. (b) The measure of distance obtained from the trace distance (see (16)). We obtain a similar result: a plateau for values of α around 0.8 is clearly visible.

We have also investigated the behaviour around the value of the damping parameter α = 0.85. From the classical fidelity between the quantum PageRanks at α = 0.85 and at α ranging from 0.01 to 0.98 one can see that there is a plateau around the value of α = 0.85 (see figure 11) extending especially for smaller values of α. There is a dip for α = 0.95 which is due to the fact that the ranking is very sensitive to changes in the damping parameter α when its value approaches 1. For this value only the second term in the Google matrix G, giving random hopping, survives.

We have made the analysis more precise and the conclusions more cogent by considering also the measure of distance of rankings originating from the trace distance (see (16)). Also in this case the overall robustness of the ranking performed with the quantum PageRank is evident. One can see from figure 11 that the maximum value of this measure of distance is 0.18 comparing any two values of α and α′ ranging in the aforementioned interval. It can also be observed that the region where this ranking is more robust is around the value α ≈ 0.8. Indeed in figure 11 the blue region is wider and correspondingly the ranking more robust with respect to perturbation of the value of α. We find also in this case that (see fig. 12) the trace distance is rather smooth for α = 0.8. One can see that also in this case there is a curious peak for for α ≈ 0.95 similarly to the previous case.

Figure 12
figure 12

Analysis of the stability with respect to the variation of the damping parameter from the value α = 0.85.

The network is a scale free graph with 128 nodes generated using NetworkX for the quantum algorithm (Coloured lines) and of 256 nodes for the classical one. (a) In Colour the classical fidelity (see (12)) between the quantum PageRank calculated using α = 0.85 and the one calculated using values in the range from 0.01 to 0.98. In grey the one for the classical algorithm. We notice that the quantum PageRank is more robust with respect to the variation of the damping parameter. (b) The trace distance between the quantum PageRank calculated using α = 0.85 and the one calculated using values in the range from 0.01 to 0.98 (using (16)). Plot of the trace distance to compare the quantum PageRank obtained with α = 0.85 to the one obtained using other values of the damping parameter.

Finally, we have performed a statistical analysis considering ensembles of scale-free networks of increasing size (see the appendix and figure 18 for details). We have analysed the average behaviour of the classical fidelity for different values of the damping parameter α both for the classical and the quantum PageRank algorithm. Also in this case we find that the average fidelity of the QPR is always larger than its classical counterpart. In conclusion, the quantum PageRank as measured by the classical fidelity or by the trace distance varies mildly with respect to the variation of the damping parameter α. In fact, the minimum fidelity between any two distributions of importance arising from the quantum PageRank is 90%. The maximum of the distance obtained by using the trace distance between any two states (with different α) is 0.18. This means that the quantum PageRank is very robust with respect to variation of the parameter that controls the fraction of random hopping. It is much more robust than in the classical case. From our analysis of the stability of the classical PageRank we find that for extremal values of α, α′ the value of the fidelity is less than 0.4 (see fig. 13). In ref. 51 the minimum fidelity was found to be very close to 0% between PageRanks' rankings corresponding to extremal values of the damping parameter α.

Figure 13
figure 13

The fidelity obtained by applying the classical fidelity (see eq. (12)) in the case of the classical PageRank.

The network analysed is a scale free network with 256 nodes (generated with NetworkX). The damping parameter varies ranging from 0.01 to 0.98. One can see that for extremal values of α, α′ the value of the fidelity drops below 0.4.

Figure 14
figure 14

(a) The plot of the logarithm of the PageRanks (upper part) and quantum PageRanks (lower part), (after being reordered, see text in the section entitled Results) versus the logarithm of the node's label. As a guide to the eye we have superimposed two lines with slope equal to −0.9. One can clearly distinguish three zones (see text in the section entitled Results). (b) The plot of the logarithm of the means over the ensemble of graphs in a class of scale free networks of the PageRanks (upper part) and quantum PageRanks (lower part), (after being reordered, see text in the section entitled Results) versus the logarithm of the node's label. As a guide to the eye we have superimposed two lines with slope equal to −0.9 in the classical case and −0.85 in the quantum case.

Figure 15
figure 15

Plot in log-log scale of the quantum and classical PageRanks of the nodes of a piece of a real network (from EPA).

The quantum and classical PageRanks are displayed after having been sorted in descending order, see text in the section entitled Results versus the logarithm of the node's label. (a) The classical PageRanks. As a guide to the eye we have superimposed the fitted lines (in log-log scale) with equation EquationSource math mrow miI mo( mii mo) mo= msub mic mrow mic mil msup mii mrow momsub miβ mrow mic mil where βcl = 0.4545 and ccl = 0.0185. (b) The average quantum PageRanks. In this case we have superimposed the fitted line (in log-log scale) with equation EquationSource math mrow miI mo( mii mo) mo= msub mic miq msup mii mrow momsub miβ miq where βq = 0.3066 and ccl = 0.0095.

Figure 16
figure 16

Numerical study of the sensitivity of the quantum and the classical PageRank algorithm under coordinated attacks in scale-free graphs.

(a) Conceptual schematics illustrating the comparison of the PageRank list corresponding to networks, where the most important node(s) are taken out, with the PageRank list corresponding to the complete graph with all nodes intact, by means of Kendall's coefficient K. Numerical results for graphs of 16 and 32 nodes (graphs (b) and (c), respectively), where up to 5 of the most relevant nodes have been taken out. The data has been obtained by averaging over 100 random scale-free networks, which have been generated with NetworkX. Statistical error bars correspond to one standard deviation.

Figure 17
figure 17

Statistical analysis of the resolution of main hubs and secondary hubs by the classical and the quantum PageRank algorithm.

(a) Histogram of average number of hubs (blue), secondary hubs (green) and low-importance nodes (red), as detected by the QPR and the CPR algorithm (see text for details). The data is obtained by averaging over an ensemble of 29 random scale-free networks of 256 nodes. (b) Zoom into (a): The third set of columns displays the average difference between the number of main hubs, secondary hubs and low-importance nodes as detected by the QPR and the CPR. Error bars correspond to a statistical uncertainty of one standard deviation. Both the CPR and QPR detect (within statistical error bars) the same number of main hubs. However, the quantum PR algorithm resolves significantly more secondary hubs than the classical protocol (about 10 more secondary hubs for the considered network sizes of 256 nodes). (c) Numbers of secondary hubs as resolved by the QPR and the CPR algorithms, for each of the 29 instances of the analyzed ensemble of scale-free networks.

Figure 18
figure 18

Analysis of the scaling of the fidelity for the Quantum and Classical PageRank (see text for details).

The data is obtained by averaging over ensembles of, respectively 32, 31, 31 and 30 random scale-free networks of 32, 64, 96 and 128 nodes. The error bars correspond to a statistical uncertainty of one standard deviation. It is clear that the QPR (in blue) is more stable with respect to the variation of the damping parameter than the CPR (in red).

Power law behaviour for quantum PageRank

We have found that the quantum PageRank is able to highlight the structure of secondary hubs. We have shown that this strength of the quantum algorithm is related to the fact that the quantum walker on networks of scale-free type is in a localised phase. This phase is characterized by the property that the nodes with a significant average quantum PageRank constitute a negligible fraction of the nodes in the network. On the other side, for the classical algorithm, it has been shown55,56 that for real networks the classical PageRanks Ij of nodes, sorted in descending order, follow a power law behaviour. That is, the classical PageRanks decrease approximately like Ij ~ j−β, where β ≈ 0.9. This feature is a clear witness of the fact that the algorithm is able to identify the hubs. Furthermore, the scaling exponent β measures the relative importance given to the hubs with respect to the other nodes of less importance.

In this section we perform a similar analysis for the quantum PageRank algorithm. It is desirable that the quantum PageRank displays a power law scaling behaviour, as such behaviour is distinctive of the fact that the algorithm is able to uncover the scale-free nature of the network.

In order to reveal the scaling behaviour of the quantum PageRanks of the nodes we consider the conjectured form of the importance distribution

The power law behaviour can then be extracted from the slope of the log-log plot of the quantum PageRanks versus the (sorted) index of the i (since log〈Iq(Pi)〉 ~ −βq log(i)).

Here we perform the analysis on scale free networks of 256 nodes. We calculate the classical and quantum PageRanks of the nodes and after having sorted the nodes in descending order we analyse the log-log plot of the classical and quantum PageRanks versus the index of the nodes. Considering one instance of a graph in this class one can clearly see (cf. figure 14) that both rankings obtained using the classical and the quantum PageRank display a power law behaviour. The plot displays three areas, corresponding respectively to the hubs, to the intermediate part of the list and the low part of the ranking. In the classical case the latter are typically degenerate in importance.

The fact that we find this scaling behaviour in the quantum PageRank on scale-free networks is due to the fact that the walker is in a localised phase on graphs of this topology (see subsection entitled Localisation-Delocalisation Transition). A similar behaviour is found for the classical algorithm51. Consequently the most highly ranked nodes tend to concentrate nearly the totality of the importance. This can be clearly seen in figure 14, area I, where the importance values of the hubs lie above the line.

Furthermore, it is clear that the scaling coefficients are different in the quantum and the classical case. We find that βq < βcl, which indicates that the quantum PageRank has a smoother behaviour, resulting in less relative importance that assigned to the nodes in the high part of the list. On the other hand, the quantum algorithm is also able to better rank in the low part of the list, where the classical PageRank produces highly degenerate values. Here, the quantum protocol partially lifts the degeneracy (cf. the area III in figure 14). The quantum PageRank is therefore able to better distinguish between nodes of low importance, which belong to the lowest part of the list. This is because the difference between the importance of the nodes in the higher and lower part of the list is lower as compared to the classical case. Furthermore, in the quantum case the power law behaviour interpolates over a larger portion of the data as compared to the classical case. This is reflected by the fact that the area II in figure 14 extends over a larger interval in the case of the quantum algorithm.

To complete the analysis we consider an ensemble of scale free networks in order to display the ensemble properties rather than the ones of particular instances. The ensemble consists of 29 scale free networks. The analysis clearly confirms that the properties found for the particular graph analyzed in figure 14 persist when considering a mean property of the ensemble (see figure 14). We conclude that these properties are generic and not associated to a particular instance of the class of scale-free networks.

Finally, we consider the real-world network, a subgraph of the WWW obtained by exploring pages linking to www.epa.gov 41, which we refer as EPA in the following (see figure 15). Also in this case we find a power law behaviour with βq = 0.30 < 0.45 = βcl. The plot displays three areas as mentioned above for the other cases, so that the presented conclusions are valid also for this real-world network.

Sensitivity of the quantum PageRank algorithm under coordinated attacks in scale-free graphs

In this section, we raise the question of how sensitive the quantum PageRank algorithm is under coordinated attacks. More precisely, we ask how much the list of quantum PageRanks of an N-node graph changes as a whole if the n most important nodes (hubs) of a network fail (e.g. due to a hacker attack) and the quantum quantum PageRank algorithm is run on the remaining (Nn) - node graph. Motivated by the fact that the real-world internet belongs to the class of scale-free networks, we focus in our study on the scale-free networks of mesoscopic size (graphs of 16 and 32 nodes).

Operationally, we proceed in our numerical study as follows: (i) First, we determine for the initial N-node graph the quantum PageRank values and the ordered list of nodes according to the quantum PageRank algorithm. (ii) Next, we take out the most important node (main hub) from the graph. On the resulting reduced network (with corresponding modified connectivity matrix C′) we carry out the quantum PageRank algorithm to determine the modified list of quantum PageRanks, with a possibly different order of the N − 1 nodes. We note that the quantum algorithms run on the original N-node network and on the reduced graph differ quantitatively as the Hilbert spaces, the initial states and coherent dynamics are different due to the modified connectivity matrix C′ and resulting modified Google matrix G′ (see the introduction). (iii) Finally, we compare the ordered list of (N − 1) nodes according to the quantum PageRank values with the original list for the N-node graph, where the most important node is taken out (see fig. 16a). We quantify the overall difference between these two lists of N − 1 elements by Kendall's coefficient57. This function returns a value of one for lists in which the order of all elements is the same (irrespective of the individual values associated to each element of the list), zero for lists whose order of elements is exactly the opposite and values in between the two extremes for lists where the order of elements partially differs.

This procedure of steps (i) to (iii) is iterated to take out subsequently the n most important nodes according to the initial quantum PageRank list of the N-node graph. The resulting quantum PageRank list of the reduced (Nn) - node graph is then compared to the initial list (not including the n most important nodes).

To compare the sensitivity of the quantum PageRank algorithm with the classical PageRank algorithm, we perform the same type of coordinated attacks in the classical scenario, i.e., we analyse how the ordered list of classical PageRank values changes when the n most important nodes (according to the classical PageRank protocol) are taken out and the classical PageRank algorithm is run to determine the importance of nodes in the reduced (Nn) graphs.

The results are shown in fig. 16b and c. We find that when the most important nodes (hubs) are attacked and fail and the PageRank is recalculated for the reduced graphs, the order of the importance of the remaining nodes changes with respect to the list of the initial complete graph both in the classical and in the quantum case. The results suggest that in the case of the quantum PageRank algorithm, attacks on hubs could have a stronger effect than for the classical algorithm. This behaviour can be related to the fact that whereas for the classical case there is a large degeneracy of importance values of nodes of low PageRank, quantum fluctuations partially lift this degeneracy – see discussion in the subsection entitled Quantum PageRank on Scale-Free Networks and the insets in fig. 2. Thus, when hubs of the network are attacked and fail, the order of less important nodes – whose importance values slightly differ, can truly change in the quantum case, whereas the degeneracy of a larger number of nodes persists in the classical case. We conjecture that the increased capability of the quantum algorithm to resolve more structural details of the directed graphs, comes at the cost of an increased sensitivity to structural changes of the network. We remark, however, that the mesoscopic network sizes of the analysed ensemble and the associated amount of statistical fluctuations require an analysis of larger networks – being beyond the scope of the present work – to provide a definite answer to this question of sensitivity of the quantum PageRank algorithm.

Discussion

In this paper we have studied the behaviour of the quantum PageRank algorithm, developed in Ref. 3, when applied to complex networks. We have found that the quantum algorithm is able to clearly distinguish the structure of the underlying network. More specifically, the behaviour of the algorithm is distinctive for the three classes of complex networks studied in this work: scale-free networks, graphs of Erdős-Rényi type and hierarchical networks. In particular, we have observed that the quantum algorithm applied to scale-free networks is able to clearly highlight the structure of secondary hubs in the graphs. Furthermore, it is able to lift the degeneracy in importance of the low lying part of the list of rankings, which represents a typical shortcoming of the classical PageRank algorithm. Although best suited for scale-free graphs the quantum PageRank is also able to univocally uncover whether graphs lie in the Erdős-Rényi class. Applied to hierarchical graphs the algorithm has the capability to reveal more clearly the hierarchy of levels, out of which the graph is composed and to highlight the connectivity structure within every hierarchy layer better than its classical PageRank counterpart.

Considering the quantum PageRank algorithm as a directed quantum walk has allowed us to study the localisation properties of the quantum walker for the quantum protocol. By means of an analysis of the Inverse Participation Ratio (IPR), we have observed localisation of the quantum walker in the case of the quantum PageRank applied to scale-free networks under standard conditions (damping parameter α = 0.85). This finding is consistent with the ability of the quantum algorithm to highlight the hubs of the network. In contrast, for Erdős-Rényi graphs we find that the quantum walker is in a delocalised phase, which is in accordance with the absence of hubs for this class of networks.

Furthermore, we have analysed the robustness of the quantum algorithm with respect to variations of the damping parameter. We find a higher degree of robustness as compared to the classical PageRank protocol. This stability indicates that the value of this parameter, whose choice is to some extent arbitrary, turns out to be not crucial for the quantum algorithm to work reliably.

Furthermore, we have found that the distribution of importance values of quantum PageRanks in scale-free networks follows a power law behaviour. A similar behavior was found for the classical PageRank protocol. However, the corresponding scaling exponent is for the quantum protocol smaller than in the classical case, which indicates a smoother ranking of nodes. In contrast to the classical algorithm, in the quantum protocol the hubs of the graphs do not concentrate the whole importance and the algorithm lifts the degeneracy of the large set of nodes with low importance values. A numerical study on an ensemble of mesoscopic-sized scale-free networks suggests that this increased ranking capability might come at the cost of being more sensitive to structural changes of the network such as coordinate attacks on hubs.

Remarkably, the described characteristics of the quantum PageRank persist if the algorithm is applied to real-world networks. We have studied and successfully tested the performance of the algorithm by applying it to a real-world network, originating from the hyperlink structure of www.epa.org41. This study shows that the intriguing properties of the quantum algorithm are not restricted to a scenario where the algorithm is applied to artificially, numerically grown networks.

Complementary to numerical studies including the present work, it would be valuable to dispose of analytical results for the quantum algorithm to gain further insight in its performance properties. In this context, the class of hierarchical networks is a good candidate to address this question. A related subject of current study is concerned with the entanglement properties of quantum complex networks58,59,60. A different line of studies has pursued the application of the quantum adiabatic algorithm to the classical PageRank algorithm61 as an alternative to quantum walk based ones62,63,64.

In future work it will be interesting to further explore and analyse in detail the impact of coordinated attacks of hubs in large-scale networks, as well as to address the consequences of random failures of nodes in large networks of differing topology. From an algorithmic point of view, it is an interesting task to develop a dissipative version of this algorithm and to understand its performance and robustness properties in such scenario. We note that dissipation has already been considered as an element with respect to some aspect of the algorithm65,66, but the development of a truly dissipative version in the spirit of dissipative quantum algorithms and computation67,68 remains an open question. Furthermore the growing field of complex quantum networks would benefit from a version of the algorithm that is able to rank nodes in the more general case where qubits are located at the nodes of the network. An important question in this scenario is whether an algorithm based on a multi-particle quantum walk69,70 is needed in this context, or if there exists for this task an efficiently simulatable algorithm belonging to the computational complexity class P.

Methods

Statistical analysis of the resolution of secondary hubs

In this appendix we present a statistical analysis, which corroborates quantitatively the claim that the QPR algorithm resolves more clearly the existence of secondary hubs in scale-free graphs, as compared to the CPR algorithm. To analyze this property quantitatively, we have created and analyzed a statistical ensemble of 29 random scale-free networks, each consisting of N = 256 nodes.

To distinguish between main hubs, secondary hubs and the large remaining set of “low-importance nodes” we adopt the following simple and natural convention: Nodes which are assigned importance values smaller than the average importance value 1/N are considered to fall into the class of “low-importance nodes”, whereas nodes with higher importance values are regarded as hubs. Within the set of hubs one can further distinguish between main hubs (importance values larger than c/N) and secondary hubs (importance values smaller than c/N but larger than 1/N), where c > 1 is a fixed constant - for the present analysis we have fixed c = 10. Note that the choice of c which corresponds to fixing the “boundary” between the two sets of main and secondary hubs is arbitrary to some extent; however, we have checked that variations of c do not change the conclusions qualitatively.

Figure 17 shows the results of the statistical analysis. The study confirms that whereas both the CPR and the QPR protocol clearly identify the main hubs. Furthermore, the QPR algorithm indeed resolves more clearly the existence of secondary hubs in large-scale-free networks than the classical protocol – for the considered random sample of graphs it detects about three times more secondary hubs than the classical algorithm.

Analysis of the scaling of the fidelity with the network size. A comparison of QPR and CPR

In the following we provide more quantitative support to one of the main findings of this work: the fact that the QPR is more stable than the CPR with respect to the variation of the damping parameter α. To corroborate the finding we perform a statistical analysis considering ensembles of, respectively 32,31,31 and 30 scale-free networks with 32,64,96 and 128 nodes. We calculate the classical fidelity (see eq. (12)) between the Quantum PageRanks obtained using α = 0.85 and the one using α = 0.05 for each graph in the ensembles. After repeating the same analysis using the Classical PageRank and comparing the two average behaviours (see fig. 18) we notice that the average fidelity of the QPR is always strictly larger than the classical one. Furthermore, considering the statistical uncertainty (in fig. 18 given by one standard deviation) we can see how the error bars for the QPR and the CPR do not overlap. In addition, we notice that the statistical uncertainty is smaller in the quantum case indicating a smaller variability inside the ensembles. From the analysis we can thus conclude that the QPR is more stable with respect to variations of the α parameter in all the analysed range. Furthermore, it shows a more favourable scaling with respect to the network size.

Distance measure

In this subsection of the appendix we provide the detailed derivation of eq. (16) that is used to quantify the stability of the Quantum PageRank. From eq. (15):

where for bookkeeping purposes in the derivations that follow it has been made explicit to which spaces the density matrix refers to. Using the fact that trace preserving quantum operations are contractive. That is:

and making use of another property, namely that the trace distance of two states is attainable as the maximum over all strong (i.e. PVM) measurement outcomes of the difference of the two states:

that, in our case, specializes to:

we obtain Finally it is useful to measure the average distance as we are interested in the stability of the average quantum PageRank:

eq. (A.22) can be rewritten as:

which in our case is clearly stated as:

Where we can take the absolute value because the distance between two states is a nonnegative number.