Continuous-time quantum walk based centrality testing on weighted graphs

Centrality measure is an essential tool in network analysis and widely used in the domain of computer science, biology and sociology. Taking advantage of the speedup offered by quantum computation, various quantum centrality measures have been proposed. However, few work of quantum centrality involves weighted graphs, while the weight of edges should be considered in certain real-world networks. In this work, we extend the centrality measure based on continuous-time quantum walk to weighted graphs. We testify the feasibility and reliability of this quantum centrality using an ensemble of 41,675 graphs with various topologies and comparing with the eigenvector centrality measure. The average Vigna’s correlation index of all the tested graphs with all edge weights in [1, 10] is as high as 0.967, indicating the pretty good consistency of rankings by the continuous-time quantum walk centrality and the eigenvector centrality. The intuitive consistency of the top-ranked vertices given by this quantum centrality measure and classical centrality measures is also demonstrated on large-scale weighted graphs. Moreover, the range of the continuous-time quantum walk centrality values is much bigger than that of classical centralities, which exhibits better distinguishing ability to pick the important vertices from the ones with less importance. All these results show that the centrality measure based on continuous-time quantum walk still works well on weighted graphs.

www.nature.com/scientificreports/ The CTQW-based centrality is limited to undirected network structures in the original study. The following works extend the CTQW-based centrality to directed networks 24 and experimentally demonstrate the quantum centrality ranking on directed graphs 25,26 . Except for the direction of connections in networks, the weight of connections is also an essential factor in real-world networks. For instance, Radicchi et al. define the weighted citation network between authors, and use it to analyze the scientific impact of physicists 27 . Another example is to identify the super spreaders in an outbreak of infectious disease 18 . The close contacts and accidental meetings usually face different infection risks, and should be marked differently in contact tracing to better control the spread of the virus. These two examples can be abstracted to centrality ranking problem, where the prominent physicists in citation networks and the super spreaders of infectious diseases are denoted by higher centrality measure. The weight or the number of connections between two nodes effect the centrality ranking in these cases.
In this work, we extend the CTQW-based centrality measure to the weighted graph for the first time. We test an ensemble of weighted graphs with various topologies to validate the feasibility and reliability of this quantum centrality. The correlation coefficients between the rankings given by CTQW-based centrality and eigenvector centrality are pretty high for all the tested graphs, and intuitive consistency of the top-ranked vertices given by this quantum centrality measure and classical centrality measures is also demonstrated on large-scale weighted graphs. What's more, we also find the advantage of the CTQW-based centrality in distinguishing the important vertices from the ones with less importance.

Results
The time evolution of the CTQW is described by the time-independent Hamiltonian, which is determined by the underlying network structure. Specifically for an undirected graph G with n vertices, a quantum walker evolves in the walking space spanned by {|1�, |2�, . . . , |n�} , which is an orthogonal basis corresponding to n vertices. The Schrödinger equation governs the evolution of CTQW on graph G 2,22 : where the Hamiltonian is the adjacent matrix ( H = A ) and To extend the CTQW-based centrality measure to weighted graphs, it should be noted that the elements in the adjacent matrix A denote the weight of each edge. Solving the Schrödinger equation with = 1 , we get the state of the quantum walker at time t: |ψ(t)� is a superposition state in the walking space, where the probability amplitude on node i at time t is α i (t) = �i|ψ(t)� . The probability of the walker at node i is P i (t) = |α i (t)| 2 .
For the centrality measure based on CTQWs, the evolution starts from the initial state |ψ(0)� = 1 √ n n i=1 |i� . The quantum walker propagates on graph G following Eq. (3). The CTQW-based centrality is calculated by the long-time average of the walker located at each vertex 22 : In Fig. 1, we use a simple example to demonstrate the numerical simulation of the CTQW-based centrality on a weighted graph. Figure 1a gives a typical 5-node network, and the weights are marked on each edge. The probability on each vertex as a function of evolution time is shown in Fig. 1b. The dotted line denotes the average probability and is the CTQW-based centrality of each vertex. According to these centrality values, the ranks of node 1 to node 5 are 2, 3, 3, 3, 1 respectively, which are the same as the order given by eigenvector centrality. The previous works show that the CTQW-based centrality correlates well with the eigenvector centrality, and works excellently as a centrality measure on unweighted graphs 23,24 . The simple example in Fig. 1 shows the possibility that the CTQW-based centrality may still work on weighted graphs. We now generalize the CTQW-based centrality to the weighted graphs and study the performance of this quantum centrality measure.
To validate our proposal's feasibility, we conduct statistical analysis over an ensemble of randomly generated weighted graphs, including connected, planar, Eulerian, vertex critical, edge critical, self-complementary, cubic planar, hypo-Hamiltonian, Erdős-Rényi and scale-free graphs, 41,675 graphs in total. The original graphs are undirected and unweighted. So we add a weight w = 2 on a randomly chosen edge to all graphs in each group. The tested graphs are listed in Table 1. Figure 2 intuitively shows the correlation of the eigenvector and CTQWbased centralities in the ranking problem. Referring to the time analysis of the centrality based on DTQWs 28 , all the CTQW-based centralities of weighted graphs in this paper are calculated over the same timescale, i.e., t = 20π instead of t → ∞ . To quantitatively evaluate the agreement between the rankings by eigenvector and CTQW-based centralities, we employ Kendall's τ correlation coefficient 29 (see "Methods" for the calculation of τ Kendall ). τ Kendall takes values from −1 to 1, wherein τ Kendall = 1 denotes the same ranking orders by different centrality measures. Two rankings with τ Kendall at or above 0.9 are considered effectively equivalent 30,31 , at least (2) A ij = w ij for node i and j connected with weight w ij , 0 for node i and j not connected.   www.nature.com/scientificreports/ empirically 32,33 . It can be seen that among all generated weighted graphs listed in Table 1, the τ w=2 Kendall between the eigenvector and the CTQW-based centrality measures are pretty high except for the cubic planar and scalefree graphs.
To find the reason causing the imperfect correlation, the eigenvector and the CTQW-based centralities of the cubic planar graph and the scale-free graph with the minimum τ Kendall are shown in Fig. 3. We can see that the correlation is lowered by the discordances in low-lying vertex centralities while the important vertices with large centralies ranked the same by the eigenvector and the CTQW-based centrality measures. However, the low-lying centrality usually give little information and we care more about the top-ranked vertexes in most cases. The calculation of τ Kendall does not make any distinctions and equally penalizes discordances both at high and low rankings. There have been many researches to cover this flaw of τ Kendall in certain applications 31,34-38 , and we further employ a weighted variant of Kendall's correlation coefficient introduced by Vigna 38 , τ Vigna , to evaluate the agreement between the rankings by eigenvector and CTQW-based centralities. The Vigna's rank correlation coefficient gives more weight to the discordances at high rankings, whose usefulness has been validate on social networks and web graphs 38 . The average τ Vigna for each graph set is listed in Table 1. The correlation coefficient values increase especially for the cubic planar and scale-free graphs as expected. The average τ Vigna of all the tested 41,675 graphs is 0.963, which indicates a consistent ranking order with eigenvector centrality achieved on large-scale test. Hence, it is reasonable to utilize our CTQW-based centrality measure to solve the centrality problem on weighted graphs.
The above analysis based on correlation coefficients has shown the excellent consistency of the rankings by CTQW-based centrality and eigenvector centrality. However, from the correlation coefficients we are still not sure if the top-ranked vertices hold the exactly same ranking order. So it is proper to give an intuitive demonstration of the consistence details. As most cases especially concern the top ranks, we pay more attention to the top-ranked vertices. Figure 4 intuitively demonstrates the consistence of rankings by PageRank, eigenvector and CTQW-based centralities on ensembles of the large-scale weighted graphs. Concretely, we consider two of the most paradigmatic network topologies: Erdős-Rényi graphs 39 and scale-free networks 40 . An Erdős-Rényi www.nature.com/scientificreports/ graph denoted by ER(n, p) is comprised of n vertices with edges randomly distributed following the Bernoulli distribution with probability p. For such a network, the vertex degree distribution P(k) (the fraction of vertices with degree k) follows binomial form, i.e., most vertices have a degree close to the mean number of connections, n · p . A scale-free network SF(n, m) is generated by Barabási-Albert algorithm 41 with n vertices and the probability of k-degree vertex p(k) ∝ 1 k m . In a scale-free network, most vertices have only a few connections with others, and a few vertices are connected with a large number of other vertices, which are called hub vertices. We take the eigenvector centrality measure as the benchmark and sort the vertices by the eigenvector centrality values. The average CTQW-based centrality, eigenvector centrality and PageRank centrality of each vertices over the ensemble of ER(100, 0.3) and the ensemble of SF(100, 2) are shown in Fig. 4a,b respectively. The 100 vertices are ranked by their eigenvector centralities, so the eigenvector centrality (grey dotted line) decreases Table 1. The average correlation coefficients for graphs with different topologies. The superscript w = 2 denotes only one weighed edge w = 2 , and w (i,j) ∈ [1, 10] denotes the weight of arbitrary edge in [1,10].   It is worth noting that the range of the CTQW-based centrality is larger than the eigenvector centrality and PageRank centrality, which means the better distinction of the vertex centrality ranks. We use the range R = c max − c min to evaluate the distribution of the centrality values. R CTQW for CTQW-based centrality measure is almost twice the R EV and R PR for eigenvector and Pagerank centrality measures on the randomly generated Erdős-Rényi and scale-free graphs. It is reasonable to utilize the distinguishing ability of CTQW-based centrality measure to pick the important vertices from the ones with less importance.
It has been shown that the CTQW-based centrality measure works well on weighted graphs with w = 2 added on one randomly-chosen edge. The weighted graphs must be more complicated in the real world, so we further investigate the CTQW-based centrality by varying weight and choosing more weighted edges. First, we generate an Erdős-Rényi graph ER(100, 0.3) and assign different weights from 1 to 10 to the edge connecting vertex 12 and 69. Then we conduct the numerical simulations to observe the changes of CTQW-based centrality values for each vertex. The results are shown in Fig. 5a, where different weight cases correspond to lines of different colors. It can be seen that there is little influences on vertices other than the endpoint vertex 12 and 69 of the randomly chosen edge with additional weights. From the insets of Fig. 5a, it is clear that the centrality values rise up as the weight increasing. Besides varying the weight of a certain edge, we also considering the case of multiple weighted edges. For the ER(100, 0.3), we randomly choose 5 edges and add the weight w = 2 to these edges in succession. The calculated CTQW-based centralities are shown in Fig. 5b, which also indicates that the weight mainly influence the centralities of the corresponding endpoints. This conclusion is in line with the intuitive cognition.
Based on the above analysis, we finally test an ensemble of graphs whose each edge is given a random weight w ∈ [1,10] . The original graphs are the same as those listed in Table 1, but the weight of each edge is newly generated. Numerical analysis based on τ Kendall and τ Vigna is conducted on these new weighted graphs, and the results are shown in Table 1. It is clear that the correlation coefficients are still reasonably high with τ w (i,j) ∈[1,10] Vigna = 0.967 , which indicates the excellent consistency of the rankings by CTQW-based centrality and eigenvector centrality. Figure 4c,d further intuitively demonstrate the rankings by PageRank, eigenvector and CTQW-based centralities on the new weighted ER(100, 0.3) and SF(100, 2) graphs respectively. The reliability in ranking the top-ranked vertices and the distinguishing ability of CTQW-based centrality still holds in these  www.nature.com/scientificreports/ large-scale graphs with all random-weighted edges. In conclusion, it is reasonable to extend the CTQW-based centrality to the weighted graphs.

Discussion
In summary, we extend the CTQW-based centrality to weighted graphs for the first time, which expands the use of CTQW-based centrality measure to more realistic applications. Based on the numerical analysis on various weighted graphs, we testify the feasibility and reliability of this quantum centrality. The correlation coefficients between the rankings by CTQW-based centrality and eigenvector centrality are pretty high, and the ranks of top-ranked vertices given by this quantum centrality and the classical centralities consist well according to the intuitive demonstrations. Furthermore, we find that the CTQW-based centrality measure show better distinguishing ability to pick the important vertices from the ones with less importance. All the excellent results are obtained using an instance simulation time for CTQW-based centralities. For the precise analysis of this quantum centrality efficiency, further investigation is needed to compare with the classical algorithms.

Methods
Kendall's τ correlation. Suppose X = �x 1 , x 2 , . . . , x n � are eigenvector centralities of vertices in graph G, and Y = �y 1 , y 2 , . . . , y n � are CTQW-based centralities. The subscript from 1 to n identifies the vertex. The Kendall's τ coefficient is used to measure the agreement between the rankings given by these centrality measures, i.e., τ Kendall = i<j sgn x i − x j sgn y i − y j i<j sgn x i − x j sgn x i − x j i<j sgn y i − y j sgn y i − y j www.nature.com/scientificreports/ where n(n − 1)/2 is the total number of pairs (i, j) with i < j and t X (t Y ) is the number of tied pairs in the ranking X (Y ) . For arbitrary pair of vertices i, j , the two centrality measures are said to be concordant if sgn x i − x j sgn y i − y j > 0 , and discordant if sgn x i − x j sgn y i − y j < 0 . A tie reflects the inability of the centrality measure to decide which item should be ranked first, and the tied pair with x i − x j = 0 or y i − y j = 0 can be considered neither concordant nor discordant. The coefficient τ Kendall = 1 if and only if there is a perfect correspondence between the rankings of vertices in G with reference to the different centrality measures, and τ Kendall = −1 indicates that the rankings are exactly inverted. Therefore, the coefficient τ Kendall closer to 1 means that the CTQW-based centrality is more consistent with eigenvector centrality measure, and is feasible as a evaluation criterion.
The weighted correlation index. τ Vigna . Vigna's Correlation index τ Vigna for rankings extends Kendall's definition taking into account weights of concordances and discordances between vertices with different ranks in the presence of ties. The weight function used in this paper is ρ(i) is the ranking function associating each vertex with a rank. In this paper, ρ X,Y (i) and ρ Y ,X (i) give a unique rank to each vertex. We denote different ranking functions by distinct subscripts. ρ X,Y (i) is defined by ranking vertices in descending order with respect to X and then Y. For the vertices tied both in X and Y, they can be placed in any order. The function ρ Y ,X (i) is defined analogously. The weighted correlation index is calculated by The Kendall's τ coefficient is lowered by the discordances of the vertices with large ranks comparing to Vigna's weighted correlation index.

Data availability
The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.