{'fraction_non_alphanumeric': 0.04048355806384377, 'fraction_numerical': 0.009571756104599894, 'mean_word_length': 3.985332907041803, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Shortcuts to quantum network routing

A quantum network promises to enable long distance quantum communication, and assemble small quantum devices into a large quantum computing cluster. Each network node can thereby be seen as a small few qubit quantum computer. Qubits can be sent over direct physical links connecting nearby quantum nodes, or by means of teleportation over pre-established entanglement amongst distant network nodes. Such pre-shared entanglement effectively forms a shortcut - a virtual quantum link - which can be used exactly once. Here, we present an abstraction of a quantum network that allows ideas from computer science to be applied to the problem of routing qubits, and manage entanglement in the network. Specifically, we consider a scenario in which each quantum network node can create EPR pairs with its immediate neighbours over a physical connection, and perform entanglement swapping operations in order to create long distance virtual quantum links. We proceed to discuss the features unique to quantum networks, which call for the development of new routing techniques. As an example, we present two simple hierarchical routing schemes for a quantum network of N nodes for a ring and sphere topology. For these topologies we present efficient routing algorithms requiring O(log N) qubits to be stored at each network node, O(polylog N) time and space to perform routing decisions, and O(log N) timesteps to replenish the virtual quantum links in a model of entanglement generation.


II
: Quantum network. The goal of a quantum network is to send qubits from one node to another, or equivalently, to establish entanglement between them. Each node in a quantum network is a small quantum computer that can store and operate on few qubits. Network nodes can be connected by standard classical communication channels, as well as quantum ones. In addition, entanglement can be established between nodes and be used to send qubits using quantum teleportation. Entanglement thus forms a virtual quantum link which can however only be used once.  [16], [11]). In the beginning, Alice and Bob share an entangled link, and Bob and Charlie share an entanglement -virtual quantum link (VQL). Each end of the entangled links requires 1 qubit of quantum memory (1a,1b,2a,2b). Bob subsequently performs a procedure known as entanglement swapping [17]: he teleports [13] qubit (1b) to Charlie using the entangled link (2a,2b). This requires classical communication from Bob to Charlie, and the entangled link (2a,2b) is consumed by this process. Then, Charlie performs a final correction operation. The final state is a VQL between Alice and Charlie (qubits (1a,1b)). The use of teleportation in this way is also known as entanglement swapping. Note that the number of operations to create a VQL between two distant nodes is thus equal to the path length. In practice, all operations are subject to noise, meaning that the final entanglement is generally not perfect. One way to overcome this challenge is by first producing multiple entangled links, and then applying a procedure known as entanglement distillation [18]. Since here we take a rather abstract view of counting required resources, we merely note that this means that long distance VQL carry a higher cost to be established than shorter ones. In this first simple stage, we will take all VQLs to have equal cost, but more realistic protocols will need to take such costs into consideration.
VQLs are rather unusual from a classical perspective in that they can be used only once, and require one qubit of quantum memory at each end point to be maintained. As explained in Fig. 2, long distance VQLs are more time consuming to create [15] and thus carry a higher cost when used. In this first stage of studying quantum networks, we will however assume that all costs are equal. While the requirements of a VQL for one qubit of memory at each node appears benign from a classical perspective, it is rather significant in a quantum network. First of all, due to current technological limitations each network node can store only very few qubits. What's more, however, such quantum storage is typically rather noisy, meaning that each qubit has a limited lifetime. The latter can in theory be overcome by performing error-correction at each network node at the expense of using additional qubits. Therefore, we will take the simplifying perspective that while each network node may only store very few qubits, they have an arbitrarily long lifetime. Such an abstraction is useful to devise new protocols (see also Fig. 3), while of course not being a realistic assumption for the forseeable future. A more realistic model would thus be to expire VQLs after a certain period of time. In that case the latency of the classical communication channels becomes crucial. If the classical communication required by routing or indeed any protocol takes too much time, then the VQL is already gone. This concern is less relevant for routing quantum information between on-chip quantum processors, but plays an important role in long-distance quantum networks.
Let us briefly summarize the network model we consider, before discussing how such a model enables classical  3: In a quantum network, the underlying physical layer, followed by (iterations of) error-correction and entanglement swapping and distribution can be used to create virtual quantum links (VQL). We here adopt such a perspective of virtualization, both to allow techniques from classical network routing to be applied, as well as to focus on protocols that use simple(r) quantum operations. This modifies previous models that mirror the OSI model for classical networks, whose lower layers can be understood as a procedure to generate VQLs [20].
networking concepts to be applied to the study of quantum ones. Fig. 4 provides a succinct overview of the relevant parameters.
• Every node in the quantum network can store Q qubits and perform the operations given below. We remark that as in classical networks, quantum network nodes can of course be more diverse. One could, for example, consider a situation in which the end-points are very simple nodes with no storage capabilities, whereas the network has more powerful routers that can store and operate on many of them. It is also possible to consider nodes that can just perform entanglement swapping operations (see Fig. 2), but have no storage 1 . For simplicity, we will here assume all nodes are equivalent. • Every node can establish entanglement with neighboring nodes to which it is directly connected by a quantum communication channel such as optical fiber. There are many quantum protocols for generating entanglement, and we will take such a protocol as a given. • Every node can perform quantum teleportation (i.e., a Bell measurement). In particular, this means that each node can act as a repeater in Fig. 2 to establish VQLs in the network. Being able to perform teleportation is also sufficient to use a VQL to later transmit qubits. Note that these are operations which are much simpler than full quantum computation. • Every VQL has a cost, modeling the time it takes to establish this VQL, and lifetime. As outlined above, we will here work in a simplfied model in which all costs are one, and idealized error-correction allows an arbitrary lifetime. • Both the entanglement generation and swapping operation take one time unit. At each time step, a network node can either make entanglement with one of its neighbours or perform a swap. We remark that different experimental proposals for quantum repeaters lead to different timings and that the time for entanglement generation generally depends also on the physical distance between the nodes as well as how noisy the operations are. A procedure known as entanglement distillation can, for example, be used to reduce noise but requires several imperfect entangled links to be generated first which makes it time-consuming (and difficult). • All network nodes can communicate classically within one time unit. Since we work in a simplified model where error-correction is performed to extend the lifetime of qubits, we will ignore the latency of classical communication. However, our protocols are designed with an eye towards lifting this requirement as we will explain below. Evidently, such an abstraction hides much of the complexity of realizing quantum networks. However, just as layers of abstractions used in classical networking [19], it allows us to break the problem down into simpler components -layers -which simplifies further study. On the one hand, it allows us to apply ideas and concepts from classical computer science to the problem of routing qubits in a quantum network. Specifically, our model of abstraction leads to a layer in a "quantum OSI-model" (Fig. 3), that allows an embedding in classical techniques. The properties of our model are summarized in Fig. 4. On the other hand, it also motivates routing protocols which are based on only very simple components: namely means to generate (and maintain) entangled links and perform swapping operations. This is in contrast to works which study maximizing flows over quantum channels which generally require complex quantum computing operations on potentially very many qubits (see related work below).
Given the abstraction proposed here, routing in a quantum network can be understood as routing on VQLs that can be assigned deliberately and dynamically, carry a certain cost, can only be used once, and which may expire after a given time. We remark that communication in a quantum network can in principle be understood entirely as transformations performed on the graph of VQLs: Given existing VQLs, to send a qubit from two nodes A and B we consume VQLs to create a new entangled link -a new VQL -directly between A and B, followed by teleportation of the qubit over said VQL. That is, we have transformed the network topology given by a set of VQLs into a new one in which A and B are connected. Such transformations can be very useful even if the VQLs are themselves noisy, leading to rather beautiful transformations on the VQL network topology [21]. As we will discuss in Section VI at the end, using multi-partite entanglement, a quantum network can also exhibit a more involved form of VQLs as hyper-edges where more than two nodes hold part of the entanglement. The problem of routing in a quantum network using VQLs is thus equivalent to managing entanglement in the network.

B. Requirements and routing protocols
Having established a suitable model, we are motivated to consider how to best assign VQLs in order to route quantum information, or equivalently manage entanglement, as effectively as possible. That is, we are now facing a rather classical problem of resource allocation and management. In this first work, we will adopt the above model where additional simplifications, such as taking all VQLs to have arbitrary lifetime and ignoring the latency of classical communication enables us to prove analytical results. However, we will design our protocol to have specific features that will likely lead to a good performance even if we were to relax such additional simplifications.
The design of good routing protocols can exploit several features: First, we can of course decide ourselves what the topology of the network of VQLs should look like. Since VQLs can in principle be established between any pair of nodes, a naive approach would be to establish a fully connected graph of VQLs. Recall, however, that each VQL needs one qubit of quantum memory at each end point, and hence this naive approach would require Ω(N ) qubits of memory per node for a network of N nodes. On the other hand, one might also consider establishing VQLs on the fly whenever it is clear that we would like to form a long distance entangled link between two nodes. While this may be feasible in the regime of entirely parallel, and perfect, quantum operations creating entanglement ahead of time has significant advantages: first of all, we can create highquality (low noise) VQLs by performing entanglement distillation which is too time consuming to perform on the fly. Similarly, we will need a large number of swapping operations on the entanglement thus created, while our objective here is to minimize the final number of -in practise very noisy -swapping operations. Finally, however, distinguishing between a background process that creates, manages and maintains entangled links -and the actual transmission of quantum information, allows many parties in the network to communicate simultaneously on the already pre-shared entanglement.
Our goal will thus be to minimize the number of memory qubits needed at each node, while, at the same time, have the path of VQLs between pairs of nodes to be short. This means that the number entanglement swapping operations (equal to the path length, see Fig. 2) to form the final VQL for transmission between A and B should be small. While this may be less important in the regime of perfect operations in the abstract model of Fig. 3, it is clear that it becomes highly relevant if such operations are noisy. Hence, we will pay special attention to this here.
The question of routing is then how we can efficiently find a path between a sender A and receiver B. To minimize local latency we desire to reduce the computation time and classical memory needed at each node for storing and processing routing information. More significantly, however, we desire a decentralized routing algorithm in which each node can make a routing decision without having to communicate with all other nodes or storing the complete topology of the network. While of lesser importance in our abstract model, this will become relevant when counting the time needed for classical communication: the longer the classical communication takes, the longer the lifetime of the qubit in the node's quantum memory needs to be.
Here, we exhibit routing algorithms that fulfil these goals for simple network structures, namely the ring and the sphere. The first is motivated by a ring topology in a metropolitan area, whereas the latter is inspired by considering satellites around Earth. Note that both topologies only use short physical links, as is necessary. We remark, nevertheless, that the essential ideas present in our approach for the ring and the sphere, could also be carried over to other structures such as a grid as we will discuss in Section VI. Specifically, we present the following results, summarized in Table I

Size
The number of nodes in the network.

Size of quantum memory
The number of qubits that each network node can store simultaneously.

Lifetime of qubits
The units of time that a qubit can be kept in storage.

Time to establish entanglement
The units of time that it takes to establish the relevant type of entanglement between network nodes that are directly connected by a physical quantum communication link such as fiber (typically, bipartite EPR pairs corresponding to VQLs between physically adjacent network nodes).

Type of entanglement
Generally, bipartite EPR pairs corresponding to immediate VQLs. Quantum information allows more complicated entangled states which can later be converted into VQLs using measurements (see Discussion), yet these are very difficult to create in practice.

Time for swapping operation
Time that it takes a network node to perform an entanglement swapping operation (see Figure 2).

Time for measurement
Time to perform a measurement at each node. Often the same as the time needed to swap entanglement. Only relevant when considering more general forms of entanglement which require measurements to be converted to VQLs.

Parallelism of operations at node
Determines whether the node can simultaneously create entanglement with more than one other network node connected by physical quantum communication channels. In many systems, such as NV centers in diamond [22] only one VQL can be created by one node at the same time meaning such operations are sequential.

Topology of the physical communication links
Determines how the quantum nodes are connected by direct physical quantum communication channels over which they can easily communicate.

Classical communication delays
Determines the time needed to send classical control information from node i to another node j over standard classical communication networks. The time for quantum communication over physical links is -along with other delays -absorbed into the time to establish entanglement.

Size of classical memory
The number of classical bits the nodes have to store about the network. We enforce that the nodes only have a local view of the network and not the entire network topology.   between all nodes in the network, and our contributions for the ring the sphere networks. The structure of the network in our contribution allows for decreasing the diameter (maximum path length between any two nodes) and keeping the quantum memory size feasible. We route using a decentralised routing algorithms with a hierarchical labelling scheme (similar to Internet Protocol [23]) that saves only possible shortest paths in a logarithmic size collection. Redistributing entanglement is also simplified by VQLs that can be rebuilt concurrently (see Fig. 4 for a more general model).
information for routing, since each node only stores information about neighbouring nodes, hence having to store very little information about the graph as a whole. Contrasting with, for example, Dijkstra's algorithm, where nodes have to store information about the entire graph layout. Our routing algorithm can be understood as a hierarchical routing scheme tailored to the specific demands above. As we will discuss below, our assignment of VQLs and routing algorithm still works even if part of the network is missing, i.e., the nodes are not equally distributed, but denser in certain areas than in others. • We perform an initial simulation to study how our network of VQLs and routing procedure performs under load, that is, if many network nodes attempt to communicate simultaneously. We see that our routing algorithm is not optimized for multiple routing requests. We provide a discussion and ideas how to overcome this issue in Section V.

C. Related Work
Routing messages to the right destination in a network has seen enormous attention in the classical literature, and the term routing is also used for a number of different concepts in quantum networks. While we are not aware of any work taking the perspective employed above, we briefly elucidate 2 the relation of our work to the classical and quantum literature. It is highly likely that concepts from both domains will form an important ingredient in designing quantum networks as we will discuss further in Section VI.
1) Related work in quantum information: Let us first consider routing in quantum networks. The first is at the so-called physical layer (Fig. 3) in which a physical information carrier such as a photon is directed to the correct network node. This forms an essential ingredient in establishing entanglement between network nodes, which has seen a number of experimental implementations (see e.g. [24], [25]). In contrast, we here are concerned with a much higher level protocol in which a means to generate entanglement is a given, and which is independent of the exact physical implementation of the qubits.
Another line of quantum research considers quantum network coding (see e.g. [26], [27], [28], [29], [30]). We remark that in this context, the term routing is in the quantum literature sometimes taken synonymous to network coding [30]. As in classical networks, network coding can outperform routing when trying to maximize the flow of information through a quantum network -albeit at the expense of requiring much more complex quantum operations. On the one hand, work in this area has an information-theoretic flavor in which limits to network flows are derived in terms of quantum capacities [31], [32], [33], [30]. These works are of great appeal to establish the ultimate limits of transmitting quantum information. We remark that of course achieving the capacities does in general require a full blown quantum computer, and indeed it is known that even arbitrarily large block sizes (and hence quantum computers and memories) are required to achieve some capacities of quantum channels [34]. We remark that in turn we here precisely focus on building protocols on top of very simple elementary operations.
On the other hand, a number of works consider the creation of quantum states amongst network nodes using network coding methods [26], [28], [29]. These works are highly relevant for distributing quantum states, and complementary to our more high level approach: While their focus rests on the creation of states, we focus on how to marshal the resources given by said states once they are created. It is of course possible to generate highly entangled states shared by many network nodes, instead of, for example, creating bipartite entangled states resulting in VQLs or shared entanglement between a subset of the nodes such as graph states [35]. We will discuss such possibilities further in Section VI.
Another meaning of the term quantum routing [36], [37], [38] occurs in the domain of quantum state transfer [39] (see [40] for a review). Here, one considers a network of spins or oscillators between which one can control the physical interactions. Specifically, the goal is to design the Hamiltonian coupling the different spins leading to a time evolution that will eventually transfer a quantum state from one place to another. In contrast, we here focus on high level approach of resource allocation given simple operations, also using a combination of physical carriers for which couplings are often fixed. We remark that at the physical layer there is of course a notion of state transfer in all quantum networks, for example the transfer of a state from an optical cavity at one network node onto a photon to create entanglement between two nodes [41].
Finally, we recall that all information transmission in a quantum network can in principle be understood as transforming a network topology consisting of entangled links into another topology, as emphasized by e.g. [21]. Concretely, [21], [42], [43], [44] give concrete transformations of networks in which a fixed toplogy of noisy entangled links is transformed into another by a coordinated operation at each nodes such that the resulting graph has a higher percolation threshold.
2) Related work in classical networking: Let us now consider the relation to routing methods known in classical networks. First, let us remark that even given a procedure to create VQLs, there are fundamental differences between classical and quantum networks: a VQL is maximally dynamic in that it can in principle be established between any two nodes in the network, but can be used only once. Hence, while given a fixed static graph of VQLs one could apply a classical routing algorithm to the resulting topology, we are here in a situation where we can specifically design the graph of VQLs to assist routing. Moreover, in this design as well as in the resulting routing algorithm, we want to pay attention to how VQLs can be reestablished. Nevertheless, we can draw significant inspiration from classical routing schemes. Since we desire routing methods that make efficient local decisions, it is natural to consider hierarchical routing schemes in which the network is naturally divided into different "levels" which have long been suggested for large networks (see e.g. [45]) and are also employed on the internet. Such schemes have seen use from routing on VLSI circuits [46], to wireless networks [47], [48]. The scheme we consider here has most in common with compact routing schemes (see e.g. [49] for a survey, [50], [51], [52] for more recent works and [53, Table 1] for an overview). Indeed, if we were to fix the VQLs permanently, then our routing scheme would lead to a rather efficient compact routing scheme adapted to the particular topologies of VQLs on the sphere and ring. Finally, we remark that there do of course exist classical routing algorithms (see e.g. [54]) that are dynamic in the sense that they can deal with temporary failures of nodes and communication links. While this is a less dynamic situation than ours in which VQLs can be created between any nodes, it may be useful to consider their methods in combination with more complex quantum links as discussed in Section VI. Finally, we remark that as already noted above, the notion of virtual connections is again a concept that is well established in classical networks, already when ATM was being used [19]. Again, while not immediately applicable we expect such ideas could give useful inspiration.

D. Overview
Before turning to the specific case of the ring and sphere, let us briefly summarize the main ideas unifying the two cases. Our first task is to distribute entanglement so that the path between each pair of nodes (according to the topology of the graph of VQLs) in the network is short O(log N ). At the same time we also need only O(log N ) qubits of quantum storage at each network node. This may not be so hard to achieve by itself, but we want to do this in a way that will later enable an efficient routing algorithm and make replenishing consumed VQLs easy. We remark that while future routing algorithms using the model of Fig. 4 may draw great benefits from assigning VQLs depending on the load in the network, we will work with a static graph to be replenished. Key to our efficient routing algorithm is a smart hierarchical labelling of network nodes in the resulting network graph formed by the VQLs. Indeed, our algorithm forms an instance of a hierachical routing algorithm, where a hierarchical structure is imposed by the way we assign the VQLs between nodes.
The key idea in designing the network of VQLs is to start with a base structure, and successively approximate the desired network through what is known as subdivision of edges [55]. Subdividing an edge is the process of replacing an edge with a node, and connecting that node with the endpoints of the edge. After subdivision, the new nodes are interconnected to reach the desired structure. We iterate this process until the graph represents the physical network, in both number of nodes and connections. The previous graphs generated during the subdivision procedure can now be used as a structure for distributing entanglement. If we distribute entanglement not only along physical connections, but also along edges of previous subdivision iterations then these will form shortcuts through the network connecting far away nodes.
To illustrate the idea let us first consider the ring illustrated in Fig. 5. We "grow" the network by successive subdivisions from the left to the right. Our procedure introduces a hierarchical structure since previous iterations can be understood as being lower in the hierarchy. Intuitively, we route by descending into a common level of the hierarchy at which we can use VQL shortcuts to bridge long distances. We remark that for the ring we use a simplified labeling of the nodes. However, it would be possible to use a very similar labeling reflecting the recursive procedure with which the graph is created as in the case of the sphere. This more general labeling would also allow a situation in which the nodes are denser on one side of the ring than the other.    6: VQLs on the sphere. We perform a recursive procedure to add more nodes to the network, and keep doing this until every node represent a physical node. In this figure the structure approximates the sphere more accurately the more recursive steps we perform (i.e. the more nodes there are in the network). The previous iterations can then function as structure for virtual quantum links (VQL) using entanglement. In Fig. 6b we can see that the connections in previous iterations (red dashed, Fig. 6a) are added to the network (solid blue) as VQLs that effectively form shortcuts that bridge nodes separated by longer distances. For example, shortest paths between vertices from Fig. 6a take half as many hops in Fig. 6b if we include the red dashed edges. Thus VQLs significantly reduce the distance between nodes in a network.
The case of the sphere, detailed in Section III, is in spirit very similar. Again, all edges in the previous iteration will become VQLs. Key to understanding this procedure is that the resulting structure will indeed approximate the sphere. The closest regular polyhedron, i.e. a platonic solid, which approximates a sphere is the icosahedron. The icosahedron will be subdivided using a common algorithm in 3D modelling for subdividing triangular meshes, called Loop subdivision [55]. Edges connecting the nodes in previous iterations (Fig. 6a) will remain as VQLs in the next iteration (Fig. 6b).
We emphasize that our method does not require the network to be the same everywhere on the sphere. If we want to consider a situation in which the nodes on one side of the sphere are denser than at another, we simply perform a further subdivision in that region. In essence, this means that nodes in sparser regions will not be present which does not affect our routing procedure.
We will analyse the properties of the two graphs generated in a such a way for the ring and the sphere, where we will see that this approach is effective at reducing the diameter in a network while still limiting the degree of nodes. Given the recursive structure of the graph, it is also possible to define efficient routing algorithms. Finally, we consider how VQLs are replenished in Section IV.

E. Preliminaries: Graph Theory
A network can be modeled as a graph with the network nodes being represented by the vertices of the graph and the links between the nodes being represented by the edges. We denote a graph with G = (V, E), where V is its set of vertices in G and E ⊆ {{α, β} ⊆ V : u = v} is its set of edges. We have restricted ourselves to simple graphs where the edges are undirected, unweighted, and there is at most one edge between any two distinct vertices and no edge to a vertex itself.
For a pair of vertices {α, β} ∈ E, we say that α is adjacent to β, which may also be denoted with α∼β. For any vertex α ∈ V we refer to all the vertices adjacent to it as the neighbors of α and denote this set as N (α) := {β : α∼β} . (1) A walk of length n from a vertex α to β is a sequence of vertices α 0 , . . . α n where α i ∼α i+1 for all i ∈ {0, . . . , n − 1}, α 0 = α, and α n = β. A path is walk with no repeated vertices. When studying networks, it is useful to know how many network links we need to use to get from one node to another. Here, the relevant quantity is the distance between the respective vertices in the graph. Given vertices α, β ∈ V , the distance between them, is defined as the length of the shortest walk from α to β. In case the graph is not clear from the context, we specify it in the subscript, i.e., we write d G (α, β). The diameter of a graph G, denoted D(G), is defined as The diameter of the graph corresponds to the number of network links that need to be used in the worst case to communicate between two nodes in the network. Furthermore, we say that The subgraph H is an induced subgraph when for any two vertices α, β ∈ V it holds that {α, β} ∈ E ⇐⇒ {α, β} ∈ E. 1) Graph Notation: Let us define some of the notation we use to describe subdivided graphs. The set of vertices in the subdivided graph G is V , and let E be the set of edges. We will use the following notation: α, β, γ, η, π ∈ V lowercase Greek letters for vertices, G i the subdivided graph after i subdivisions.
From now on, when we refer to V , E or the graph G we refer to the subdivided graph, not general graphs. An (α 1 , α n )-path is usually represented by P α1,αn = α 1 , α 2 , . . . , α n , which is a list of vertices α i ∈ V , including the endpoints, with i ∈ N. A useful function is the list concatenation operation, denoted by + +, that can also be used to concatenate paths, which is defined as II. Ring Network As a warmup, we consider a network of quantum nodes arranged in a ring topology, where each node only has physical links to two neighbors. We will show how to create VQLs using the physical links and entanglement swapping, and present an efficient routing algorithm on the resulting network of VQLs. The case of the ring contains many of the essential ideas, but is more accessible due to many simplifications that arise.
We remark that there is two ways to use the routing algorithms below. The first follows the idea of classical routing, in which we send a bit -or in our case -qubit along a connection to the next node in the network. Using VQLs, this means we would teleport the qubit from one node to the next. This requires classical control information to be transmitted to the receiving node. We will not be concerned with how the classical control information is relayed, and indeed it may folow a different network topology than the graph of VQLs. The second way to look at routing is to use the routing algorithm not to send a qubit directly. Instead, our goal will be to form one big VQL between the sender and receiver using entanglement swapping at each intermediary node. The sender may then relay the qubit to the receiver by teleportation along the new long distance VQL. The second perspective makes it clear that routing algorithms on VQLs can indeed be understood as a way to manage the resource of entanglement in a quantum network. We remark that indeed it is sufficient for each node to send all control information only to final receiver.
We will phrase our routing algorithms with this second perspective in mind. However, it is easy to instead replace the swapping operation by sending the qubit onwards at each node.

A. Definition of the VQL graph
The ring network is a graph on N vertices, C N , labelled by the elements of {0, . . . , N − 1}. We restrict N to powers of 2, such that N = 2 n for some natural n. We assume there is a physical network C N so that each node k has as neighbours the nodes k − 1, k + 1 (mod N ). On top of the physical network we add VQLs to reduce the diameter D(C N ) from O(N ) to O(log N ). At the same time we will also limit the size of the quantum memory required for the VQLs by bounding the degree of all vertices to O(log N ).
We construct a ring network with VQLs similar to Fig. 5. For any k ∈ {1, . . . , n − 1}, we add a cycle of length 2 n−k through nodes whose labels are divisible by 2 k . That is, the VQLs yield the following connections which allow us to fast forward 2 k vertices when starting from a vertex whose label is divisible by 2 k . In graph theoretic terms, given a graph C N we construct a low-degree graph G n = (V n , E n ) with the same vertices as C N . We will assume that a VQL is prepared between any two nodes that correspond to adjacent vertices in the graph G n . We will show that D(G n ) = O(log N ) = O(n). a) Example: To give an intuitive understanding of why D(G n ) = O(n) = O(log N ) we suppose our network has 2 6 nodes and node 0 wants to communicate with node 37 = 2 5 + 2 2 + 2 0 . Then it could take the path 0, 2 5 , 2 5 + 2 2 , 2 5 + 2 2 + 2 0 , where the first hop uses a VQL that skips 2 5 nodes, the second hop uses a VQL that skips 2 2 nodes and the last one follows the physical link between two adjacent nodes, which we can also see as a VQL if used to share entanglement.
Following the same idea we see that we can reach any node in at most six hops. More generally in a network of N = 2 n nodes we will be able to find a path of length at most 2n between any two nodes by going via node 0.
We now give a precise definition of the graph G n = (V n , E n ) that we informally described above. The vertex set is given by V n := {0, . . . , N − 1}. As stated before, we add a VQL that skips 2 k nodes at every node divisible by 2 k for some integer k. Let us introduce a function t : V n → N that gives the largest such k for a node: In other words, t(α) counts the number of twos in the prime factorization of α. We also define gcd 2 : V n ×V n → N as As the notation suggests, gcd 2 (α, β) is the largest power of two that divides both a and b. Since, gcd(0, 0) = 2 n , strictly speaking, gcd 2 is also a function of n. However, this special case will not be of importance to us, so for the sake of simplicity we have chose not to make this dependence explicit.
With these tools at hand, we define the edge set E n of G n . For vertices α and β of G n , we have {α, β} ∈ E n if and only if |α − β| ≡ gcd 2 (α, β) (mod 2 n ) .
This formalizes the idea that for any node with label α divisible by 2 k we have a VQL that allows us to skip 2 k nodes and go directly to α ± 2 k (mod N ). It is not hard to see that G n contains the graph C N representing our ring network as a subgraph. Indeed, for any pair of consecutive network nodes, α ∈ {0, . . . , N −1} and β = α+1 (mod N ), we have gcd 2 (α, β) = 1 and thus α∼β in G n . For an illustration, see a drawing of G 4 in Fig. 5, where the outer 16-cycle corresponds to the physical links in the network and the remaining edges correspond to VQL enabled by pre-shared entanglement.

B. Properties of the Routing Graph
In this section we establish some properties of the graphs G n . We start by observing that for all k ≤ n, the routing graph G k is isomorphic to an induced subgraph of G n . If we take a second look at Fig. 5 we see that, up to re-labeling of the vertices, the graph G 4 contains G 3 which in turn contains G 2 . In addition, we can observe that the re-labeling corresponds to dividing the vertex labels by two. Indeed, the subgraph of G 4 induced by its even vertices is isomorphic to G 3 via mapping vertex 2α of G 4 to vertex α of G 3 . More generally, we have the following: Lemma II.1. For all n ≥ 2, the subgraph induced by the even vertices of G n is isomorphic to G n−1 via mapping an even vertex α of G n to the vertex α/2 of G n−1 .
Lemma II.1 allows us to bound the diameter of G n to O(log N ). The main idea for bounding the diameter is that any odd vertex of G n is adjacent to an even vertex which by Lemma II.1 belongs to an induced subgraph isomorphic to G n−1 . We also show that to find a shortest path between two vertices in G n+k that are also contained in the subgraph isomorphic to G n we can restrict our attention to the edges in G n . This will be useful for proving the optimality of the routing algorithm we propose in the next section.

Lemma II.3. For any n, k ∈ N and any two vertices α and β of
When looking for a shortest (α, β)-path, Lemma II.3 can help us to narrow down the choices for the vertex to proceed to after α. Specifically, we show that it suffices to restrict our attention to only two vertices: In other words, either α is adjacent to β or there exists a shortest (α, β)-path of the form

C. Routing via a Shortest Path
In this section, we propose a routing algorithm that finds a shortest path between any two vertices of G n (see Algorithm II.2). Again, we emphasize that this algorithm can also be understood as a procedure to marshall entanglement. On a high level, the sender α finds the next node on a shortest path to β and transmits the data and the identity of the receiver to this next node. As before, we remark that transmitting data is equivalent to performing a corresponding entanglement swapping operation on the incoming and outgoing VQL. This node becomes now the new sender and continues the routing algorithm until the data reaches the final receiver β.
Any node can easily find the next node on the optimal path to a given node. In fact, in our warmup example of the ring, due to the structure and the labeling, any node can find the entire shortest path to a given node without having to store the network in her memory. We provide below an algorithm to find the entire shortest path, though we only use it (somewhat redundantly) to find the next node on a shortest path. We present our routing algorithm this way in order to stress that it is local, and it can easily be adapted to the case where nodes in the ring are denser in some regions.
The overall idea for finding a shortest path between the two vertices α and β of G n is to proceed from both ends simultaneously by taking edges that lead to vertices in graphs G k with k < n until a common vertex is reached. It is possible to calculate the optimal next nodes γ ± given any node γ by calculating γ ± 2 t(γ) . This is the only operation that is required in the algorithm. Since the label of a receiver β is known to any sender α, it can also locally calculate β ± for any β locally. Thus, the routing can also be performed locally.
Every edge we take leads us to a vertex strictly lower in the hierarchy, so we reach a vertex from G 1 in at most n = O(log N ) steps which would yield a path of length at most 2n. In order to ensure that a shortest path is found, we augment the partially constructed path using the subroutine bestMove (see Algorithm II.4), where we choose to take the edge that leads us to the vertex from the graph G k with the smallest possible k. We provide a formal and complete argument in the proof of Theorem II.5.
Theorem II.5. For any n ≥ 1 and vertices a and b of G n , the algorithm path(α, β) returns a shortest (α, β)-path.
A complete overview of routing data from a node α to node β is given by the pseudocode Algorithm II.1. A shortest path is computed at every step by Algorithm II.2 and the first element of this path is the next node in routing. To calculate whether two nodes are close, we use a subroutine path2(α, β) (see Algorithm II.3) that returns a path if d(α, β) ≤ 2.

III. Sphere Network
Let us now consider the case of the sphere. As before we describe how to design the VQLs and an efficient routing algorithm on the graph of VQLs. For now, we will simply assume VQLs have been created and there is a background process to replenish them. As in the case of the ring, we also note that sending qubits is equivalent to performing entanglement swapping operations connecting the incoming and outgoing VQLs at a network node.
We start by introducing the relevant graph of VQLs (Section III-A2) that motivates our routing algorithm (Section III-B). We first give a routing algorithm with global information based on the graph properties (Section III-B1). Then, we devise a labelling scheme (Section III-B2) and describe a local routing algorithm (Section III-B3). Finally, we perform an analysis of the space and time resources needed by our local routing algorithm (Section III-B4). All statements in this section are later formally proved in Appendix B.

Data :
The label, α, of the node itself; a send(γ, (η, β)) procedure that sends a tuple of node identifiers η, β ∈ V to the node γ ∈ V ; and a procedure swap(γ, η) that swaps entanglement shared with nodes γ ∈ V and η ∈ V , and sends appropriate classical correction information to the receiver β. Input : (η, β) ∈ V × V , where η is the previous sender, and β the final destination. // Run on reception of a request.
// The next node is the second element of the path P α,β 6 send(γ, (α, β)) // Forward the request to γ. // Unless we are the original sender, we now perform a swap.
// Perform an entanglement swapping operation(see Fig. 2). 9 end 10 end 11 end Algorithm II.1: Routing from node α to node β on the ring. The original sender α first executes the procedure ringRoute with inputs (⊥, β), and passes on the request to the next node. All subsequent nodes α ∈ V execute the procedure ringRoute on reception of a request, which contains the identifier of the requesting node η and the final destination β. If the destination of the request, β ∈ V , has not been reached, then α will calculate the next node on a shortest path to β, and perform a swapping operation. A. Definition of the VQL graph 1) Approximating a Sphere: As a base graph we look at three-dimensional polyhedra with a uniform distribution, i.e. the five platonic solids. We will add vertices to a platonic solid in such a way that the resulting graph better approximates a sphere. Evidently, in our problem the nodes are a given, but it will be convenient to imagine that indeed we grow the graph by approximating the sphere until all existing nodes can be accommodated. For prior work we look at 3D modelling, where it is a common problem to approximate smooth surfaces from few polygons. A standard algorithm in 3D modelling for subdividing polyhedra is Loop subdivision [55]. This algorithm requires triangular polygons, which leave only the tetrahedron, octahedron and icosahedron to choose from. Loop subdivision performs approximation iterations by what is called edge subdivision. In each subdivision, a vertex is placed on the middle of edges and new nodes are connected to their nearby neighbours. An example of Loop subdivision on the icosahedron is shown in Fig. 7, which illustrates how we can subdivide an icosahedron to approximate a sphere. The platonic solid which when subdivided resembles a sphere the most, is the icosahedron. We thus start with a graph representation of the icosahedron, which is scaled so that all 12 vertices are placed on the sphere.
Loop subdivision provides us with a structure for assigning long-distance entangled links. Let us designate the icosahedron as the initial graph G 0 , and subdividing G i results in the graph G i+1 . If the final graph Input : vertices α, β ∈ {0, . . . , 2 n − 1} of G n Output: A shortest path [α, . . . , β] of length at most 2 between vertices α and β. Otherwise, the empty result, ⊥. (13) to check for 2 nd degree adjacency.  is denoted by G k = (V k , E k ), then |V k | coincides with the number of network nodes, which are uniformly distributed over the sphere. Furthermore, E k will coincide with the physical links in the network. We will add all the edges of the previous subdivision graphs G i for i < k to function as VQLs in the network and define our VQL network as Note that this is in contrast with the ring network, where E i includes all E h for h ∈ [i]. These VQLs connect nodes that do not have a direct physical link and can be created with entanglement swapping. The pseudocode for the subdivision algorithm is given in Algorithm III.1. a) Example: We have illustrated a face of the graph G k for k ∈ {0, 1, 2} in Fig. 8. The physical links between nodes are contained in the edges that were generated last, the solid black edges. Entanglement can be established between two adjacent nodes using the physical link. Moreover, all other dotted edges represent a VQL, i.e. an entangled pair between the endpoints, where we have created the long distance entanglement by using entanglement swapping. For example, to create an edge {α 1 , α 3 } ∈ E 1 in Fig. 8b we perform an entanglement swap in β 1 ∈ V 1 on {α 1 , β 1 }, {β 1 , α 3 } ∈ E 1 that were created using physical links. Performing entanglement swapping uses up the entanglement α 1 ∼β 1 and β 1 ∼α 3 though, so edges between these nodes will have to be replenished. A similar procedure is also followed by β 2 and β 3 in V 1 to create {α 1 , α 2 } and (a) The base icosahedron (b) One subdivision (c) Two subdivisions Fig. 7: Approximating the sphere by subdividing edges of the icosahedron. By iteratively performing this procedure, the resulting graph closer and closer approximates a sphere. Each edge represents a entanglement shared by vertices in the network. We use edges of previous subdivisions as VQL shortcuts in the network, e.g. Fig. 7b also contains the edges in Fig. 7a as long distance VQLs. Entanglement is established through physical connections on the most fine-grained distribution of edges in the network.
Algorithm III.1: Subdivision algorithm of the icosahedron. A vertex is placed on each edge in E i and then connected to nearby vertices. The new vertices are grouped in L i+1 , and all edges in E i+1 . The cumulative set of vertices created after i iterations is V i , so that the graph after i subdivisions is For more subdivisions, such as in Fig. 8c, we perform the above procedure 3 times to create the edge {α 1 , α 3 } ∈ E 2 . First by γ 2 and γ 6 In addition to the notation defined in Eqs. (4) and (5) we will use the following notation: A useful term is that of a layer, which may be compared to the layers in an onion. For each subdivision another (c) A face of the icosahedron subdivided two times, k = 2. layer is added to the graph. Layer i refers to all vertices and edges in L i and E i . When we refer to going up layers, that means that we are increasing i for L i and E i . Conversely, going down the layers means decreasing i.
2) Properties of the Routing Graph: The subdivided icosahedron must meet two requirements. First, the graph must have a small diameter, and second, it must have a small degree for each vertex. A small diameter is desired to reduce the number of entanglement swaps necessary to establish a communication. If two vertices are not adjacent then entanglement swaps have to be performed until they are, only then can they communicate securely. We will show that the graph diameter scales logarithmically in the number of nodes, i.e. an exponential improvement if we were to use only the physical links.
Furthermore, we upper bound the degree of each node. For every edge connected to a node, some quantum bit must be stored in a quantum memory. These quantum memories are currently limited in size, and for practical applications must be kept small. We show that the degree of every node scales logarithmically in the total number of nodes.
3) Shortest Path Structure: To find a routing algorithm we take a look at the structure that is present in the network. An important property of every vertex, except those in the base icosahedron, is that it has been generated from an edge in the subdivision algorithm. This edge has two endpoints, which in turn are also generated from edges, etc. The relation structure that this assumes is tree-like, but may contain splitting and joining branches. Because two vertices generate one vertex on subdivision, we call them parents of the child vertex. The parents of the parents are then, of course, grandparents. Fig. 9: The notions of children and parents allows us to easily express relations between vertices over multiple iterations of the subdivision algorithm. A child vertex is a vertex generated on an edge between two vertices (parents) in the subdivision algorithm. The parents of β 2 are p(β 2 ) = {α 1 , α 2 }, and for γ 1 are p(γ 1 ) = {β 1 , β 2 } (red, solid arrow). The grandparents of γ 1 are {α 1 , α 2 , α 3 } (blue, dashed arrow). There are no grandparents for β 2 because its parent α 1 ∈ V 0 .
We precisely define the terminology used with the subdivided graph. The layer function maps vertices to their layer number And the parent function gives the vertices that are the endpoints of the edge that generated α if l(α) > 0, otherwise it is undefined: a) Example: To illustrate what the parents are, we give an example using Fig. 9. The parents of β 2 are and of γ 1 they are Since all α i are on layer zero, they do not have any parents, so β 2 does not have grandparents, but γ 1 does have grandparents It turns out that vertices on the same layer that are adjacent must share a parent, which we call the common parent. We use the notation π α,β to signify a common parent of any α, β ∈ V that are connected. The name π is intended as a mnemonic for parent. Proposition III.3 (Common Parent). Consider two vertices α 1 , α 2 ∈ L k so that α 1 ∼α 2 , for k ∈ N 1 . Then α 1 and α 2 have a unique common parent π α1,α2 .
The sphere graph also has the property that when routing between two vertices, it is never shorter to route through edges on a higher layer than either vertex. This means that when routing between two vertices on a layer lower than k, we may ignore any edges E h and vertices L h with h > k. This greatly reduces the number of options when routing between vertices if the layer of the destination is known.

Theorem III.4 (No Higher Edge).
If m is the distance between vertices α 0 , α m ∈ V , and k = max(l(α 0 ), l(α m )), then for all shortest paths between α 0 and α m of length m it holds that they do not use an edge in E h , where h > k. Now that we know higher layers are not useful for routing, we can start analysing what happens if two vertices are far apart. We show that when a vertex α 0 routes to a vertex on a lower layer, α m , then there always exists a shortest path through a parent of α 0 .
Additionally, when two vertices on the same layer α 0 , α m ∈ L k are at least 3 distance apart d(α 0 , α m ) ≥ 3, then there is a shortest path between them that uses only lower layer vertices. So when we can guarantee that two vertices are some distance apart, we may assume that there are some parents π 0 ∈ p(α 0 ) and π m ∈ p(α m ), that have d(π 0 , π m ) = d(α, β) − 2.
Theorem III.6 (Three Hops). Consider a shortest path P α0,αm of length m ≥ 3 between two vertices on the same layer α 0 , α m ∈ L k , k > 0. Then there exists a path also of length m that contains only vertices in V h , h < k between α 0 and α m , except for α 0 and α m .
This hints at the presence of a routing algorithm which routes through the parents when it knows that α 0 and α m are not on the same layer, or when they are at least at a distance of three. However, vertices always have two parents, so it remains to see which parent should be chosen. b) Example: To illustrate how the common parent works, we give a small example using Fig. 9 once more. From the figure it is possible to see that the common parent of β 1 and β 2 is because both share that same parent. Another example is π β2,β3 = α 3 . However, α 1 and α 2 do not share a common parent even though they are connected, since they are on the base layer. And γ 1 and β 2 also do not share a common parent, because they are not connected. While γ 1 and β 2 do share a common ancestor (α 1 or α 2 ), the common parent is only applicable to direct parents.

B. Routing Algorithm
Using the structure of the icosahedron and its subdivisions, we can devise an efficient routing algorithm. We will give a high-level overview of our approach and reasoning for a routing algorithm here and in Appendix B2 we will go into the technical details of the results and the proofs.
1) Global Routing Algorithm: We first look at designing a routing algorithm for finding a shortest path that uses global information. Our end goal is an algorithm that uses only local information, where each node can route using only information about nearby nodes as we will see in Section III-B3. Still, it is helpful to approach this from a global perspective since it is easier to understand the idea of the algorithm which can then be recursively expressed in a clean manner. On the way there, we design a labelling scheme that can later be used for local routing as well.
The general intuition of the routing algorithm is that when two vertices are not close to each other, then it is possible to route towards a lower layer as indicated in the Three Hops Theorem (Theorem III.6). Routing may then proceed from these lower layer vertices. If nodes are close to each other, then we may find a path using a standard routing algorithm, such as Dijkstra's algorithm [56].
We give two rules with which the algorithm will always be able to pick the best parent if the endpoints are sufficiently far apart. Consider vertices α, β ∈ V . When α and β are far away, we can route through lower layer vertices. Since it may be necessary to go down another layer, it is intuitively better to choose the parent that is on the lowest layer so that we reach faster the lowest layer in a path between α and β. From this intuition we have formalised two rules that we can apply if d(α, β) > 6. The first rule checks whether the node α has a parent which is on a lower layer.
This means that if the routing algorithm has to choose between π 1 and π 2 , it should always choose π 1 . If instead both parents are on the same layer, then it is interesting to see if they contain the possibility to reach a lower layer faster by looking at the grandparents. The Grandparent Rule looks one step ahead and checks whether there exists a grandparent which is on a lower layer than the other grandparents.
Note that both rules can be applied symmetrically, since a shortest path from α to β on a simple graph is also a shortest path from β to α. In case none of the two rules apply we let the routing algorithm pick a random parent. We will formally state the optimality of the routing algorithm using these rules after the example. Fig. 10: Pictured is a small fraction of the subdivided graph, where l(α i ) < l(β j ) < l(γ k ) < l(η ). When γ 2 has to route to a far away vertex (specified in the text) on a lower or equal layer, it needs to choose between α 1 and β 1 . Because l(α 1 ) < l(β 1 ) it is better to choose α 1 according to Definition III.7, since a lower layer vertex is better suited to route over long distances with longer edges. When η 1 has to route far away, it needs to choose between γ 2 and γ 7 . Initially, l(γ 2 ) = l(γ 7 ) so they seem equally good. However, γ 2 is one hop away from α 1 which can route far away faster than either parent of γ 7 (β 1 and β 2 ). Definition III.8 then states it is better to route through γ 2 than γ 7 . a) Example: We give an example of why the lower layer parent is better than the higher layer parent using Fig. 10. Depicted is a fraction of the subdivided graph where γ 2 wants to route to a destination more than 6 hops away, where it is assumed that the layer of the destination is lower or equal to that of γ 2 . Since the destination is far away, it can to route to a parent (Lemma III.5 or Theorem III.6). Because l(α 1 ) < l(β 1 ) the parent rule (Definition III.7) applies, and thus α 1 is chosen over β 1 , since it has better edges to route to far away destinations. We do this, because if l(β 1 ) is still higher than the destination, then we would need to route to a parent of β 1 . However, α 1 ∈ p(β 1 ) so we could have skipped β 1 and went directly to α 1 . We later formally state this in Lemma III.9.
The grandparent rule (Definition III.8) applies to η 2 in Fig. 10, where we also assume that the destination is more than 6 hops away and on a lower or equal layer, so a choice has to be made between γ 2 and γ 7 . Initially, both parents look equally good to route through since l(γ 2 ) = l(γ 7 ) and the Parent Rule does not apply. However, γ 2 is adjacent to α 1 which is on a lower layer than either parent of γ 7 . Thus routing through γ 2 is better when routing to far away destinations, since it is possible to reach a lower layer faster through γ 2 .
b) Routing Optimality: Given the choices that the algorithm makes, and the Parent and Grandparent Rules, we can prove that the algorithm takes an optimal choice given that α is far away from β. A sufficient condition for applying the Parent and Grandparent Rules in the routing algorithm is that d(α, β) > 6. To guarantee these conditions we perform Dijkstra's algorithm [56] limited to the 6th-order neighbourhood of α: This results in the global routing algorithm given in Algorithm III.3. Algorithm III.2 gives a step-by-step implementation of the global routing algorithm for routing and entanglement swapping. The routing algorithm uses Algorithm III.4 to apply the Parent and Grandparent Rules in selecting a parent if d(α, β) > 6. If l(α) ≤ l(β) then the Parent and Grandparent Rules are applied to α, because it is on a higher layer and can go to a parent. However, if l(β) < l(α) the Rules are applied to β, because that vertex must then go to a parent as implied by Lemma III.5. We will later see that the neighbourhood is limited in such a way that the complexity of this algorithm is still acceptable (Section III-B4). First, we show that selecting a parent according to the Parent and Grandparent Rules is an optimal choice when d(α, β) > 6.
Combining Lemma III.9, Dijkstra's algorithm for d(α, β) ≤ 6, and the symmetry of a shortest path between α and β allow us to prove the optimality of the routing algorithm.
To guarantee termination of the routing algorithm, the base case must always find a path if given two vertices on the base layer α, β ∈ V 0 , i.e. two vertices for which a step to the parents is not possible. The diameter of the icosahedron is 3, which means that d(α, β) ≤ 3, so β ∈ N α and Dijkstra is able to find a shortest path on the base icosahedron.

Data :
The label, α, of the node itself; the data required for calling path() (see Algorithm III.3); a procedure send(γ, (η, P α,β , β)) that sends a tuple of η, β ∈ V and a path P α,β ∈ [V ] to γ ∈ V ; and a procedure swap(η, γ) that swaps entanglement shared with η and γ, and sends appropriate classical correction information to the final destination β. Input : A tuple (η, P α,β , β), where η ∈ V is the previous sender η from which the request is received, β ∈ V is the final destination, and P α,β is the path from α to β. // Run on reception of a request. 1 Procedure globalSphereRoute ((η, P α,β , β) A procedure similar to Algorithm II.1 for routing incoming requests on the sphere network using global information from α to β. The initial sender α first runs globalSphereRoute with inputs (⊥, ⊥, β). We insert a complete shortest path to the receiver β given by path(α, β) into the request forwarded to the next node, so that following nodes only have to take the next element from the path.
2) Labelling: We assign to every vertex/node a label that uniquely identifies the vertex and allows for a routing algorithm, where each vertex needs only information about its local neighborhood to run it. As seen in the previous section, we also need to know which layer the vertex is on and how far away it is from the receiver, in order to decide for the endpoints α, β ∈ V whether l(α) ≥ l(β) and whether d(α, β) > 6. On the other hand, the label must be small in size, as it functions as a data header included in every transmission over the network, indicating where the data must go. If we construct a labelling scheme with the above properties, we will be able to construct an efficient local routing algorithm.
What's more, the labelling scheme can be adapted to work for graph structures similar to the sphere, as long as there is a child-parent relationship. Additionally, it is possible to randomize the selection of the parent in case of multiple equivalent options, and in doing so decrease the load of an edge, which is the number of entanglement swaps it must perform per time unit. We further discuss the possibilities of the labelling scheme in Section VI.
Every node is labelled in a hierarchical routing scheme similar to Internet Protocol (IP) which is widely used for routing in current computer networks [23]. A node is assigned a unique ID, which is simply a unique integer. The label contains this unique ID, and the node's ancestry tree which includes parents, then grandparents, etc. It is constructed as a list of sets of vertex IDs, i. e. [{a}, {b, . . . }, {. . . }, . . . ], where a, b ∈ [1, . . . , N ] are the unique IDs. Since the ID is unique we can equate a vertex α ∈ V to its ID a, so that we can use them interchangeably. Each set in the label denotes a group of equally good parents for routing.
The label indicates which vertices in the ancestry tree are the fastest way to reach lower layers. The inverse is also true, it is possible to construct a shortest path to the labelled vertex from any vertex in the label. As we have seen in the Parent Rule (Definition III.7) and the Grandparent Rule (Definition III.8) some vertices are better suited for this purpose. In the labelling we will embed these rules, so that the local algorithm is easily able to find the parents that satisfy these rules.
First up is the Parent Rule. Any vertices that are unfavored by the Parent Rule are not included in the label. We define the function p good which returns the set of nodes that are not unfavored by the Parent Rule: Data : N α the 6th-order neighbourhood of α Input : α, β ∈ V , sender and receiver respectively. Output: P α,β the path from α to β Function path(α, β) is if β ∈ N α then return dijkstra(α, β, N α ) // Dijkstra on the subgraph N α . else // Increment the path to a parent in the label of α or β. if l(β) > l(α) then return path(α, bestParent(β)) + + bestParent(β) else // Else l(α) ≥ l(β) return bestParent(α) + + path(bestParent(α), β) end end end Algorithm III.3: Routing Algorithm with global information, which includes both α and β. Once d(α, β) ≤ 6, Dijkstra's algorithm limited to the 6th-order neighbourhood of α will find a shortest path to β. If d(α, β) > 6, then the vertex on the highest layer must take a step to a parent. To choose a parent on a shortest path we apply the Parent and Grandparent Rules (Definitions III.7 and III.8), as given in the bestParent function (Algorithm III.4).

Data :
The parents p(α) and grandparents π∈p(α) p(π) Input : α ∈ V , the vertex to choose the right parent for. Output: π ∈ p(α), the parent to route through. Function bestParent(α) is if Definition III.7 applies then // Check the parent rule first. return π 1 from Definition III.7 else if Definition III.8 applies then // Then check the grandparent rule. return π 1 from Definition III.8 else return randomElement(p(α)) // Pick a random parent otherwise. end end Algorithm III.4: Routing step in case d(α, β) > 6. The vertex on the highest layer (α) performs a step to a parent on a shortest path that is chosen according to the Parent and Grandparent Rules (Definitions III.7 and III.8).
We can implement the Grandparent Rule by referencing the Parent Rule, since a parent fulfils the Grandparent Rule if it has parents that are also good vertices according to p good . We can show this if we consider the parents {π 1 , π 2 } = p(α), where l(π 1 ) = l(π 2 ) because the Parent rule is inconclusive. Then we can assume that {γ 1 , γ 2 } = p(π 1 ) and {γ 2 , γ 3 } = p(π 2 ), where γ 2 is the common parent of π 1 and π 2 , since π 1 ∼π 2 . If π 1 is preferred by the Grandparent Rule, that implies l(γ 1 ) < l(γ 2 ) and l(γ 1 ) < l(γ 3 ). So p good ({π 1 , π 2 }) = {γ 1 }, since both γ 2 and γ 3 are on a higher layer than γ 1 . Thus if then π 2 is unfavored by the Grandparent Rule. A similar argument holds for when π 2 is favored by the Grandparent rule. This leads us to the filter f (A) which filters out nodes in the set A that are unfavored by the Parent and Grandparent Rules. Let then we have to check if the grandparents of α exist, i.e. p(β) : ∀β ∈ B. We can do this by taking any β ∈ B and checking whether β ∈ V 0 . We only have to do this once, since all β must be on the same layer according to the Parent Rule. If the grandparents do exist, then we apply the Grandparent Rule as we saw in Eq. (25) Data : G = (V, E), the complete graph. Input : α ∈ V Output: label(α), the label of α Function label(α) is Algorithm III.5: Labelling of vertices. When the graph is constructed, each vertex is given a label that will allow efficient routing. Function f (·) is defined in Eq. (27). The labelling is similar to IP addressing, because a hierarchical structure is used.
Using the definition of the filter f , it is possible to define the label which satisfies the Parent Rule at every entry. At the first entry of the label is the vertex ID itself, then come the parents of the vertex that satisfy the Parent Rule and the Grandparent Rule. We repeat this process for the grandparents, great-grandparents, etc. until the base layer has been reached. As such we build the label which satisfies the Parent and Grandparent Rules, so that every vertex in the label is either preferred by the Parent or Grandparent Rule or the rules do not apply because no parent is preferred.
From this recursive definition we can define the label of a vertex α ∈ V as Pseudocode for the construction of the label is given in Algorithm III.5.
It is important to note that the size of the labelling is in fact small. Let [. . .] k denote the k-th element of a list. We can prove that the size of the labelling is bounded by |label(α) i | ≤ 3 for any i. This shows that the size of the label is upper bounded by |label(α)| = O (log(V )). Furthermore, every two vertices for an entry in the label are adjacent and on the same layer.
A node on the first layer is β 2 , which has as parents α 1 and α 2 . Since l(α 1 ) = l(α 2 ) both parents pass the Parent Rule (Definition III.7), and since α 1 , α 2 ∈ V 0 they also pass the Grandparent Rule. Furthermore, α 1 ∈ V 0 so the label stops here, at label( Located on the second layer is γ 2 , with parents {α 1 , β 1 }. In this case l(α 1 ) < l(β 1 ), so β 1 is not included in the label according to the Parent Rule. Because α 1 ∈ V 0 , the label ends here, becoming Lastly, η 1 is located on the third layer, with parents {γ 2 , γ 7 }. Both parents pass the Parent Rule, because l(γ 2 ) = l(γ 7 ). However, γ 2 has access to a better parent than γ 7 , namely α 1 . According to the Grandparent Rule only γ 2 is selected. Then comes the next iteration, where the parents of γ 2 are investigated, which are {α 1 , β 1 }. As we have seen before, only α 1 is included because of the Parent Rule, so that

3) Local Routing Algorithm:
We will adapt the global routing algorithm given in Algorithm III.3 to an algorithm that does not require global information to route. This is important for any routing algorithm that is used in real world networks. If a network node has to calculate a shortest route with a global routing algorithm, then each vertex must store the entire network structure. That would mean the locally stored data grows linearly with the network size in every vertex and edge. However, we would prefer an algorithm that does not require much memory even when the number of nodes grows large, ideally with memory logarithmic in the size of the network. Thus we try not to store the entire network structure, and restrict the data to what every vertex knows about itself and its local neighborhood. Furthermore, we argue that the local algorithm is equivalent to its global counterpart, so that the proof of optimality for the global algorithm will also guarantee the optimality of the local routing algorithm.
In a local algorithm we assume the perspective of a single network node α who wishes to send a qubit -or equivalently -establish a long distance VQL with β using localSphereRoute. The main idea of converting the global routing algorithm to a local one is that basically the label of the destination β contains all the necessary information to locally route to it without needing to have knowledge of where β is in the network and what is its neighborhood.
The β in recursive calls of path(α, β) is often replaced by bestParent(β). To avoid confusion, we fix the receiver as β recv . With β we then refer to current β in a recursive call of path(α, β). We know two things which allow is to route locally: 1) In the global algorithm, the destination variable β can only be a vertex that appears in label(β recv ), since in the recursion of the global routing algorithm β can only be replaced with bestParent(β). 2) All possible bestParent(β) nodes during routing of the global routing algorithm are contained in label(β recv ). Because the global routing algorithm has been shown to be correct, we can conclude that as long as there is no β ∈ label(β recv ) for which d(α, β ) ≤ 6 then we can route to bestParent(α). Once there is such a β , we have reached the part of the global routing algorithm where d(α, β) ≤ 6 and we route to β . Afterwards, we find a shortest (β , β recv )-path.
Routing should go up the layers now, instead of down. For some i it holds that β ∈ label(β recv ) i . Let us now consider which node γ is on a shortest path towards β recv . Since we know that the global routing algorithm is restricted to nodes in label(β recv ) we know that γ ∈ label(β recv ) i−1 .
It does not matter which γ ∈ label(β recv ) i−1 is chosen as the next step in the path. The global algorithm also chooses γ at random when routing from label(β recv ) i−2 , since all γ meet both the Parent and Grandparent rules (Definitions III.7 and III.8). Thus any γ ∈ label(β recv ) i−1 ∩ N (β ) will be reachable from β , and is still on a shortest path towards β recv . The existence of γ follows from the definition of the label (Eq. (29)), because there must be a child of β that is added to the label. Thus there must be a γ in the label for which γ ∈ label(β recv ) i−1 : β ∈ p(γ) .
We now repeat this selection of γ with a new β until we reach the receiver β recv . All in all, this results in the local routing algorithm given in Algorithm III.7. A step-by-step description of how to perform routing and entanglement swapping using the local routing algorithm is given in Algorithm III.6. For simplicity we ignore the complete path returned by localRoute. It can be used to speed up routing for the following 5 nodes by taking the head of the list and routing there.

Data :
The label, α, of the node itself; a procedure send(γ, (η, β)) that sends a tuple of η, β ∈ V to γ ∈ V ; and a procedure swap(γ, η) that swaps the entanglement shared with γ and η, and sends appropriate classical correction information to the final destination β. Input : A tuple (η, β) ∈ V × V , where η is the previous sender and β is the destination. // Run on reception of a request.  Algorithm III.6: A procedure for routing incoming packets on the sphere network from α to β, or equivalently, for creating a long distance VQL between α and β. The original sender α first runs localSphereRoute with inputs (⊥, β) where β is the final destination. Every subsequent node α ∈ V runs the procedure on reception of a request. Compared to the global routing algorithm (Algorithm III.2) it is not necessary to calculate and forward a complete P α,β path.
N α ⊆ V , the IDs of the 6th-order neighbourhood of α. Input : β ∈ V , the destination. Output: [V ], a path of the next nodes to route to. Function localRoute(β) is if α = β then Destination reached else if α ∈ label(β) i : i ∈ {1, . . . , |label(β)|} then // Go to a child of α that is in the label of β and is on a lower layer. return randomElement(label(β) i−1 ∩ N (α)) // Choose randomly on multiple options else L β ← ∪ j label(β) j if L β ∩ N α = ∅ then // Use Dijkstra's algorithm limited to N α to find a shortest path. return arg min γ∈N α ∩L β {|P α,γ | : P α,γ = dijkstra(α, γ, N α )} else // Go to a parent in the label of α that is on a lower layer. return randomElement(label(α) 2 ) // Choose randomly on multiple options end end end Algorithm III.7: Used by localRouteSphere to find the next node on the path to the final destination β.

4) Analysis of the Local Routing algorithm:
We show that the local routing algorithm, as well as the routing when the path is at most of length 6, are efficient and use little memory. Since the algorithm is local, we look at the necessary resources per node. We first prove that the classical memory of every node scales logarithmically with the number of nodes N .

Theorem III.12 (Memory size). The classical memory size per node for the local routing algorithm (Algorithm III.7) is O(log 6 N ).
Furthermore, we show that the running time of the routing algorithm per node also scales logarithmically in the number of nodes N .

IV. Replenishing Entanglement
So far we have assumed that a background process creates entanglement as specified. However, a key part is the feasibility of replenishing the entanglement in the network and the background process as a whole. In this section we will introduce a simple model for the cost of replenishment.
We distinguish two operations: Creation of an entangled pair on a physical link, and an entanglement swap plus purification. Furthermore, we assume that there are no failures when purifying entanglement. Depending on the implementation, the bottleneck may be the entanglement creation operation or the entanglement swapping. As a simplification, we assume that both operations take 1 unit of time. We restrict the number of operations per edge to one per time step. As a result, entanglement swapping prohibits any other operation on either of the involved edges in the same time step; conversely, it implies that the creation operation can be performed at all physical connection concurrently. A further restriction we can impose is that every node may only perform one entanglement swapping in every time step. (See also Fig. 4 for a summary of our assumptions.) With these assumptions and restrictions we calculate the number of time steps needed to initiate the graph structure for the ring and the sphere graphs.

Then the number of time steps T (E) required to establish entanglement along E is
Now that we know how much time it takes to initiate the graph, what about recreating entanglement after it has been used for routing or when it has decohered? We will show that the number of time steps required after routing scales linearly with the number of edges that have to be replaced.

Theorem IV.2 (Edge Entangling). Consider a ring or sphere graph G k = (V, E) where entanglement has been established along all edges E. If at any point in time the entanglement along the edges S ⊆ E has been consumed, then, it takes at most 2|S| time steps to establish once again entanglement along all edges E.
Note that by combining the above two theorems, we have that replenishing the entanglement in the entire graph can take time at most min(2|S|, 2k + 1) = O(log N ) .
V. Robustness of the Network In classical networks requests can be queued when there are multiple requests contending over the same connection. But for VQLs the connection may only be used once until it is replenished. Waiting for links to be relenished occurs a significant cost, since in practise the lifetime of qubits is short. In practise, we thus expect that extension of our algorithms will divert traffic along alternative VQLs instead of waiting.
Nevertheless, it would be interesting to see how well our routing algorithms can in fact deal with multiple requests by routing them simultaneously. In other words, we would like to gain insight in how often multiple requests result to a contention of an edge, which we call a collision. Furthermore, we want to know where such collisions occur often, because we expect that long-distance VQLs, those with a low layer number, have a higher load.
To this end we have performed simulations of the number of collisions under load, i.e. when there are multiple simultaneous requests to use the network and two requests attempt to use the same VQL. We have implemented a simulation program to generate the ring and sphere graphs from this paper and perform routing on them [57]. In the simulation we draw 2, 4, . . . , 20 nodes uniformly from the set of all nodes V without replacement. We then group them into pairs, where each node is used once, and generate paths between them using the routing algorithms from this paper. If there are any two paths that contain the same edge then this is counted as a collision. When multiple collisions occur only the lowest layer collision is counted, because these are the most expensive VQLs to replace. Drawing nodes uniformly results in longer distances between nodes than a real-world case where communications are usually more localised. We expect that this results in more collisions because of higher loads on lower layers. Due to the recursive structure of our network and the symmetry in the network topologies considered, we expect tohave a significant amount of collisions at lower layers. Indeed, drawing pairs of nodes at random on ring would yield nodes on opposite ends of the network with large probability, requiring the use of the lowest layer. Indeed, we estimate that the odds of drawing two nodes such that a path between them uses the middle VQL approaches 1 2 for increasing N . This intuition is indeed confirmed in our simulation. The fraction of requests with a collision for the ring approaches 1 for increasing number of nodes N and number of concurrent requests.
The sphere simulation results are given in Fig. 12. First off, it is clear that path collisions is also a significant problem for the sphere, but less so than the ring. Even for few concurrent requests we encounter collisions frequently. An increasing number of nodes N also does not mitigate many of the collisions. For larger N it does seem the case that lower layer collisions decrease somewhat, but this is compensated by more collisions on higher layers. We conclude that when working with quantum networks it is necessary to address collisions. Furthermore, on our graphs there are often collisions for concurrent requests on lower layer VQLs. This indicates there is high load on these links. If we consider the VQLs on layer 0 and 1, these account for over 50% of collisions, even more so on the sphere. Thus the load on lower layer edges should be addressed.
Two types of solutions can be considered, the first being an algorithmic one: Specifically, one could introduce fallbacks in the routing algorithms to recover from collisions. It is possible to route around an unavailable VQL in our networks because each link is made by entanglement swapping two shorter VQLs. Alternatively, we could handle load by randomizing the routing algorithms where we slightly increase the (expected) path length by consuming very expensive and coveted long distance VQLs only with some probability. Or the graph itself could be modified in some to way to reduce the load on the lower layer edges. It would also be interesting to see analytical results of the behaviour of our procedure under load. This would open the way for a qualitative analysis of network robustness.
A second type of solution is to use more sophisticated quantum nodes in the "core" of the network, which can store slightly more qubits, meaning that the VQLs at lower levels would in fact correspond to multiple VQLs, that is, multiple entangled pairs, between the same network nodes.

VI. Discussion and open questions
We have taken a first step towards formalizing a quantum network and providing efficient routing algorithms for simple network topologies. Much work, however, remains to be done. The main idea is to exploit the resource of short physical entangled links to create VQLs that reduce the diameter of the network to a logarithmic size and keep the degree of the nodes logarithmic. Indeed, we emphasize that our inability to send qubits over long physical distances demands tricks such as creating VQLs, and we have already discussed the advantages of doing so ahead of time.
We proceeded to devise efficient routing algorithms on the corresponding graph of VQLs. Equivalently, we can understand such algorithms as a way to marshall the resource of entanglement in the network. We have exhibited a procedure to create VQLs for the ring and for the sphere network that minimizes the number of qubits stored at each node (i.e. the number of VQLs using the node as endpoint), restricts the necessary operations on the nodes only to very few entanglement swapping operations, and allows for a labelling that leads to a very efficient routing algorithm making only local decisions. It would be interesting to see how this approach extends to other network structures such as the grid. We note that the central idea of the routing procedure is to use the labels assigned by hierarchical subdivisions. The same idea of constructing labels (and the resulting routing algorithm) could be applied whenever we perform similar subdivisions -even if we iteratively perform two different forms of subdivisions. For example for the grid, we essentially want to cover a square. We start by an empty square and subdivide the outer edges in two. We then proceed to introduce a node in the middle of the square. This process results in the overall square being subdivided into four squares. We can recursively apply the same procedure to subdivide the four new squares to approximate a grid.
Evidently, what we have done here leaves much to be desired since we have deliberately abstracted away many of the underlying issues in creating quantum networks; however, we believe that by introducing a cost to the VQLs and introducing lifetimes (i.e., the classical communication delay is captured) our more general model can form a useful abstraction that allows classical ideas to be used in the quantum domain in order to manage entanglement resources. It is clear that such routing protocols do not maximize the overall flow of quantum information in the network, but rather focus on using only very simple quantum operations and state creation mechanisms. Given the significant difficulty in experimental implementations such an approach may be more realistic.
In this work we have only worked with bipartite entangled links. In the quantum domain, entanglement can, however, be shared amongst more than two network nodes. For the classical reader, we remark that such multi-node entanglement does not allow the teleportation of a qubit between any pair of nodes. However, one can use such multi-node entanglement to create a bipartite entangled link between one pair of nodes if the other nodes measure their qubits and classically communicate their measurement results. This operation can quite often be done in parallel to the teleportation or entanglement swapping operation. In principle, it would thus be possible to create an entangled state amongst all network nodes in which each node holds precisely one qubit, and nevertheless we can -by performing suitable measurements -create a VQL between any pair of nodes, making routing in some sense trivial 3 . The number of qubits in memory would then merely facilitate a number of simultaneous requests to create a VQL between the sender and receiver. In practice, however, multi-node entanglement is difficult to create and it is extremely fragile: noise such as dephasing at just one of the nodes involved would destroy the entire entangled state in the network. Evidently, quantum error-correction can help protect such entangled states, but in order to do so we would need a large amount of redundancy, i.e. a significant amount of extra qubits at each network node. Even bipartite entanglement is subject to noise, but in this regime entanglement becomes easier to replenish. This is useful not just to recreate links, but also to trade-off error-correction against simply retrying, i.e., after a certain time we always replenish the entanglement from scratch instead of trying to correct errors.
We expect that a combination of the more classical techniques of resources allocation we have examined here and genuine quantum techniques involving more complicated forms of entanglement will be very fruitful. In particular, one could use quantum methods to create multi-node entangled states shared amongst a smaller subset of nodes [35]. This would allow a trade-off between partially trivializing routing by using multi-node states amongst the subset, and the difficulty to create and maintain such entanglement. We remark that the problem of routing, i.e. path allocation and also managing such entangled resources is a significant departure from classical protocols in which links are always established between two nodes. If we were to work with quantum states shared between three nodes for example, we would route on a hypergraph in which VQL edges connect three vertices. Note that in this regime many of the peculiarities we considered here are retained, e.g. entangled hyperlinks can only be used once. Furthermore, we require additional classical communication to utilize the multi-node entanglement.
Our general model can also capture the fact that creating long VQLs can be more demanding than short VQLs. Adding weights to the links of the network and then finding shortest paths on weighted graphs can reduce the load on long VQLs. We can also try to deal with collisions by dynamically changing the weights of the links of the network. For example, by assigning an ∞ weight to a link was just used by a routing request until it is replenished.
Proof: Let H n−1 = (Ṽ n−1 ,Ẽ n−1 ) be the subgraph induced by the even vertices of G n . To establish the lemma statement we show that the map f :Ṽ n−1 → V n−1 defined by where the last equivalence follows from the fact that for distinct even vertices α and β we have To complete the proof it remains to note that Eq. (34) holds if any only if {f (α), f (β)} ∈ E n−1 .
We are now ready to bound the diameter of G n . This is important to us, since the diameter corresponds to the number of entanglement swaps two network nodes need to perform in the worst case in order to communicate to one another.

Lemma A.2. For any n ∈ N, we have that D(G n ) ≤ D(G n−1 )+2 and D(G 1 ) = 1, where D(G) is the diameter of a graph G. In particular, we have D(G n ) = O(log N ) = O(n).
Proof: From Lemma A.1 we know that that the subgraph H n−1 induced by the even vertices of G n is isomorphic to G n−1 for all n ≥ 2. Therefore, D(H n−1 ) = D(G n−1 ).
For any vertex γ of G n , we consider an even vertex γ . We let γ := γ if γ is even and we let γ := γ + 1 (mod 2 n ) if γ is odd. In the latter case, we have that gcd 2 (γ, γ ) = 1 and hence it follows from Eq. (11) that {γ, γ } ∈ E n . Thus, for any vertex γ of G n , we have d(γ, γ ) ≤ 1 and γ ∈ H n−1 . Using this simple observation we now have that for any two vertices α, β ∈ V n : Since for any two vertices α and β of G n we have d Gn (α, β) ≤ D(G n−1 ) + 2, it follows directly from the definition of diameter that D(G n ) ≤ D(G n−1 ) + 2. We now show that if two vertices of G n+k are also contained in the subgraph isomorphic to G n then in order to find a shortest path between them we can restrict our attention to the edges in this subgraph. This will be useful for proving the correctness of the algorithm for finding the shortest path we propose in Appendix A2.

Lemma A.3. For any n, k ∈ N and any two vertices α and β of
Proof: Let us first establish the k = 1 case. It will be useful for us to consider the graph H n = (Ṽ n ,Ẽ n ) induced by the even vertices of G n+1 . From Lemma A.1 we know that G n is isomorphic to H n via mapping a vertex α of G n to the vertex 2α of H n . Therefore, d Gn (α, β) = d Hn (2α, 2β) for all α, β ∈ V n and to get that d Gn (α, β) = d Gn+1 (2a, 2b), it suffices to show that d Hn (2α, 2β) = d Gn+1 (2α, 2β). We accomplish this using a proof by contradiction. To this end, assume that d Hn (α, β) > d Gn+1 (α, β) for some α, β ∈Ṽ n . Since H n is an induced subgraph of G n+1 , our assumption implies that any shortest (α, β)-path P ab in G n+1 must contain vertices from V n+1 \Ṽ n . Let us consider the subpaths P α β of P ab which start and end with vertices from H n but have all other vertices belonging to V n+1 \Ṽ n . For at least one of these subpaths P α β it must be that d Hn (α , β ) > d Gn+1 (α , β ) as otherwise we could replace all of them with paths of the same length contained entirely in H n . Let us now focus on some such P α β . Since any k ∈ V n+1 \Ṽ n is odd and no two odd vertices are adjacent, we conclude that the path P α β has length 2, i.e., P α β = (α , γ, β ) for some odd γ. This implies that d Gn+1 (α , β ) = 2. Furthermore, since any odd vertex γ is adjacent to only γ +1 and γ −1 (mod 2 n+1 ), we obtain |α −β | ≡ 2 (mod 2 n+1 ). Combining this with the fact that α and β are even we see that α is adjacent to β in H n . So d Hn (α , β ) = 1 < 2, a contradiction. Therefore, d Gn+1 (2α, 2β) = d Hn (2α, 2β) = d Gn (α, β) for any α, β ∈ V n . Now that we have established the k = 1 case, observe that for any k we have which completes the proof. When looking for a shortest (α, β)-path, Lemma A.3 can help us to narrow down the choices for the vertex to proceed to after α.
Proof: Recall Eq. (10) and let k ∈ N be such than gcd 2 (α, β) = 2 k . Since t(α) ≤ t(β), we have a = 2 k α and b = 2 k β for some odd α and some natural β . By Lemma A.3 we have that d Gn (α, β) = d G n−k (α , β ). Since α is odd its only neighbors in G n−k are α + := α + 1 and α − := α − 1, where the arithmetic here and  Fig. 13: Example illustration for the proof of Theorem A.5. If we call path(α, β) with α = 5 and β = 11 then it invokes bestMove(α) which returns α 1 = 4 suggesting to proceed via this vertex. We argue that if, in fact, a shortest (α, β)-path P proceeded via α 2 = 6, then the algorithm can catch up with P in the next step. According to Eq. (13) we can assume that P proceeds to either α − 2 := α 2 − 2 = 4 or to α + 2 := α 2 + 2 = 8. If P proceeded along the red dashed edges to α + 2 = 8 then we can use the blue dotted edges to reach vertex 8 in two steps by going via the vertex α 1 chosen by the algorithm. Finally, note that P cannot proceed to α − 2 from α 2 as it would contradict the optimality assumptions. Therefore, the algorithm's choice to proceed to vertex α 1 = 4 and invoke path(4, 11) was indeed optimal.
Proof: To find a shortest (α, β)-path the algorithm chooses a vertex γ ∈ {α, β} and then calls bestMove(γ) to find a neighbor η of γ that must lie on a shortest (α, β)-path. Depending on the choice of γ, the algorithm then proceeds to a recursive call of path(η, a) or path(η, β). So the algorithm returns a path of the form α, η, . . . , β or α, . . . , η, β . (45) where path(η, β) or path(α, η) has been used to fill in the dots. Therefore, to show that the algorithm indeed returns a shortest (α, β)-path it suffices to argue that bestMove(γ) returns a vertex η that lies on a shortest (α, β)-path. It will be essential that the algorithm chooses to call bestMove(γ) for a vertex v ∈ {α, β} which satisfies t(γ) = min{t(α), t(β)}. As in earlier proofs we will perform the arithmetic involving vertex labels modulo 2 n without explicit mention.

B. Technical Details for the Sphere Network
The proofs are structured into two sections, following the organisation of the main part of the paper on the sphere network. Each subsection handles the corresponding theorems claimed in the main part of the paper. We start by a short outline of the results proved in each section. a) Properties of the Routing Graph: We first prove that the network meets the requirements set for the diameter (Proposition A.6) and the degree of vertices (Proposition A.7). This also leads to relations between the number of subdivisions k, the number of vertices |V k | = N , and the number of edges |E k |. b) Shortest Path Structure: The parents of a node have a few simple properties that are formalized in propositions: the common parent, the connectedness of parents and the layer of a vertex. We use these properties in proofs to show that there exist certain parents that we can route through.
These are followed by two key theorems for routing, Theorem A.11 (No Higher Edge) and Theorem A.16 (Three Hops). No Higher Edge shows that any shortest path between vertices does not contain edges on higher layers than the endpoints of the path. This greatly reduces the number of possibilities when routing, since we can ignore nodes that are on a higher layer. We also show that when a shortest path runs from a high layer to a lower layer there is always a shortest path that immediately goes to a lower layer in Lemma A.12. To simplify further proofs we have defined a triangle (Definition A.13), because some triangles have restrictions on their configurations (Proposition A.14 and Corollary A.15). The Three Hops Theorem shows that if two vertices are on the same layer and at least 3 hops apart, then there must be a shortest path that goes through the parents of both endpoints. These Theorems already hint towards a routing algorithm that makes use of the parents of nodes to route, as there almost always seems to be some parent that is on a shortest path, except when they are already nearby. c) Global Routing Algorithm: We will first show that there exists some structure in the graph if the for the endpoints α, β ∈ V it holds that d(α, β) > 6 in Lemma A.17. Then we show that the global routing algorithm (Algorithm III.3) produces a shortest path. We use Dijkstra's algorithm limited to the 6th-degree neighbourhood to make sure that d(α, β) > 6. That allows us to use the Three Hops Theorem to guarantee that some parent is in a shortest path. To choose the best parent, we have defined the Parent and Grandparent Rules (Definitions III.7 and III.8). Using the graph structure from Lemma A.17 we will show that following the Parent and Grandparent Rules results in an optimal algorithm in Lemma A.18. d) Labelling: In order to turn our global routing algorithm, which finds a shortest path using information from both the sender and the receiver, into to a local routing algorithm, where the sender only uses local information, we introduce a hierarchical labelling (Eq. (29)) scheme which takes the Parent and Grandparent Rules into account, in order to store in the label the nodes which satisfy these rules. This way the sender knows how to find the next node in a shortest path by looking only at the label of the receiver. Needless to say, we need to show that the size of the labelling remains small. A priori, since we are storing the parents, grandparents, etc. it seems that the label grows exponentially. Nevertheless, we show in Lemma A.20 that the size of the label is limited to just 3 entries per layer, which makes its total size only logarithmic. e) Analysis of the Local Routing algorithm: For correctness, we argue that the local algorithm is equivalent to the global algorithm in Section III-B3. Furthermore, it is important that the local routing algorithm is fast and uses little memory. Since the algorithm is local, we look at the running time and memory size per vertex. We show that the memory size and the running time both scale logarithmically with the number of vertices N (Theorem A.21 and Theorem A.22).
1) Definition of the VQL Graph: In this section we will prove some properties of the subdivided graph that are important for the physical implementation as well as the usefulness of the network model. We prove how the number of subdivisions k relates to the number of nodes |V | and edges |E|, and what the maximum degree is of any node in the graph. The degree is related to the amount of quantum memory required to implement such a node. Furthermore, we look at the diameter of the graph. With a small diameter we know that few entanglement swaps are necessary to connect sender and receiver.
The total number of edges is where we have used the direct formula for a geometric series. A vertex is placed on the midpoint of each edge in E i , so that the number of vertices V i (5) is The total number of nodes |V | = |V k |.
Next we analyse the diameter and degree of the graph. A small degree will allow the algorithm to run with smaller quantum memories, while a smaller diameter is desired to have less entanglement swaps per communication. Less swaps results in a lower error rate, since each swap introduces noise into the state. Proof: We give a proof using a recurrence relation over k. Let D(G) be the diameter function on a graph G. Let G k = (V k , k l=0 E k ) be the graph at iteration k. We also need an exact formula for |V k | which is found in Eq. (61) Basis: D(G 0 ) ≤ 2 · 0 + 3 = 3, which holds because the icosahedron has a diameter of 3. Induction hypothesis: Assume that D(G k−1 ) = 2(k − 1) + 3. Induction: For any vertex α ∈ L k it is possible to reach a vertex in layer L k−1 in one step. Thus As such the diameter upper bound is proven. Proof: We show that the degree is upper bounded by calculating the number of vertices any vertex is connected to, when there have been k subdivisions. A vertex on the base icosahedron α ∈ V 0 is connected to 5 vertices β ∈ V 0 . However, any other vertex α ∈ L i , for i = 0, is connected to 6 vertices β ∈ V i , because of how the algorithm connects new vertices to their parents and their neighbours. In every subdivision iteration j : j > i a new midpoint vertex γ is added to L j+1 , and an edge {α, γ} ∈ E j+1 as well. This edge is in turn again subdivided on the next iteration (j + 1). Because the degree of the vertex α is the same as its number of edges, each vertex will add as many nodes as its degree in each subdivision iteration. Thus the degree of a vertex α ∈ V is upper bounded by ≤ 6k + 5 (68) Thus proving the upper bound on the degree of every vertex. Thus both the degree and the diameter are logarithmic in the number of vertices N . b) Shortest Path Structure: To find an efficient routing algorithm it is useful to know what kind of structure shortest paths have. From this structure, we then formulate an efficient routing algorithm. First we look at the layers of the vertices and their parents. Later, we look at restrictions on shortest paths in the graph, and how the distance and layer of nodes dictate what nodes the path uses.
A path is a sequence of vertices that are adjacent. We show that adjacent vertices have a common parent, which is of interest when we want to reroute a path through parent nodes. A common parent of vertices α, β ∈ V is defined as so that the common parent of a node and itself, is itself. The common parent of two different nodes is either a common parent in p(α) ∩ p(β), or if α ∈ p(β) then it is α ∈ Π α,β and vice versa. We show that two vertices on the same layer α∼β always share a unique common parent. Furthermore, we show that the two parents of a node are always connected to each other.
Proof: If α 1 = α 2 then π α1,α2 = α 1 . We know that l(α 1 ) = l(α 2 ) and α 1 ∼α 2 . On Line 5 of the subdivision algorithm (Algorithm III.1) the vertex α 1 is connected to its neighbours Γ = (N (α) ∩ L k ) of layer k. In this step two triangles are defined to connect α 1 to its neighbours, where each triangle only contains edges with at Layer   Fig. 14: An illustration of the proof of Theorem A.11. In black are given three possible shortest paths. It is not possible to construct a shortest path by replacing a hop with going through a higher layer (red, solid arrow). Additionally, any number of hops through a higher layer, may be replaced by going through a lower layer instead (blue, dotted arrow).
Proof: By construction of the graph, specifically on Line 5 of the graph generation algorithm (Algorithm III.1), α is connected to its parents. These parents are chosen such that they are connected on Line 5 of the graph generation algorithm, because α is placed as a midpoint on the edge. Thus proving that there is an edge {β 1 , β 2 } ∈ E.
And finally, we also show that the layer of a vertex depends on the maximum layer of its parents.
An important property of the sphere graph, is that when routing between vertices it is never useful to use edges in E k for higher k than either vertex. Let α, β ∈ V be endpoints of a routing request. Then we can use this proposition to exclude children on a higher layer from being on a shortest path. Since we will often assume l(β) ≤ l(α) this allows us to ignore the children of α.
Theorem A.11 (No Higher Edge). If m is the distance between vertices α 0 , α m ∈ V , and k = max(l(α 0 ), l(α m )). Then, for all shortest paths between α 0 and α m of length m, it holds that they do not use an edge in E h , where h > k.
Proof: We give a proof by induction over m, where d(α 0 , α m ) = m. An illustration of the proof is given in Fig. 14. Basis: m = 1. By construction of the graph, we know that all edges in E i are subdivided to obtain E i+1 . This continues recursively until the highest layer is reached. This implies that Thus there is no shortest path of length 1 that uses an edge in E h . Induction hypothesis: If there are two vertices α 0 , α m ∈ V such that the distance between them is of length m = − 1 and k = max(l(α 0 ), l(α m )), then there exists no path of length − 1 that uses an edge in E h , h > k. Induction: m = . First consider all shortest paths P α0,βm−1 of length m − 1 from α 0 to a vertex β m−1 that satisfy β m−1 ∈ (V k ∩ N (α m )) .
By the Induction Hypothesis (IH) all P α0,βm−1 cannot contain an edge in E h , or they would be longer than m − 1. This means that for any edge in E k , two or more edges have to be traversed in E h . When P α0,βm−1 is extended using an edge in E h , then the destination cannot be reached in one hop. Thus the path using an edge in E h is longer than m hops. Subproof No Higher Layer Vertex: Let us prove by contradiction that there are also no paths of length m − 1 to some vertex on a higher layer γ m−1 ∈ L i : i > k P α0,γm−1 = α 0 , γ 1 , . . . , γ m−2 , γ m−1 that satisfy γ m−1 ∈ N (α m ), such that α m can be reached in m hops through γ m−1 . For a contradiction assume there is some path P α0,γm−1 . Then we know that γ m−2 ∈ p(γ m−1 ), or else {γ m−2 , α m } ∈ E according to Proposition A.9 because also α m ∈ p(γ m−1 ) as l(α m ) < l(γ m−1 ). This would contradict that the distance between α 0 and α m is m. Nor is γ m−1 ∈ p(γ m−2 ) because that would contradict the IH for the path P α0,γm−1 , as it would use an edge to a higher layer than l(γ m−1 ). So Proposition A.8 implies there is some unique and distinct common parent π γm−2,γm−1 . Let us call this parent π γm−2,γm−1 = π 2,1 for simplicity. The path has length m − 2, and Proposition A.9 implies that π 2,1 ∼α m , because α m ∈ p(γ m−1 ). Thus it is possible to construct a shortest path of length m − 1 P α0,π2,1 = P α0,γm−2 + + π 2,1 .
Thus we can conclude that the only paths of length m − 1 are P α0,βm−1 , for which we have already proven that the Theorem holds. Now that we know higher layers are not necessary for routing, we can start analysing the relation between parents of nodes and shortest paths. We show that when routing from a vertex α ∈ V to a vertex β ∈ V , where l(β) < l(α), there is always a shortest path that goes through some π α ∈ p(α). And since the (π α , β)-path must also be shortest, we can conclude that any vertex in that path must be on a lower or equal layer to min(l(π α ), l(β)) according to Theorem A.11. Thus all nodes on an (α, β)-path are on a lower layer than α, except for α itself.

Lemma A.12 (Lower Layer Path). Consider vertices
with d(α 0 , α m ) = m. Then, there exists a shortest path also of length m that contains only vertices β ∈ V h , with h < l(α 0 ) between α 0 and α m , except α 0 .
Proof: We give a proof by induction over the distance m from α 0 to α m . Basis: m = 1: There is a direct hop from α 0 to α 1 . This path satisfies the lemma. Induction hypothesis: If there exists a shortest path P α0,α −1 of length m = − 1 between vertices then there exists a shortest path also of length − 1 that contains only vertices β ∈ V h , with h < l(α 0 ). Induction: m = : We distinguish two cases depending on the first hop in the path.
A useful definition in the discussion of graph structures is that of a triangle.
The parents of two adjacent nodes form a triangle. This triangle has two configurations, either one node is on a lower layer, or all nodes are on the same layer. We prove this in the following Proposition.
Furthermore, the parents of a triangle on the same layer also form a triangle with the same restrictions as in Proposition A.14.
Theorem A.16 (Three Hops). Consider a shortest path P α0,αm of length m ≥ 3 between two vertices on the same layer α 0 , α m ∈ L k , k > 0. Then there exists a path also of length m that contains only vertices in V h , h < k between α 0 and α m , except for α 0 and α m .
2) Otherwise, it holds that l(α 0 ) > l(α 1 ) and l(α ) > l(α −1 ). According to Theorem A.11 we know that the path between α 1 and α −1 cannot contain edges to a layer higher than max(l(α 1 ), l(α −1 )), since it is a shortest path. We know that l(α 0 ) = l(α m ), as such l(α 0 ) > l(α 1 ) and l(α 0 ) > l(α −1 ). Thus l(α 0 ) = l(α m ) > max(l(α 1 ), l(α −1 )). All vertices from α 1 to α m must thus be on a lower layer than α 0 and α m , so the path fulfills the theorem. In all cases it is possible to construct a path according to the theorem. We use this Theorem and also Lemma A.12 extensively for our routing algorithm, because they show that routing to the parents of nodes is always possible if we can provide guarantees on the distance and relative layering.
2) Routing Algorithm: In this section we provide the proofs of the theorems used in Section III-B. First we prove the optimality of the global routing algorithm (B2a), then the optimality of the local routing algorithm with labelling (B2b) and finally we provide the analysis of the resources needed for our local routing algorithm (B2c). a) Global Routing Algorithm: In this section we prove the optimality of the routing algorithm given in Algorithm III.3. Consider vertices α, β ∈ V so that l(α) ≥ l(β). We assume for a contradiction in Lemmas A.17 and A.18 that when d(α, β) > 6 the step the routing algorithm takes is to a vertex π 1 , for which it holds that In other words, we assume that the algorithm takes a suboptimal step. From this assumption we get a contradiction, thus showing that for d(α, β) > 6 the algorithm always makes an optimal choice. Then, we show that the algorithm also makes an optimal choice if l(α) < l(β) and where π 2 ∈ p(α), γ 2 ∈ p(π 2 ). Moreover, if l(π 1 ) = l(π 2 ) then η 2 ∈ p(γ 2 ).
Proof: We show that the lemma holds by analysis of three different cases regarding the relation of the layers of α and β. The algorithm will choose a parent on the first hop of the path, since d(α, β) > 6, and we assumed that the first hop is to π 1 , so π 1 ∈ p(α). Furthermore, we know that l(α) ≥ l(β) and d(α, β) > 6 so we can apply Lemma A.12 or Theorem A. 16. In these statements it is shown that there is a shortest (α, β)-path that has a π 2 ∈ p(α) at the second position in the path, and in the case of Theorem A.16 also a π ∈ p(β) in the second to last position. We will use the Lemma and Theorem as functions that give some π 2 , and in the case of Theorem A.16, π. We assumed that the algorithm takes a suboptimal choice, so π 1 = π 2 . Since the algorithm does not choose π 2 it must be that l(π 1 ) ≤ l(π 2 ) according to the Parent Rule (Definition III.7), thus according to Proposition A.10. We define π β = π if l(α) = l(β), then Theorem A. 16 gives π 2 ∈ p(α) and π ∈ p(β) on a shortest path, β otherwise l(α) > l(β) and we apply Lemma A.12 to get just π 2 ∈ p(α).
Proof: We have shown in Lemma A.18 that the algorithm makes an optimal choice if d(α, β) > 6 and l(α) ≥ l(β). If l(β) > l(α) then the algorithm instead takes a step from β. We can invert the positions of α and β so that algorithm can perform the exact same step for d(β, α) > 6 and l(β) ≥ l(α), of which we have already shown that it is optimal (Lemma A.18). Thus if d(α, β) > 6, then the algorithm performs an optimal step no matter if l(α) ≥ l(β) or l(β) > l(α).
We will show that the algorithm also makes an optimal choice when d(α, β) ≤ 6. In this case, we use a known routing algorithm, Dijkstra's algorithm [56], to finds a path between α and β. Searching in the 6-hop neighbourhood is sufficient, because d(α, β) ≤ 6 and a shortest path of length 6 or less cannot use vertices outside this neighbourhood. Since it is known that Dijkstra's algorithm finds a shortest path, the base case does so as well if d(α, β) ≤ 6. Thus the algorithm makes an optimal choice no matter if d(α, β) ≤ 6 or d(α, β) > 6. b) Labelling: The labelling is defined in Eq. (29) as label(α). Very important is the fact that |label(α) i | ≤ 3, for any i. This greatly limits the size of the labelling, Lemma A.20 (Label Bound). The label size is bounded as |label(α) | ∈ {1, 2, 3}, for any α ∈ V and ∈ N. Additionally, for any β, γ ∈ label(α) : β = γ it holds that β∼γ and l(β) = l(γ).
Proof: We will prove this lemma using induction over the label index label(α) i , using a constrained set of cases. Basis: i = 1. We know that the label starts with only one node α, at label(α) 1 . Since there are no pairs of vertices, all pairs of vertices are adjacent and of the same layer. Induction hypothesis: Assume that |label(α) −1 | ∈ {1, 2, 3}, and that all vertices in label(α) −1 are pairwise adjacent and of the same layer. The label is thus in one of the following configurations: 1) One vertex.
2) Two adjacent vertices of the same layer.
3) Three pairwise adjacent vertices of the same layer. We will show that the induction step will only result in one of these cases.
Children, L > Fig. 17: The neighbourhood of a node, which is directly related to the size complexity. Some edges of the neighbours are drawn using a light gray line. The node β i stores the IDs of 2 parents, 4 siblings, and O(k) children, where k is the number of layers.
Induction: i = . According to the Induction Hypothesis (IH) label(α) −1 is in one of three configurations, we will handle each case individually.
1) The number of vertices is 1 for label(α) −1 . Let {β 1 , β 2 } = p(α). This can result in: a) The first case is l(β 1 ) < l(β 2 ). Only β 1 is added to label(α) in accordance with the Parent Rule (Definition III.7). b) Otherwise l(β 1 ) = l(β 2 ) holds. Then the label element label(α) = {β 1 , β 2 }. Furthermore, β 1 ∼β 2 , because parents are adjacent (Proposition A.9). 2) There are 2 vertices in the label. Let the two vertices be called α 1 , α 2 ∈ label(α) −1 , According to Proposition A.14 the parents of α 1 and α 2 form a triangle {β 1 , β 2 , β 3 }, where l(β 1 ) = l(β 2 ) ≥ l(β 3 ). For each vertex in label(α) must still hold that they are on the same layer, or they would be unfavored by the Parent Rule (Definition III.7). Furthermore, the Grandparent Rule (Definition III.8) could remove a parent if the grandparents are on a higher layer. Thus this can result in the following cases for label(α) , depending on the relative layering of the β i and the Grandparent Rule: a) One vertex. b) Two adjacent vertices of the same layer. c) Three vertices that are all pairwise adjacent and of the same layer. 3) There are 3 vertices in the label. Let {α 1 , α 2 , α 3 } = label(α) −1 , where all vertices are pairwise adjacent and of the same layer. Because these vertices are all pairwise adjacent, they form a triangle. A triangle {α 1 , α 2 , α 3 } with l(α 1 ) = l(α 2 ) = l(α 3 ) is only formed by three parents in a triangle {β 1 , β 2 , β 3 }, according to Corollary A.15. Again, only vertices of the lowest layer are added because of the Parent Rule, so that all vertices in label(α) are of the same layer. Furthermore, the Grandparent Rule can remove certain parents. This can result in the following cases for label(α) : a) One vertex. b) Two adjacent vertices of the same layer. c) Three vertices that are pairwise adjacent and of the same layer. So for all given cases the lemma holds, and each case results in one given in the IH. c) Analysis of the Local Routing algorithm: As is common, we assume that the ID of a node uses constant space, O(1), in accordance with the uniform cost model. The ID is saved as a unique binary number in the graph. We will first analyse the size of the data stored in every vertex. Using that information we are able to analyse the running time of routing per vertex. Let N be the number of nodes in the network and let the number of layers be defined as (62) Proof: We first analyze the contribution to the memory size of the labelling, followed by that of N α . We know that |label(α) i | ≤ 3 for every i ∈ {1, . . . , |label(α)|} (Lemma A.20) resulting in |label(α)| ≤ 3 · l(α) = O(k) .
A vertex must store its own label, and receive a label of the target node β, which also has a space complexity of O(k).
We assume that the data N α for Dijkstra's algorithm is stored in the network node. Alternatively, it may request it over the network; trading off space with time. The neighbourhood of a node is illustrated in Fig. 17. The number of children of a node is (B1b) k i=l(α)+1 6 = 6(k − l(α)) = O(k) . (105) The number of vertices in the neighbourhood of a node is thus |N (α)| = 2 + 4 + 6(k − l(α)) = O(k) .
We take the 6th order neighbourhood, resulting in a space complexity of It is assumed that N α is already stored in the network node. The time complexity of the intersection N α ∩L β is O(min(k 6 , k) = O(k) (Eqs. (104), (107) and (108)). Once an intersection has been found we know the set of possible destinations Γ = N α ∩ L β .
We know that Γ ⊆ L β , so |Γ| = O(k). For every γ ∈ N α we assume the implementation has stored a shortest (α, γ)-path as given by Dijkstra's algorithm. Since the path is at most of size 6, this has a size of O(1).
in O(k). As seen before, the path from α to γ min is readily available for a given γ in O(1) by storing the (α, γ min )-path given by Dijkstra's algorithm. Thus the total running time of the base case is O(k).
Finding an element from label(α) 2 is only O(1) because label(α) 2 ≤ 2. The neighbourhood search that computes label(β) i−1 ∩ N (α) is O(1) because |label(β) i−1 | ≤ 3. Thus the time complexity of the base case overshadows that of inductive step, resulting in a total time complexity of proving the theorem.
Since the diameter of the graph D(G) = 2k + 3 = O(k) (Proposition A.6) and every vertex takes O(k), the routing of any packet will take at most O(k · k) = O(log 2 N ) total time.

C. Technical Details Replenishing Entanglement
In this section we prove some properties on the number of time steps required to establish entanglement according to our proposed network structures. We have made some assumptions in Section IV about the operations and their the time required. Our first assumption is that there are two operations: creation steps, which create entanglement between network nodes that have a physical quantum link; and entanglement swaps, which establish entanglement across larger distances. We furthermore assume that each of these operations takes exactly one time step. Second, each edge may only be operated upon by one operation at each time step. The reasoning is that it should not be possible to start entanglement swapping with entanglement that must still be established. Third, we restrict each node to one entanglement swapping per time step. It is possible that operations can only be performed on a subset of the qubits that are stored in the quantum memory. Here we assume that this subset is of size 2. Let us first introduce notation that unifies the ring and sphere graph since we are proving that the same statements hold for both. We will assume the sphere notation of V k and E k to indicate vertices and edges generated in iteration k, where k = 0 is the basis. When referring to the ring notation we will do so explicitly in the superscript by using '•', e.g. E • k . We define the subdivided ring similarly to the sphere as G k = (V k , ∪ i∈{1,...,k} E i ). The set of vertices is almost the same, V k = V • k−1 for all k > 0; similarly to the sphere, the set of vertices in layer k is defined as However, E • k also includes edges of previous iterations, so we define which completes our definition of G k for the ring. This also allows us to use familiar functions using the same definitions for the sphere as for the ring graph such as the parent function p(α) given in Eq. (21). Additionally, let T : E → N be the function that gives the number of time steps required to create entanglement along E. We first look at the time required to establish entanglement from scratch. Proof: Assume that the network is given by G k , so k subdivisions were performed. We will show with a direct proof that given entanglement along all edges above a given layer m ∈ {1, . . . , k}, it is possible to construct entanglement along all edges on layer m and above given by in two time steps. Using this statement we can prove the theorem for T (E). For a given and given entanglement distributed along F +1 we give an algorithm to distribute entanglement along F in two time steps. Informally, we will perform an entanglement swap at all nodes in L +1 (Eq. (15)) to create entanglement along the edges E . At the same time we will recreate entanglement along edges E +1 (that were just used for E ). We do this by performing entanglement swaps at most nodes in L i to create entanglement along edges E i−1 for all < i < k, thereby moving entanglement from E k → E k−1 → · · · → E +1 . Now a large part of the entanglement at E k has been used to create entanglement on lower layers, but this is remedied by performing an entanglement creation operation in a second time step for most of E k simultaneously.
It is possible to perform an entanglement swap at all vertices α ∈ L because there is entanglement on the edge {α, β} ∈ E for some β ∈ V , since {α, β} ∈ F +1 as l(α) > . Furthermore, note that each node is only performing one entanglement swap in this time step, thus this does not violate our restriction that a node can perform only one entanglement swap in a time step. To see why this is the case, assume that there are three nodes a, b, c where there is entanglement along a∼b∼c and b performs an entanglement swap so that a becomes entangled with c. Now nodes a and c have not used their qubits that are entangled with b in this time step, since b is a child of a and c, and nodes do not create entanglement for higher layers. The result is entanglement distributed along This results from the fact that each vertex in L +1 is a child of an edge in E , and that the remaining vertices in L recreate the entanglement along L +1 , where only entanglement along edges {α, β} ∈ E +1 with l(α) = l(β) was used. In the second time step we then establish entanglement along F \ F ⊆ E k using concurrent creation operations, thus establishing entanglement along all edges in F .
With this algorithm we can prove the time required to create entanglement along all edges in G k . To create entanglement along E (or equivalently, F 0 ), we need entanglement along F 1 plus two time steps. Then to create entanglement along F 1 we need entanglement along F 2 plus two time steps. Continuing this recursively we get T (E) = T (F 0 ) = T (F 1 ) + 2 = · · · = T (F k ) + 2k = 2k + 1 = O(log N ) , proving the Theorem. We also give an upper bound on the establishing of entanglement after some operation or decoherence. This is useful to upper bound the time steps necessary after performing a routing operation. Proof: We will first look at the case where |S| = 1 and expand that to any number of edges. The process to recreate entanglement if {e} = S can be summarized as follows: Unless e ∈ E k , let {β 1 , β 2 } = e, α ∈ V : {β 1 , β 2 } ∈ p(α) , and perform an entanglement swap on α to create entanglement along e, and recursively also on the edges that α uses to perform this swap until the base layer is reached (see also the proof of Theorem A.23). The second step is performing a creation step on all affected edges in E k to recreate the entanglement on the base layer. Using this procedure it is possible to restore entanglement for |S| = 1 in two time steps.
For any set of edges S, some edge e 1 ∈ S may, however, require an entanglement swapping using another edge e 2 ∈ S. We define an ordering based on a layering of edges l(e) = max(l(α 1 ), l(α 2 )) : {α 1 , α 2 } = e .
Using this ordering we know that l(e 1 ) < l(e 2 ), or otherwise e 1 would not require the entanglement swapping along e 2 , since e 2 would only involve nodes on the same or lower layer. And we know nodes only perform a swap to create entanglement for strictly lower layers. We modify the procedure to first recreate entanglement for the edges on the highest layer S max = arg max{l(e) : e ∈ S} .
Now for any e 1 ∈ S max there cannot be an e 2 ∈ S that it depends on, since l(e 1 ) ≥ l(e 2 ). We can then concurrently restore entanglement along all edges in S max in two time steps, according to the procedure for restoring a single edge. Now we iterate this procedure for S \ S max , until all edges have been restored. Since |S max | ≥ 1 the size of S strictly decreases on every iteration by at least one, so the procedure takes at most 2|S| time steps as specified in the Theorem. Note that by combining the above two theorems, we have that replenishing the entanglement in the entire graph can take time at most min(2|S|, 2k + 1) = O(log N ) .