# Growing Random Graphs with Quantum Rules

Hamza Jnane, Di Molfetta Giuseppe, Filippo Miatto

► To cite this version:

Hamza Jnane, Di Molfetta Giuseppe, Filippo Miatto. Growing Random Graphs with Quantum Rules. Electronic Proceedings in Theoretical Computer Science, 2020, 315, pp.38-47. 10.4204/EPTCS.315.4. hal-03594728

HAL Id: hal-03594728

https://amu.hal.science/hal-03594728

Submitted on 14 Mar 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Growing Random Graphs with Quantum Rules

Hamza Jnane

Télécom Paris, LTCI, 19 Place Marguerite Perey, 91120 Palaiseau, France

hamza.jnane@telecom-paris.fr

Giuseppe Di Molfetta

Université publique, CNRS, LIS, Marseille, France and Quantum Computing Center, Keio University

giuseppe.dimolfetta@lis-lab.fr

Filippo M. Miatto

Télécom Paris, LTCI, 19 Place Marguerite Perey, 91120 Palaiseau, France

filippo.miatto@telecom-paris.fr

Random graphs are a central element of the study of complex dynamical networks such as the internet, the brain, or socioeconomic phenomena. New methods to generate random graphs can spawn new applications and give insights into more established techniques. We propose two variations of a model to grow random graphs and trees, based on continuous-time quantum walks on the graphs. After a random characteristic time, the position of the walker(s) is measured and new nodes are attached to the nodes where the walkers collapsed. Such dynamical systems are reminiscent of the class of spontaneous collapse theories in quantum mechanics. We investigate several rates of this spontaneous collapse for an individual quantum walker and for multiple non-interacting walkers. We conjecture (and report some numerical evidence) that the models are scale-free.

Keywords: continuous time quantum walk; growing network; spontaneous collapse.

## 1 Introduction

The intrinsic randomness of quantum physics can be exploited to generate “truly random” numbers. If a system is prepared in a superposition of basis states, a measurement outcome in that basis is intrinsically random. Such genuine randomness, which cannot be achieved with only classical means, has an important role in several fields such as cryptography [15] and simulations [13].

In this work we harness quantum randomness for generating random graphs. Our motivation is that a large variety of real systems, from natural to socioeconomic phenomena [17], protein-protein interactions [19], the brain [16], the internet [21], financial trading [18], and many other dynamical systems can be described by random graphs. Moreover, the random collapse of the wave function of the quantum walker that is built into our models is reminiscent of the spontaneous collapse theories in quantum mechanics [11].

Although there are various ways to construct such discrete structures [5, 10], for most of them it is difficult to certify randomness based solely on the observed random graph states [12]. On the other hand, the intrinsic randomness that emerges from measuring a quantum system in superposition of states can be used to give guarantees on the randomness of a graph. Quantum walks on graphs are well-known [1] and already lend themselves to many applications, including search algorithms [8], element distinctness [2] and isomorphism tests [6], discretization of differentiable surfaces [3, 4] and cryptography [20].

G. Di Molfetta, V. Kendon & Y. Shikano (Eds.): 9th International
Conference on Quantum Simulation and Quantum Walks (QSQW 2020)
EPTCS 315, 2020, pp. 38–47, doi:10.4204/EPTCS.315.4

© H. Jnane, G. Di Molfetta & F. M. Miatto
This work is licensed under the
Creative Commons Attribution License.
# Growing Random Graphs with Quantum Rules

Hamza Jnane

Télécom Paris, LTCI, 19 Place Marguerite Perey, 91120 Palaiseau, France

hamza.jnane@telecom-paris.fr

Giuseppe Di Molfetta

Université publique, CNRS, LIS, Marseille, France and Quantum Computing Center, Keio University

giuseppe.dimolfetta@lis-lab.fr

Filippo M. Miatto

Télécom Paris, LTCI, 19 Place Marguerite Perey, 91120 Palaiseau, France

filippo.miatto@telecom-paris.fr

Random graphs are a central element of the study of complex dynamical networks such as the internet, the brain, or socioeconomic phenomena. New methods to generate random graphs can spawn new applications and give insights into more established techniques. We propose two variations of a model to grow random graphs and trees, based on continuous-time quantum walks on the graphs. After a random characteristic time, the position of the walker(s) is measured and new nodes are attached to the nodes where the walkers collapsed. Such dynamical systems are reminiscent of the class of spontaneous collapse theories in quantum mechanics. We investigate several rates of this spontaneous collapse for an individual quantum walker and for multiple non-interacting walkers. We conjecture (and report some numerical evidence) that the models are scale-free.

Keywords: continuous time quantum walk; growing network; spontaneous collapse.

## 1 Introduction

The intrinsic randomness of quantum physics can be exploited to generate “truly random” numbers. If a system is prepared in a superposition of basis states, a measurement outcome in that basis is intrinsically random. Such genuine randomness, which cannot be achieved with only classical means, has an important role in several fields such as cryptography [15] and simulations [13].

In this work we harness quantum randomness for generating random graphs. Our motivation is that a large variety of real systems, from natural to socioeconomic phenomena [17], protein-protein interactions [19], the brain [16], the internet [21], financial trading [18], and many other dynamical systems can be described by random graphs. Moreover, the random collapse of the wave function of the quantum walker that is built into our models is reminiscent of the spontaneous collapse theories in quantum mechanics [11].

Although there are various ways to construct such discrete structures [5, 10], for most of them it is difficult to certify randomness based solely on the observed random graph states [12]. On the other hand, the intrinsic randomness that emerges from measuring a quantum system in superposition of states can be used to give guarantees on the randomness of a graph. Quantum walks on graphs are well-known [1] and already lend themselves to many applications, including search algorithms [8], element distinctness [2] and isomorphism tests [6], discretization of differentiable surfaces [3, 4] and cryptography [20].

G. Di Molfetta, V. Kendon & Y. Shikano (Eds.): 9th International
Conference on Quantum Simulation and Quantum Walks (QSQW 2020)
EPTCS 315, 2020, pp. 38–47, doi:10.4204/EPTCS.315.4

© H. Jnane, G. Di Molfetta & F. M. Miatto
This work is licensed under the
Creative Commons Attribution License.
Quantum walks are a natural choice in our models, and can be seen as the quantum counterpart of classic random walks which have been defined on all kinds of grids, in continuous and discrete time [9].

Here we propose an original application of Quantum Walks on graphs to the problem of random graph generation. In our models, the quantum system is given by one or more quantum walkers that evolve continuously on the graph. Then, a measurement operation or a spontaneous collapse of the walker guides the evolution of the graph's adjacency matrix over time.

We will present two models. The first can grow random trees and is based on a single quantum walk, while the second can grow general graphs and is based on two walkers.

The manuscript is organized as follows: we will first present our two models in sections II and III. Then we will present a few numerical experiments where we grow random graphs and analyze various metrics and how they depend on the average collapse time.

To support the numerical explorations in this manuscript and to promote reproducibility, we have developed an open source python library [14].

# 2 Models

## 2.1 Single-walker model: random trees

Let us consider an undirected graph $G = (V, E)$, where $V$ is the set of vertices, $V = \{0, ..., N-1\}$, and $E$ is the set of the edges connecting the nodes. Such graph can be described by a symmetric adjacency matrix $A_G$ of dimension $N \times N$, which has a 1 at position $(i, j)$ if the $i$-th node and the $j$-th node are directly connected by an edge, and 0 otherwise. In our case, we use the adjacency matrix as the Hamiltonian of a continuously evolving system: the quantum walker. The quantum walker is defined by its state on the nodes $|\Psi_G\rangle \in \mathbb{C}^N$ such that $|\Psi_G\rangle = \sum_{v \in V} a_v |v\rangle$, where $|v\rangle$ are the vertices of the graph. The continuous time quantum walk is driven by the unitary operator $U(t) = e^{-iA_Gt}$. The probability of a walker starting at vertex $u$ to be measured at vertex $v$ after a time $t$ is given by

$$P_t(v|u) = |\langle u|U(t)|v\rangle|^2$$

The process for growing graphs can be summarized as follows:

1. set an initial graph state $|\Psi_G\rangle$ over the graph $G$;

2. let the walker evolve under the Hamiltonian $A_G$ for a time $t$ where $t \sim \text{Exp}(\tau)$ is sampled from the exponential distribution of average $\tau$;

3. measure the position of the walker and obtain a node $v$ (this step is equivalent to sampling from the distribution $P(v) = |\langle v|U(t)|\Psi_G\rangle|^2$);

4. attach a new node to the node $v$, updating the adjacency matrix accordingly;

5. restart from 1. with $|\Psi_G\rangle = |v\rangle$.

Note that at each step the dimension of the Hilbert space associated to the graph $G$ increases by one. As this model does not allow to create closed loops, it leads to the growth of random trees, so with vanishing cluster coefficient.

As an exemple, consider the graph represented by

$$H = \begin{bmatrix} 0 & 1 & 1 & 1 \\ 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 \end{bmatrix}$$
Quantum walks are a natural choice in our models, and can be seen as the quantum counterpart of classic random walks which have been defined on all kinds of grids, in continuous and discrete time [9].

Here we propose an original application of Quantum Walks on graphs to the problem of random graph generation. In our models, the quantum system is given by one or more quantum walkers that evolve continuously on the graph. Then, a measurement operation or a spontaneous collapse of the walker guides the evolution of the graph's adjacency matrix over time.

We will present two models. The first can grow random trees and is based on a single quantum walk, while the second can grow general graphs and is based on two walkers.

The manuscript is organized as follows: we will first present our two models in sections II and III. Then we will present a few numerical experiments where we grow random graphs and analyze various metrics and how they depend on the average collapse time.

To support the numerical explorations in this manuscript and to promote reproducibility, we have developed an open source python library [14].

# 2 Models

## 2.1 Single-walker model: random trees

Let us consider an undirected graph $G = (V, E)$, where $V$ is the set of vertices, $V = \{0, ..., N-1\}$, and $E$ is the set of the edges connecting the nodes. Such graph can be described by a symmetric adjacency matrix $A_G$ of dimension $N \times N$, which has a 1 at position $(i, j)$ if the $i$-th node and the $j$-th node are directly connected by an edge, and 0 otherwise. In our case, we use the adjacency matrix as the Hamiltonian of a continuously evolving system: the quantum walker. The quantum walker is defined by its state on the nodes $|\Psi_G\rangle \in \mathbb{C}^N$ such that $|\Psi_G\rangle = \sum_{v \in V} a_v |v\rangle$, where $|v\rangle$ are the vertices of the graph. The continuous time quantum walk is driven by the unitary operator $U(t) = e^{-iA_Gt}$. The probability of a walker starting at vertex $u$ to be measured at vertex $v$ after a time $t$ is given by

$$P_t(v|u) = |\langle u|U(t)|v\rangle|^2$$

The process for growing graphs can be summarized as follows:

1. set an initial graph state $|\Psi_G\rangle$ over the graph $G$;

2. let the walker evolve under the Hamiltonian $A_G$ for a time $t$ where $t \sim \text{Exp}(\tau)$ is sampled from the exponential distribution of average $\tau$;

3. measure the position of the walker and obtain a node $v$ (this step is equivalent to sampling from the distribution $P(v) = |\langle v|U(t)|\Psi_G\rangle|^2$);

4. attach a new node to the node $v$, updating the adjacency matrix accordingly;

5. restart from 1. with $|\Psi_G\rangle = |v\rangle$.

Note that at each step the dimension of the Hilbert space associated to the graph $G$ increases by one. As this model does not allow to create closed loops, it leads to the growth of random trees, so with vanishing cluster coefficient.

As an exemple, consider the graph represented by

$$H = \begin{bmatrix} 0 & 1 & 1 & 1 \\ 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 \end{bmatrix}$$
with the walker on the node $v = 0$, i.e. with state $|\Psi(0)\rangle = (1, 0, 0, 0)^\top$. Let the walker evolve for a time $t = 0.5$. The probability distribution of the walker's position is now $P(v) \approx (0.42, 0.20, 0.19, 0.19)^\top$. We measure the walker and we collapse its state, finding it for example on the node $v = 1$. Finally, as illustrated in Fig.1, we update the graph and the walker and we are set for a new iteration:

$$H' = \begin{bmatrix} 0 & 1 & 1 & 1 & 0 \\ 1 & 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \end{bmatrix} \qquad |\Psi(\tau)\rangle = \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \\ 0 \end{bmatrix}$$

<figure><img src="image_1.png" /><figcaption>Figure 1: (left) Initial graph. (Right) Graph after 1 complete step</figcaption></figure>

As illustrated in Fig. 2, we observe that for short average time $\tau$ between collapses, the nodes aggregate in few large star graphs connected by single edges. This can be understood by noticing that for short evolution times, the walker may not have enough time to leave the central node where it keeps collapsing. However, as we show below, the dynamics in these sub-graphs is rich and indeed a walker is actually *guaranteed* to leave a localised star graph because the rate at which the amplitude leaves the central node increases with the size of the star.

For longer average times instead the walker has time to explore the graph and the star sub-graphs don't have a way to develop. It is an open question whether structures analogous to star graphs develop on a larger scale, leading to scale-free trees.

A walker that begins its evolution on the central node of a star graph keeps oscillating between the central node and an uniform superposition on the edges, which can be seen by analyzing the eigenvalues of the adjacency matrix of a star graph. The frequency of oscillation for $n$ nodes is proportional to $\sqrt{n}$, and the probability to collapse on the central node after a time $t$ is given by $\cos^2(\sqrt{n}t)$.

Starting from a trivial graph with a single node, the probability to be in the same node at the center of the star for $k$ consecutive collapse events for a short average collapse time $\tau$ is

$$P_{\text{center}}(k) \approx \prod_{n=1}^{k} \cos^2(\sqrt{n}\tau)$$

It's easy to see that $P_{\text{center}}(k)$ decreases monotonically with $k$ for any value of $\tau$. So the probability to escape the center after exactly $k$ events is

$$P_{\text{out}}(k) \approx \sin^2(\sqrt{k}\tau) \prod_{n=1}^{k-1} \cos^2(\sqrt{n}\tau)$$
with the walker on the node $v = 0$, i.e. with state $|\Psi(0)\rangle = (1,0,0,0)^\top$. Let the walker evolve for a time $t = 0.5$. The probability distribution of the walker's position is now $P(v) \approx (0.42,0.20,0.19,0.19)^\top$. We measure the walker and we collapse its state, finding it for example on the node $v = 1$. Finally, as illustrated in Fig.1, we update the graph and the walker and we are set for a new iteration:

$$H' = \begin{bmatrix} 0 & 1 & 1 & 1 & 0 \\ 1 & 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \end{bmatrix} \qquad |\Psi(\tau)\rangle = \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \\ 0 \end{bmatrix}$$

<figure><img src="image_2.png" /><figcaption>Figure 1: (left) Initial graph. (Right) Graph after 1 complete step</figcaption></figure>

As illustrated in Fig. 2, we observe that for short average time $\tau$ between collapses, the nodes aggregate in few large star graphs connected by single edges. This can be understood by noticing that for short evolution times, the walker may not have enough time to leave the central node where it keeps collapsing. However, as we show below, the dynamics in these sub-graphs is rich and indeed a walker is actually *guaranteed* to leave a localised star graph because the rate at which the amplitude leaves the central node increases with the size of the star.

For longer average times instead the walker has time to explore the graph and the star sub-graphs don't have a way to develop. It is an open question whether structures analogous to star graphs develop on a larger scale, leading to scale-free trees.

A walker that begins its evolution on the central node of a star graph keeps oscillating between the central node and an uniform superposition on the edges, which can be seen by analyzing the eigenvalues of the adjacency matrix of a star graph. The frequency of oscillation for $n$ nodes is proportional to $\sqrt{n}$, and the probability to collapse on the central node after a time $t$ is given by $\cos^2(\sqrt{n}t)$.

Starting from a trivial graph with a single node, the probability to be in the same node at the center of the star for $k$ consecutive collapse events for a short average collapse time $\tau$ is

$$P_{\text{center}}(k) \approx \prod_{n=1}^{k} \cos^2(\sqrt{n}\tau)$$

It's easy to see that $P_{\text{center}}(k)$ decreases monotonically with $k$ for any value of $\tau$. So the probability to escape the center after exactly $k$ events is

$$P_{\text{out}}(k) \approx \sin^2(\sqrt{k}\tau) \prod_{n=1}^{k-1} \cos^2(\sqrt{n}\tau)$$
<figure><img src="image_2.png" /><figcaption>Figure 2: Generic random graphs for $n = 100$ steps - one walker model for $\tau = 0.001, 0.01, 0.05, 0.1, 0.5, 10$. Notice how for longer average collapse times, the walker has more time to explore the graph, which leads to more complex trees.</figcaption></figure>

To first approximation, a star graph will cease growing as soon as the walker collapses to an outer node. So we can compute the average star size by

$$ \mathbb{E}[n]_{\tau} \approx \sum_{k=1}^{\infty} k P_{\text{out}}(k) \approx \frac{1}{\tau} $$

And the expected number of stars for $N$ steps is approximately $N/\tau$. Understandably, the longer we wait, the easier it is for the walker to escape smaller stars.

One way to study the structure properties of the graph is to study its spectrum. To find how the spectrum evolves we compute the characteristic polynomial $\chi_n(x)$ of the adjacency matrix. For example, a single star-graph is represented by the adjacency matrix

$$ A_n = \begin{bmatrix} 0 & 1 & \dots & 1 \\ 1 & 0 & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 0 & \dots & 0 \end{bmatrix}. $$

The characteristic polynomial is then $\chi_n(x) = \det(A_n - xI_n) = -x^{n-2}(x^2 - n)$. Hence, the eigenvalues are 0 with multiplicity $n-2$ and $\pm\sqrt{n}$. This in turn implies that there are two eigenstates that evolve with frequency $\sqrt{n}$ in opposite directions and several other “frozen” walker states on the outer edge of the star.

For $k$ stars, let $n_i$ be the number of nodes on the $i^{th}$ star, then:

$$ \chi_{n_1, \dots, n_k}(x) = -n_k x^{n_k-1} \chi_{n_1, \dots, n_{k-1}-1}(x) + x^{n_k} \chi_{n_1, \dots, n_{k-1}}(x) $$
<figure><img src="image_3.png" /><figcaption>Figure 2: Generic random graphs for $n = 100$ steps - one walker model for $\tau = 0.001, 0.01, 0.05, 0.1, 0.5, 10$. Notice how for longer average collapse times, the walker has more time to explore the graph, which leads to more complex trees.</figcaption></figure>

To first approximation, a star graph will cease growing as soon as the walker collapses to an outer node. So we can compute the average star size by

$$ \mathbb{E}[n] \tau \approx \sum_{k=1}^{\infty} k P_{\text{out}}(k) \approx \frac{1}{\tau} $$

And the expected number of stars for $N$ steps is approximately $N/\tau$. Understandably, the longer we wait, the easier it is for the walker to escape smaller stars.

One way to study the structure properties of the graph is to study its spectrum. To find how the spectrum evolves we compute the characteristic polynomial $\chi_n(x)$ of the adjacency matrix. For example, a single star-graph is represented by the adjacency matrix

$$ A_n = \begin{bmatrix} 0 & 1 & \dots & 1 \\ 1 & 0 & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 0 & \dots & 0 \end{bmatrix}. $$

The characteristic polynomial is then $\chi_n(x) = \det(A_n - xI_n) = -x^{n-2}(x^2 - n)$. Hence, the eigenvalues are 0 with multiplicity $n-2$ and $\pm\sqrt{n}$. This in turn implies that there are two eigenstates that evolve with frequency $\sqrt{n}$ in opposite directions and several other “frozen” walker states on the outer edge of the star.

For $k$ stars, let $n_i$ be the number of nodes on the $i^{th}$ star, then:

$$ \chi_{n_1, \dots, n_k}(x) = -n_k x^{n_k-1} \chi_{n_1, \dots, n_{k-1}-1}(x) + x^{n_k} \chi_{n_1, \dots, n_{k-1}}(x) $$
We finally get the spectrum by finding the roots of these polynomials and we get the same evolution as we can see in Fig.3.

<figure><img src="image_3.png" /><figcaption>Figure 3: Top: A random graph that evolved into three connected star graphs. We expect therefore three nonzero eigenvalues (modulo sign) representing the oscillation frequency of walkers that begin at the center of the stars. Bottom: Evolution of the eigenvalues. As soon as a new star graph begins being populated by new nodes, the corresponding new frequencies also increase. At the same time, the growth of the previous eigenvalues stops. (Blue: first eigenvalue, orange: second eigenvalue, green: third eigenvalue.)</figcaption></figure>

## 2.2 Multiple walkers model: random graphs

In order to build structures with a non-zero cluster coefficient, we can use two or more walkers. In this model we have two independent walkers that collapse at the same time. We attach a new node to both the nodes where the walkers collapsed. This allows closed loops to form, thus with non-vanishing cluster as we can see in Fig.4. If the walkers happen to collapse to the same node, the new node will have a single edge.

# 3 Qualitative analysis

We first look at the degree distribution. For each degree $k$ we compute the fraction $d(k)$ of nodes on the graph that has $k$ connections. By studying the degree distribution, we can get an indication of whether our models generate scale-free networks i.e. whose degree distribution follows a power-law $d(k) = k^{-\alpha}$. We compute the average degree distribution for the first model, with 1000 and 100 nodes. We find that the degree distribution seems to converge, for large $\tau$, to a power law, as shown in Fig. 5.

Next we turn to the diameter of the graphs. To compute the diameter of a graph we compute the maximum value of the shortest path between every pair of edges. As we can see in Fig. 6, the diameter dependence on time depend on the number of walkers and is maximal for $0.1 < \tau < 1$.

We observe an interesting phenomenon when we compute the fraction of nodes that live on the edge of the graphs. We define this as the “leaf fraction”, i.e. the fraction of nodes with only one neighbor. As
We finally get the spectrum by finding the roots of these polynomials and we get the same evolution as we can see in Fig.3.

<figure><img src="image_4.png" /><figcaption>Figure 3: Top: A random graph that evolved into three connected star graphs. We expect therefore three nonzero eigenvalues (modulo sign) representing the oscillation frequency of walkers that begin at the center of the stars. Bottom: Evolution of the eigenvalues. As soon as a new star graph begins being populated by new nodes, the corresponding new frequencies also increase. At the same time, the growth of the previous eigenvalues stops. (Blue: first eigenvalue, orange: second eigenvalue, green: third eigenvalue.)</figcaption></figure>

## 2.2 Multiple walkers model: random graphs

In order to build structures with a non-zero cluster coefficient, we can use two or more walkers. In this model we have two independent walkers that collapse at the same time. We attach a new node to both the nodes where the walkers collapsed. This allows closed loops to form, thus with non-vanishing cluster as we can see in Fig.4. If the walkers happen to collapse to the same node, the new node will have a single edge.

## 3 Qualitative analysis

We first look at the degree distribution. For each degree $k$ we compute the fraction $d(k)$ of nodes on the graph that has $k$ connections. By studying the degree distribution, we can get an indication of whether our models generate scale-free networks i.e. whose degree distribution follows a power-law $d(k) = k^{-\alpha}$. We compute the average degree distribution for the first model, with 1000 and 100 nodes. We find that the degree distribution seems to converge, for large $\tau$, to a power law, as shown in Fig. 5.

Next we turn to the diameter of the graphs. To compute the diameter of a graph we compute the maximum value of the shortest path between every pair of edges. As we can see in Fig. 6, the diameter dependence on time depend on the number of walkers and is maximal for $0.1 < \tau < 1$.

We observe an interesting phenomenon when we compute the fraction of nodes that live on the edge of the graphs. We define this as the “leaf fraction”, i.e. the fraction of nodes with only one neighbor. As
<figure><img src="image_4.png" /><figcaption>Figure 4: Generic random graphs for $n = 100$ steps - two walker model for $\tau = 0.001, 0.01, 0.05, 0.1, 0.5, 10$. As in the single-walker case, longer exploration times lead to more connected random graphs.</figcaption></figure>

can be seen in Fig. 7, the leaf fraction decreases with $\tau$ until it becomes stable from around $\tau \approx 1$. This effect seems to be independent of the size of the graphs, and we conjecture that it is a universal property of this model.

Finally, we compute the average clustering coefficient. The local clustering coefficient of a node is a measure of how much its neighbors are linked to each other. It is a coefficient introduced by Watts and Strogatz in [22] to find whether a graph exhibits the small-world property.

To define the clustering coefficient, we need to define what is the neighborhood of a node in a graph. The neighborhood $N_i$ of a node $i$ is defined as the set of all its neighbors. Let $G = (V, E)$ be a graph of $n$ nodes with $V = [1, n]$ and $E$ the set of couples $(i, j)$ if there's a link between the nodes $i$ and $j$. Then we define the local clustering coefficient of the node $i$ which has $n_i$ neighbors as $C_i = \frac{2|\{(j,k) \mid j,k \in N_i, (j,k) \in E\}|}{n_i(n_i-1)}$ for an undirected graph. Finally, we obtain the graph's average clustering coefficient: $C = \frac{1}{n}\sum_{i=1}^{n} C_i$. We can notice that the clustering coefficient decreases rapidly for large $\tau$ and seems to be independent on the number of walkers, with the only exception of the single-walker model.

# 4 Discussion

We have presented two new models for growing random graphs, that are driven by the continuous evolution of quantum walkers and by spontaneous collapses of their wave function. We have numerical evidence that the random graphs that result from these models display a power-law degree of distribution, which indicates a scale-free structure.

We also have found two interesting phenomena in the average graph diameter and in the fraction of
<figure><img src="image_5.png" /><figcaption>Figure 4: Generic random graphs for $n = 100$ steps - two walker model for $\tau = 0.001, 0.01, 0.05, 0.1, 0.5, 10$. As in the single-walker case, longer exploration times lead to more connected random graphs.</figcaption></figure>

can be seen in Fig. 7, the leaf fraction decreases with $\tau$ until it becomes stable from around $\tau \approx 1$. This effect seems to be independent of the size of the graphs, and we conjecture that it is a universal property of this model.

Finally, we compute the average clustering coefficient. The local clustering coefficient of a node is a measure of how much its neighbors are linked to each other. It is a coefficient introduced by Watts and Strogatz in [22] to find whether a graph exhibits the small-world property.

To define the clustering coefficient, we need to define what is the neighborhood of a node in a graph. The neighborhood $N_i$ of a node $i$ is defined as the set of all its neighbors. Let $G = (V, E)$ be a graph of $n$ nodes with $V = [1, n]$ and $E$ the set of couples $(i, j)$ if there's a link between the nodes $i$ and $j$. Then we define the local clustering coefficient of the node $i$ which has $n_i$ neighbors as $C_i = \frac{2|\{(j,k) \mid j,k \in N_i, (j,k) \in E\}|}{n_i(n_i-1)}$ for an undirected graph. Finally, we obtain the graph's average clustering coefficient: $C = \frac{1}{n}\sum_{i=1}^{n} C_i$. We can notice that the clustering coefficient decreases rapidly for large $\tau$ and seems to be independent on the number of walkers, with the only exception of the single-walker model.

# 4 Discussion

We have presented two new models for growing random graphs, that are driven by the continuous evolution of quantum walkers and by spontaneous collapses of their wave function. We have numerical evidence that the random graphs that result from these models display a power-law degree of distribution, which indicates a scale-free structure.

We also have found two interesting phenomena in the average graph diameter and in the fraction of
<figure><img src="image_5.png" /><figcaption>Figure 5: Degree distribution for random graphs of $n = 500$ nodes. As the value of the exploration parameter increases, the random graphs seem to reach a scale-free structure for large $\tau$.</figcaption></figure>

nodes that live on the edge. An average collapse time of $\tau \approx 1$ seems to play a special role, while for $\tau \gg 1$ it seems to lead the measures to relax to an asymptotic value. In particular, the leaf fraction is a quantity that seems to give us information about the bulk of a graph from its surface, which is reminiscent of the holographic principle. We suspect that around $\tau \approx 1$ there could occur a first order phase transition, as Fig. 6 seems to suggest.
<figure><img src="image_6.png" /><figcaption>Figure 5: Degree distribution for random graphs of $n = 500$ nodes. As the value of the exploration parameter increases, the random graphs seem to reach a scale-free structure for large $\tau$.</figcaption></figure>

nodes that live on the edge. An average collapse time of $\tau \approx 1$ seems to play a special role, while for $\tau \gg 1$ it seems to lead the measures to relax to an asymptotic value. In particular, the leaf fraction is a quantity that seems to give us information about the bulk of a graph from its surface, which is reminiscent of the holographic principle. We suspect that around $\tau \approx 1$ there could occur a first order phase transition, as Fig. 6 seems to suggest.
<figure><img src="image_6.png" /><figcaption>Figure 6: Diameter of the graph for the single-walker model for 100 and 1000 nodes.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Figure 7: Number of nodes on the edge of the star for the Single-walker model. As the leaf fraction has the same dependence on $\tau$ for various graph sizes, it is very likely that it constitutes an invariant property. There also seems to be a phase transition between two different regimes.</figcaption></figure>

We note that as the wave function of the quantum walker can interfere with itself, the continuous-time quantum walk does not tend to a limiting distribution (which instead is characteristic of classical random walks). This might result in fundamental differences between classical and quantum models that are not possible to reconcile. Moreover, we note that as the off-diagonal elements of the adjacency matrix are never negative, the Hamiltonian that it represents is “stoquastic” [7] and therefore the evolution of the walker should not be exponentially hard to compute. Because of this, it could be that even if these growth models were not reproducible by classical random walk models, they could be reside in an efficient class of computational complexity.

Among the directions of future work one could introduce an additional degree of freedom in terms of a quantum coin, similarly to what is done in discrete-time quantum walks. Another possible perspective is to explore the possibility to perform quantum search algorithms over growing random graphs, for example by combining multiple walkers where e.g. two of them are in charge of growing the graph and a third performs the search while preserving its unitarity. Our hope is that this will produce “optimized” random graphs for the objective that the walker is searching for.
<figure><img src="image_7.png" /><figcaption>Figure 6: Diameter of the graph for the single-walker model for 100 and 1000 nodes.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Figure 7: Number of nodes on the edge of the star for the Single-walker model. As the leaf fraction has the same dependence on $\tau$ for various graph sizes, it is very likely that it constitutes an invariant property. There also seems to be a phase transition between two different regimes.</figcaption></figure>

We note that as the wave function of the quantum walker can interfere with itself, the continuous-time quantum walk does not tend to a limiting distribution (which instead is characteristic of classical random walks). This might result in fundamental differences between classical and quantum models that are not possible to reconcile. Moreover, we note that as the off-diagonal elements of the adjacency matrix are never negative, the Hamiltonian that it represents is “stoquastic” [7] and therefore the evolution of the walker should not be exponentially hard to compute. Because of this, it could be that even if these growth models were not reproducible by classical random walk models, they could be reside in an efficient class of computational complexity.

Among the directions of future work one could introduce an additional degree of freedom in terms of a quantum coin, similarly to what is done in discrete-time quantum walks. Another possible perspective is to explore the possibility to perform quantum search algorithms over growing random graphs, for example by combining multiple walkers where e.g. two of them are in charge of growing the graph and a third performs the search while preserving its unitarity. Our hope is that this will produce “optimized” random graphs for the objective that the walker is searching for.
<figure><img src="image_8.png" /><figcaption>Figure 8: Clustering coefficient of one-, two- and three-walkers respectively. The one-walker model can only produce random trees and therefore the clustering coefficient is always zero.</figcaption></figure>

References

[1] Dorit Aharonov, Andris Ambainis, Julia Kempe & Umesh Vazirani (2001): *Quantum walks on graphs*. In: *Proceedings of the thirty-third annual ACM symposium on Theory of computing*, pp. 50–59. Available at https://doi.org/10.1145/380752.380758.

[2] Andris Ambainis (2007): *Quantum walk algorithm for element distinctness*. *SIAM Journal on Computing* 37(1), pp. 210–239. Available at https://doi.org/10.1137/S0097539705447311.

[3] Quentin Aristote, Nathanaël Eon & Giuseppe Di Molfetta (2020): *Dynamical Triangulation Induced by Quantum Walk*. *Symmetry* 12(1), p. 128. Available at https://doi.org/10.3390/sym12010128.

[4] Pablo Arrighi, Giuseppe Di Molfetta, Iván Márquez-Martín & Armando Pérez (2019): *From curved spacetime to spacetime-dependent local unitaries over the honeycomb and triangular Quantum Walks*. *Scientific reports* 9(1), pp. 1–10. Available at https://doi.org/10.1038/s41598-019-47535-4.

[5] A.-L. Barabsi & R. Albert (1999): *Emergence of scaling in random networks*. *Science* 286, pp. 509–512, doi:10.1126/science.286.5439.509.

[6] Scott D Berry & Jingbo B Wang (2011): *Two-particle quantum walks: Entanglement and graph isomorphism testing*. *Physical Review A* 83(4), p. 042317. Available at https://doi.org/10.1103/PhysRevA.83.042317.

[7] Sergey Bravyi & Barbara Terhal (2010): *Complexity of stochastic frustration-free Hamiltonians*. *Siam journal on computing* 39(4), pp. 1462–1485. Available at https://doi.org/10.1137/08072689X.

[8] Andrew M Childs & Jeffrey Goldstone (2004): *Spatial search by quantum walk*. *Physical Review A* 70(2), p. 022314. Available at https://doi.org/10.1103/PhysRevA.70.022314.

[9] Giuseppe Di Molfetta & Pablo Arrighi (2020): *A quantum walk with both a continuous-time limit and a continuous-spacetime limit*. *Quantum Information Processing* 19(2), p. 47. Available at https://doi.org/10.1007/s11128-019-2549-2.

[10] Paul Erdős & Alfréd Rényi (1960): *On the evolution of random graphs*. Publ. Math. Inst. Hung. Acad. Sci 5(1), pp. 17–60.

[11] Gian Carlo Ghirardi, Alberto Rimini & Tullio Weber (1986): *Unified dynamics for microscopic and macroscopic systems*. *Physical review D* 34(2), p. 470. Available at https://doi.org/10.1103/PhysRevD.34.470.
<figure><img src="image_9.png" /><figcaption>Figure 8: Clustering coefficient of one-, two- and three-walkers respectively. The one-walker model can only produce random trees and therefore the clustering coefficient is always zero.</figcaption></figure>

References

[1] Dorit Aharonov, Andris Ambainis, Julia Kempe & Umesh Vazirani (2001): *Quantum walks on graphs*. In: *Proceedings of the thirty-third annual ACM symposium on Theory of computing*, pp. 50–59. Available at https://doi.org/10.1145/380752.380758.

[2] Andris Ambainis (2007): *Quantum walk algorithm for element distinctness*. *SIAM Journal on Computing* 37(1), pp. 210–239. Available at https://doi.org/10.1137/S0097539705447311.

[3] Quentin Aristote, Nathanaël Eon & Giuseppe Di Molfetta (2020): *Dynamical Triangulation Induced by Quantum Walk*. *Symmetry* 12(1), p. 128. Available at https://doi.org/10.3390/sym12010128.

[4] Pablo Arrighi, Giuseppe Di Molfetta, Iván Márquez-Martín & Armando Pérez (2019): *From curved spacetime to spacetime-dependent local unitaries over the honeycomb and triangular Quantum Walks*. *Scientific reports* 9(1), pp. 1–10. Available at https://doi.org/10.1038/s41598-019-47535-4.

[5] A.-L. Barabsi & R. Albert (1999): *Emergence of scaling in random networks*. *Science* 286, pp. 509–512, doi:10.1126/science.286.5439.509.

[6] Scott D Berry & Jingbo B Wang (2011): *Two-particle quantum walks: Entanglement and graph isomorphism testing*. *Physical Review A* 83(4), p. 042317. Available at https://doi.org/10.1103/PhysRevA.83.042317.

[7] Sergey Bravyi & Barbara Terhal (2010): *Complexity of stochastic frustration-free Hamiltonians*. *Siam journal on computing* 39(4), pp. 1462–1485. Available at https://doi.org/10.1137/08072689X.

[8] Andrew M Childs & Jeffrey Goldstone (2004): *Spatial search by quantum walk*. *Physical Review A* 70(2), p. 022314. Available at https://doi.org/10.1103/PhysRevA.70.022314.

[9] Giuseppe Di Molfetta & Pablo Arrighi (2020): *A quantum walk with both a continuous-time limit and a continuous-spacetime limit*. *Quantum Information Processing* 19(2), p. 47. Available at https://doi.org/10.1007/s11128-019-2549-2.

[10] Paul Erdős & Alfréd Rényi (1960): *On the evolution of random graphs*. Publ. Math. Inst. Hung. Acad. Sci 5(1), pp. 17–60.

[11] Gian Carlo Ghirardi, Alberto Rimini & Tullio Weber (1986): *Unified dynamics for microscopic and macroscopic systems*. *Physical review D* 34(2), p. 470. Available at https://doi.org/10.1103/PhysRevD.34.470.
[12] Andrei N Kolmogorov (1998): *On tables of random numbers*. Theoretical Computer Science 207(2), pp. 387-395, doi:10.1016/S0304-3975(98)00075-9. Available at https://www.jstor.org/stable/25049284.

[13] Nicholas Metropolis & Stanislaw Ulam (1949): *The monte carlo method*. Journal of the American statistical association 44(247), pp. 335-341, doi:10.1080/01621459.1949.10483310.

[14] Filippo M. Miatto (2020): *quantumgraphs*. https://github.com/ziofil/QuantumGraphs.

[15] Claude E Shannon (1949): *Communication theory of secrecy systems*. Bell system technical journal 28(4), pp. 656-715. Available at https://doi.org/10.1002/j.1538-7305.1949.tb00928.x.

[16] Cornelis J Stam & Jaap C Reijneveld (2007): *Graph theoretical analysis of complex networks in the brain*. Nonlinear biomedical physics 1(1), p. 3. Available at https://doi.org/10.1186/1753-4631-1-3.

[17] Steven H Strogatz (2001): *Exploring complex networks*. nature 410(6825), pp. 268-276. Available at https://doi.org/10.1038/35065725.

[18] Michele Tumminello, Fabrizio Lillo, Jyrki Piilo & Rosario N Mantegna (2012): *Identification of clusters of investors from their real trading activity in a financial market*. New Journal of Physics 14(1), p. 013041. Available at https://doi.org/10.1088/1367-2630/14/1/013041.

[19] Alexei Vázquez, Alessandro Flammini, Amos Maritan & Alessandro Vespignani (2003): *Modeling of protein interaction networks*. Complexus 1(1), pp. 38-44. Available at https://doi.org/10.1159/000067642.

[20] Chrysoula Vlachou, J Rodrigues, Paulo Mateus, N Paunković & André Souto (2015): *Quantum walk public-key cryptographic system*. International Journal of Quantum Information 13(07), p. 1550050. Available at https://doi.org/10.1142/S0219749915500501.

[21] Xiao Fan Wang & Guanrong Chen (2003): *Complex networks: small-world, scale-free and beyond*. IEEE circuits and systems magazine 3(1), pp. 6-20. Available at https://doi.org/10.1109/MCAS.2003.1228503.

[22] Duncan J. Watts & Steven H. Strogatz (1998): *Collective dynamics of small-world networks*. Nature 393, p. 440442. Available at https://doi.org/10.1038/30918.
[12] Andrei N Kolmogorov (1998): *On tables of random numbers*. Theoretical Computer Science 207(2), pp. 387-395, doi:10.1016/S0304-3975(98)00075-9. Available at https://www.jstor.org/stable/25049284.

[13] Nicholas Metropolis & Stanislaw Ulam (1949): *The monte carlo method*. Journal of the American statistical association 44(247), pp. 335-341, doi:10.1080/01621459.1949.10483310.

[14] Filippo M. Miatto (2020): *quantumgraphs*. https://github.com/ziofil/QuantumGraphs.

[15] Claude E Shannon (1949): *Communication theory of secrecy systems*. Bell system technical journal 28(4), pp. 656-715. Available at https://doi.org/10.1002/j.1538-7305.1949.tb00928.x.

[16] Cornelis J Stam & Jaap C Reijneveld (2007): *Graph theoretical analysis of complex networks in the brain*. Nonlinear biomedical physics 1(1), p. 3. Available at https://doi.org/10.1186/1753-4631-1-3.

[17] Steven H Strogatz (2001): *Exploring complex networks*. nature 410(6825), pp. 268-276. Available at https://doi.org/10.1038/35065725.

[18] Michele Tumminello, Fabrizio Lillo, Jyrki Piilo & Rosario N Mantegna (2012): *Identification of clusters of investors from their real trading activity in a financial market*. New Journal of Physics 14(1), p. 013041. Available at https://doi.org/10.1088/1367-2630/14/1/013041.

[19] Alexei Vázquez, Alessandro Flammini, Amos Maritan & Alessandro Vespignani (2003): *Modeling of protein interaction networks*. Complexus 1(1), pp. 38-44. Available at https://doi.org/10.1159/000067642.

[20] Chrysoula Vlachou, J Rodrigues, Paulo Mateus, N Paunković & André Souto (2015): *Quantum walk public-key cryptographic system*. International Journal of Quantum Information 13(07), p. 1550050. Available at https://doi.org/10.1142/S0219749915500501.

[21] Xiao Fan Wang & Guanrong Chen (2003): *Complex networks: small-world, scale-free and beyond*. IEEE circuits and systems magazine 3(1), pp. 6-20. Available at https://doi.org/10.1109/MCAS.2003.1228503.

[22] Duncan J. Watts & Steven H. Strogatz (1998): *Collective dynamics of small-world networks*. Nature 393, p. 440442. Available at https://doi.org/10.1038/30918.