## 1 Introduction

A quantum network (also called as a quantum Internet) is an interconnection of quantum processors and repeaters that can generate, exchange, and process quantum information [QuantumInternet2008]. It facilitates the transmission of information in the form of quantum bits, also called *qubits*, between physically separated quantum memory.
Long-distance quantum information exchange has been proposed, studied, and validated since 1980s [BB84, E91, Pan98, TokyoQKD, DARPAQuantum, Vienna, Satellite] and many experimental studies have demonstrated that communication of quantum information can become successful in reality, such as the DARPA quantum network [DARPAQuantum], SECOQC Vienna QKD network [Vienna], the Tokyo QKD network [TokyoQKD], and the satellite quantum network in China [Satellite].

Quantum networks are not meant to replace the classical Internet communication. In fact, they supplement the classical Internet and enable a number of important applications such as quantum key distribution (QKD) [BB84, E91], clock synchronization [QuantumClock], secure remote computation [remotequantum], and distributed consensus [distributedQuantum], most of which cannot be easily achieved by the classical Internet.

The basic function of a quantum network is to enable long-distance quantum entanglement between two remote communication parties. Hence, most applications of quantum networks are developed based on two important features of quantum entanglement. 1) Quantum entanglements are inherently private by the laws of quantum mechanics such as the “no-cloning theorem” [nocloning] and hence prevent a third party from eavesdropping the communication [E91].

quantum entanglement is a perfect solution of the most fundamental problem of network security: key distribution (also known as key agreement) [DiffieHellman]. Compared to public key cryptography [RSA], quantum key distribution (QKD) has provable security based on information theory and forward secrecy [QuantumInternet2018], instead of relying on the computational complexity of certain functions (such as factorization). 2) Quantum entanglement provides strong correlation and instantaneous coordination of the communication parties. Hence, quantum entanglement can achieve tasks that are difficult to coordinate in classical networks due to unexpected network latencies, such as clock synchronization [QuantumClock] and distributed consensus [distributedQuantum].

Recent progress reveals that quantum networks could become practical in 5 years [QuantumInternet2018], and they do not rely on the well-functioning quantum computers carrying a sufficient amount of qubits. In fact, many applications of quantum networks can be implemented with one or two qubits. Considering the QKD example, we are able to distribute a secret bit with only one entanglement pair. By repeating the 1-pair QKD process we can generate secret keys with a sufficient length. Hence, research on quantum networks is a timing topic.

To generate a long-distance quantum entanglement between two parties Alice and Bob, one of them should create an entangled pair of photons and send one photon to the other party through a channel using certain physical media such as optical fiber. However, optical fiber is inherently lossy and the success rate of establishing an entanglement pair decays exponentially with the physical distance between the two parties [RoutingEntanglement, rate-loss2014]. Hence, to increase success rate of long-distance quantum entanglement, a number of *quantum repeaters* need to be deployed between two long-distance communication parties [QuantumInternet2018, repeaterless2014]. Eventually a network of quantum repeaters will be deployed to support any-to-any communication of world-wide quantum processors, similar to the evolution of classical Internet. One critical issue is that quantum repeaters work in *a completely different way* from classical network routers: they use quantum swapping instead of the packet switching. Hence, new algorithms are required to be designed and how to reliably generate quantum entanglement using the network of repeaters remains an unsolved yet important problem.

This work focuses on a key problem called *entanglement routing*, whose objective is to build long-distance entanglements through multiple hops for any pair of source and destination in the network.
This problem can be considered on the network layer of a quantum network [LinkLayerQuantum].
Existing work that investigate the routing problem of quantum networks is limited to analyzing the traditional routing techniques (Dijkstra shortest paths, multipath routing, and greedy routing) on special network topologies (ring, sphere, or grid), such as the very recent ones [RoutingEntanglement, GreedyRoutingQuantum].
In this study, we present a comprehensive entanglement routing model that reflects the difference between quantum networks and classical networks and new entanglement routing designs that utilize the unique properties of quantum networks. The proposed algorithms include realistic protocol-design consideration such as arbitrary network topologies, multiple concurrent sources and destinations to compete resource, link state exchanges, and limited qubit capacity of each node, most of which have not been considered by prior studies.

Evaluation results show that the proposed algorithm Q-CAST increases the number of successful long-distance entanglements by a big margin compared to other methods. More importantly, this study may encourage more network researchers to study the entanglement routing problem. We present and clarify the models and problems of entanglement routing, with the comparison of similar terms and concepts used in classical network research. A simulator with algorithm implementation, topology generation, statistics, and network visualization functions is built and will be open to public [QuantumCode].

## 2 Related Work

Quantum information exchange has been proposed, studied, and validated for more than 20 years [BB84, E91, Pan98, TokyoQKD, DARPAQuantum, Vienna, Satellite]. The concept of quantum networks is first introduced by the DARPA quantum network project aiming to implement secure communication in the early 2000s [DARPAQuantum]. This project uses multiple physical layer implements including fiber optics to transmit entangled photons. Recent implementations include the SECOQC Vienna QKD network [Vienna], the Tokyo QKD network [TokyoQKD] and China’s satellite quantum network [Satellite].

In addition to these experimental work, researchers have started the algorithm designs of quantum networks that can provide reliable and fast services to quantum network applications. One fundamental problem is to routing quantum entanglements with reliability protection using the quantum repeater network with lossy links [repeater2013]. Pirandola *et al.* discuss the limits of repeaterless quantum communication [repeaterless2014]. Schoute *et al.* [Shortcuts] proposed a framework to study quantum network routing. However, their discussion is only limited to ring or sphere topology. Das *et al.* [RobustQuantum] compares different special topologies for entanglement routing. Caleffi [optimalQuantum] studies the optimal routing problem in a chain of repeaters. Pant *et al.* [RoutingEntanglement] proposes solutions for entanglement routing in grid networks. [GreedyRoutingQuantum] proposes virtual-path based greedy routing in ring and grid networks. For all studies mentioned above, they assume specialized network topologies, which may be over-simplified. The topologies of practical quantum networks may be arbitrary graphs because 1) the end hosts in quantum networks (i.e., trusted nodes) must exist on specified locations according to application requirements, instead of following certain topologies; 2) deploying unnecessary trusted nodes and quantum repeaters just to create certain topologies is a waste of resource.

The simple greedy routing algorithms used in [RoutingEntanglement, GreedyRoutingQuantum] may fail at the local minimums in arbitrary graphs as being extensively studied in prior research for wireless routing [GPSR, MDT]. In addition, existing methods are limited to study a single pair of source and destination and do not consider concurrent source-destination pairs that exist in most cases of the practice.

Recently
Dahlberg *et al.* [LinkLayerQuantum] give a reference model of quantum network stack, which contains the physical layer, link layer, network layer, and transport layer. Based on that, they provide a reliable physical and link layer protocol for quantum networks on the NV hardware platform.
The routing algorithms proposed in this paper fit in the network layer to provide the concurrent entanglement routing solutions.

## 3 Network Model and Problem Definition

The network model used in this study follows the facts from existing physical experiments [Pan98, qubit2013, teleportation2009, entanglement2007] and the corresponding studies [Shortcuts, RobustQuantum, RoutingEntanglement] to reflect a practical quantum network. Compared to prior models used in existing studies of quantum network performance [Shortcuts, RobustQuantum, RoutingEntanglement, GreedyRoutingQuantum] – mostly by physicists and theoreticians – our model includes many practical considerations and experience from network protocol designs, such as the dynamics of quantum links, definition and comparison of different routing metrics, concurrent source-destination pairs,

limited qubit capacity of each node, clear differentiation of the network topology and link state information, and limited link-state propagation in a time slot.

### 3.1 Network Model

There are three main components in a quantum network [QuantumInternet2018], explained as follows.

1. Quantum processors. Quantum processors, also called ‘trusted nodes’ [Shortcuts, RoutingEntanglement], are similar to the end hosts in classical networks, which run the network applications that require end hosts to communicate with each other. Different from classical end hosts, each quantum processor is equipped with a certain size of *quantum memory*, quantified in the number of qubits. All quantum processors are connected via the classical Internet. Hence, they are able to freely exchange classical information. *Entanglement routing* requires the quantum network to establish an entanglement between two target quantum processors through a number of quantum links, which may be simply called ‘routing’ in existing work [RobustQuantum, RoutingEntanglement].

2. Quantum repeaters. It is difficult to establish a shared entanglement between two distant quantum processors, because the fidelity of entanglements decay exponentially with the distance. Hence, quantum repeaters are used as relays to connect quantum processors. They support entanglement sharing over arbitrarily long distances via *quantum swapping* (explained later). A quantum repeater may also connect to other repeaters and quantum processors via the classical Internet to exchange the control messages.
Every quantum processor also includes the complete function of a repeater.

Compared to a quantum processor, a repeater *cannot* be the source or destination of any qubit transmission – it can only perform quantum swapping but not measurement.
Quantum processors and repeaters are both called *quantum devices* or simply *nodes*.

3. Quantum channels and links.
A quantum channel connecting two quantum devices supports the transmission of qubits. The physical material of quantum channels may be standard optical fibers. A quantum channel is inherently lossy: the success rate of each attempt to create an entanglement of a quantum channel is , which decreases exponentially with the physical length of the channel: ^{1}^{1}1The success rate of a link is determined by the physical layer and link layer, taking into account the channel transmissivity, fidelity of transmitted entanglements, number of permitted entanglement trials in one phase, and the link layer algorithm [LinkLayerQuantum, RoutingEntanglement]. In the link layer, a channel is allowed multiple attempts to build a link, and the link is established on the first successful attempt. The here is the overall success rate. where is the physical length of the channel
and is a constant depending on the physical media [QuantumInternet2018, RoutingEntanglement, rate-loss2014, repeaterless2014].
If an entanglement attempt is successful, we call there is a *quantum link* on this channel and the two quantum processors share an entanglement pair.

Quantum swapping. Classical forwarding devices, such as network routers, perform packet switching in a store-and-forward manner.

A quantum repeater works in *a completely different way*. As shown in Figure 1(a), to create an entanglement pair for two distant quantum processors Alice and Bob, a quantum repeater first generates an entanglement pair with Alice and simultaneously generates another entanglement pair with Bob.

After performing the Bell state measurement (BSM) [Pan98, teleportation2009, qubit2013], the repeater can teleport the qubit entangled with Alice to Bob, resulting an entangled qubit pair, also called an *entangled qubit* (*ebit*), shared by Alice and Bob, as shown in Figure 1(b). Hence, Alice and Bob can share information via the ebit. This process is called *quantum swapping* (or quantum teleportation) [teleportation2009, QuantumInternet2018, RoutingEntanglement]. Similar operations can be performed by multiple repeaters on a path connecting Alice and Bob. Unlike the hop-by-hop forwarding in classical networks, quantum swapping requires all quantum links on the path to be successful *at the same time*.

The entanglement routing problem is to establish an ebit between two given quantum processors, via quantum swapping, in a quantum network. It is the fundamental service of the quantum network for applications of two remote users, such as QKD.

Network topology. As a formal specification, we consider a network of nodes described by a weighted multigraph . is the set of nodes. Each node is either a quantum processor or repeater, equipped with a limited number of qubits to build quantum links. A quantum processor can also perform quantum swapping for neighboring nodes and only a quantum processor can be the source or destination of qubit transmission. We assume all nodes are connected via classical networks, i.e., the Internet, and every node has a certain level of classical computing and storage capacity, such as a desktop server.

Edges, channels, links, and paths. is the set of edges in the graph. An edge existing between two nodes means that the two nodes shares one or more quantum channels. The number of channels is called the width of the edge. is the set of all channels, each of which is identified by its two end nodes.

Quantum processors can assign different memory qubits to different quantum channels. Channels that are assigned qubits at both ends are bound channels, other channels are unbound channels. There could be multiple parallel channels between two nodes. At a given time two neighbor nodes may share multiple quantum links.

In order to create direct quantum entanglement, two neighbor nodes must make quantum entanglement attempts in the same time on the shared bound channels. On the other hand, two nodes share a quantum link

means they have a direct quantum entanglement at this moment.

A path between a pair of nodes is identified by the sequence of the nodes along the path , and the width of the path. A path has width means each edge of the path has at least parallel channels. For succinctness, the path is also called a -path, or a -path. As a different concept, if an end-to-end path of quantum links (not channels) that can build entanglements, i.e., each edge has at least successful quantum links, we call the path is a -entangled path, or the path has entanglement width .

Time slots.

For long-distance quantum swapping, all nodes on the path need to obtain the quantum entanglement with its predecessor and successor at the same time. Hence, some level of time synchronization among all nodes is necessary, which can be achieved by the current synchronization protocols via Internet connections. Time is loosely synchronized in *time slots* [RoutingEntanglement]. Each time slot is a device-technology-dependent constant and set to an appropriate duration by the link layer

such that the established entanglements do not discohere within one time slot [RoutingEntanglement].

Before each time lost, each node should know the global network topology , which is relatively stable.

Each time slot includes four phases as an extended model from [RoutingEntanglement]. In Phase One (P1), all nodes receive the information of current source-destination (S-D) pairs that need to establish long-distance entanglements by the Internet.

Phase Two (P2) is called the external phase [RoutingEntanglement]. In P2, each node assigns its quantum memory qubits to quantum channels and attempts to generate quantum entanglements with neighboring nodes on the bound channels. As an example in Figure 2(a), and are distant quantum processors that wants to exchange some qubit information. , , and are repeaters. Each node (processor or repeater) has a number of qubits (red dots) for quantum networking purposes.

The dashed lines are quantum channels. Two neighbors may share multiple channels

simultaneously. Because qubits are limited resource, some channels are not assigned qubits and are not used in this time slot.
During P2, each channel can make a finite number attempts [DeterministicDelivery], , until a link is built or P2 finishes.
After P2, some quantum links may be created as shown in Fig. 2(b). We call the information of these links as *link states*. Compared to the same term in link-state routing of classical networks [OSPF], the quantum link states are *highly dynamic and nondeterministic*. In Phase Three (P3), each node
knows its own link states via classical communications with its neighbors [RoutingEntanglement] and shares its link states via the classical network.
Since successful entanglements will quickly decay, each node can only receive the link states of a subset of other nodes.
P3 only includes classical information exchange.
In Phase Four (P4), also called the internal phase [RoutingEntanglement], nodes perform quantum swapping to establish long-distance quantum entanglement using the successful quantum links. Each node *locally* determines the swapping of successful entanglements, which can be considered as placing an *internal link* between two qubits as shown in Fig. 2

(c). Each swapping succeeds at a device-dependent probability

. and can successfully share an entanglement qubit pair (an ebit) if there is an end-to-end path with both external and internal links as in Fig. 2(c).Local link-state knowledge. P3 and P4 should be short such that the successful entanglements do not decay. Hence it is impractical for a node to know the global link states within such short time as the classical network has latencies [RoutingEntanglement]. Hence, a practical model is to allow each node to know the link states of its -hop neighbors, [GreedyRoutingQuantum]. The swapping decisions in P4 thus include the -hop link-state information as the input. It is obvious that the routing path selection could be sub-optimal without global link-state knowledge.

Exclusive qubit/channel reservation. In P2 of each time slot, to establish a single link on a channel, each end of the channel is assigned a qubit. This qubit-channel assignment is exclusive: the qubits cannot be shared by other channels, and no more qubits can be assigned to the channel. And in P4, to generate an ebit shared by a pair of distant nodes, quantum swapping is performed on pairs of links. This quantum swapping is also exclusive, and a single link cannot be used for more than one swapping. Hence, the qubits and channels are precious routing resource and should be carefully managed.

### 3.2 The entanglement routing problem

This work studies the entanglement routing problem: we are given a quantum network with an arbitrary network graph and a number of source-destination (S-D) pairs , where . The number of memory qubits of a node is , and each edge consists of one or more channels from . For each bound channel , a link is successfully built in probability in P2. In P3, each node gets the link-state information of its -hop neighbors. Each node decides the swapping of its internal qubits in P4 *locally*, and each swapping succeeds in probability .

The objective of entanglement routing is to *maximize the number of ebits* delivered for all S-D pairs, in each time slot. Each ebit must be delivered by a long-distance quantum entanglement, built by a path of successful quantum links from the source to the destination. Each S-D pair may share multiple ebits.
A successful quantum link can only be used for one long-distance entanglement.
The number of ebits for one S-D pair in one time slot is also called the throughput between the S-D pair. The objective can then be set to maximize the overall throughput in the network.

### 3.3 Compared to classical network routing

We summarize the differences between quantum entanglement routing and classical network routing. We show that existing routing techniques are not sufficient to solve the entanglement routing problem.

Term clarification. Edges, channels, and links have *different* definitions as presented above in this model, although they are used interchangeably in classical networks. Besides, the network topology and global link states may be considered as similar information in classical routing such as OSPF [OSPF]. However, in a quantum network, while the network topology (nodes and channels) is stable and known to all nodes, the link states (whether the entanglements succeeded) are dynamic and only shared locally in P3 and P4 of each time slot.

Versus routing in wired packet-switching networks.

Link-state and distance-vector are two main types of routing protocols for packet-switching networks. Main differences:

1) Packet switching relies on either link-state broadcast or multi-round distance vector exchanges to compute the shortest paths. However, in a quantum network, link states are local information and a node may not know whether a link that is -hop away is successfully built or not. There is no time for global link-state broadcast or distance vector convergence, because entanglements on the links will quickly decay. 2) Quantum links are highly unreliable while wired links are relatively reliable. 3) A quantum link cannot be shared by multiple S-D pairs, which is allowed in classical packet switching. If a link is claimed by multiple S-D pairs, it can only satisfy one of them. Hence, the “shortest paths” computed by classical routing will not always be available. 4) Classical packets can be buffered on any node for future transmission. In quantum networks, links on a paths must be successful in the same time slot.Versus routing in multi-hop wireless networks. A multi-hop wireless network could be either a mobile ad hoc network [adhocrouting] or a wireless sensor network [sensorsurvey]. Main differences: 1) For an ad hoc wireless node, neither the network topology nor global link state is known. For a quantum node, although link state is local information, the network topology is known in advance via the Internet. 2) An ad hoc wireless node can keep sending a packet until the transmission is successful or a preferred receiver moves close to it. Each quantum link can only be used once and all links on an end-to-end path must be available simultaneously. Existing wireless ad hoc routing methods such as DSR [DSR], AODV [AODV], and geographic routing [GPSR] are all packet-switching protocols and do not fit quantum networks. Also, they do not take the global network topology information.

Versus circuit-switching and flow scheduling in SDN. Circuit switching, virtual circuit, and flow scheduling in software defined networks (SDNs) all need to pre-determine the end-to-end paths and reserve certain resource on the paths, such as [VCRouting, ATMRouting, RandomizedCircuit, Hedera], which share similarity with entanglement routing. The main difference is that in a quantum network, links on reserved paths may arbitrarily fail, and hence more robust path allocation and recovery algorithms are required.

## 4 Entanglement Routing Algorithms

The proposed entanglement routing algorithms utilize the unique properties of quantum networks that have not been explored in classical network routing. Compared to recent quantum network studies [Shortcuts, RobustQuantum, RoutingEntanglement, GreedyRoutingQuantum], the proposed protocols follow a standard protocol-design approach and use more realistic network models: arbitrary network topologies, multiple concurrent S-D pairs to compete links, link state exchanges, and limited qubit capacity of each node.

### 4.1 Main ideas

Our design is based on the following three innovative ideas to utilize the unique features of a quantum network:

1. Path computation based on global topology and path recovery based on local link states.

The quantum network graph is relatively stable and hence can be known to every node. However, the link states are highly dynamic and probabilistic in each time slot. The frequent link state changes cannot be propagated throughout the whole network, especially when the entanglements decay quickly. Hence, nodes select and agree on the same list of paths based on global topology information in P2, and try to recover from link failures based on local link states in P4.

2. Wide paths are preferred. Recall that on a -path, each edge has at least parallel channels. Fig. 3(a) shows an example of a 2-path from to . Compared to two disjoint paths shown in Fig. 3(b), which cost the same amount of resource (qubits and channels), the wide path is more reliable because it only fails when two links fail simultaneously at a single hop. Suppose the success rate of each channel is 0.5. We may easily calculate that the 2-path can build at least one long-distance entanglement with probability 0.32, while this probability for the two disjoint paths is 0.12. To achieve high throughput on a path with , nodes should share a consensus on how to perform swapping (place internal links in Fig. 3) instead of making choice randomly. Each channel is assigned a global unique ID. During P4, each node places an intern link between the link with the smallest ID to its predecessor and the link with the smallest ID to its successor. And it repeats this process until no intern link can be made for this path.

Formally, we may define a *routing metric*, called the expected number of ebits or expected throughput (EXT) , to quantify an end-to-end path on the network topology. For a -path , suppose the channel entanglement success rate on the -th hop is , where . We denote the probability of the -th edge on the path having exactly successful links as , and the probability of the first hops of is an -entanglement path as . Then we get the recursive formula set, for and :

(1) | ||||

Further, considering the success probability of each quantum swapping, we get the EXT . We show some numerical results. For simplicity, we set , and let be 0.9 or 0.6. We vary the from 1 to 3 and the from 1 to 10, and the results of the EXT of a -path are shown in Figures 5 and 4. It obvious that a -path has significant improvement of EXT over a 1-path, for more than a factor of .

3. Offline pre-computation versus contention-aware online path selection. In different time slots, the S-D pairs may be different. We propose two approaches to select paths for S-D pairs in each time slot. The first approach utilizes offline computation, which happens at any time before a time slot, such as during system initialization. Multiple paths for *each* potential S-D pair is pre-computed, and all nodes stores these paths. At each time slot, nodes select the pre-computed paths for current S-D pairs. The contention-aware online algorithm does not pre-compute the paths for all S-D pairs. At each time slot, the algorithm finds contention-free paths for current S-D pairs. A set of paths are ‘contention-free’ if the network can simultaneously satisfy the qubit and channel requirement for all the paths in full width. We propose two algorithms using the two approaches, called Q-PASS and Q-CAST.

### 4.2 Q-PASS: Pre-computed pAth Selection and Segment-based recovery

#### 4.2.1 Algorithm overview

We present the algorithm Q-PASS, whose workflow is shown in Fig. 6.

The core idea of Q-PASS is to pre-compute potential ‘good’ paths between *all possible S-D pairs* based on the network topology . Then in each time slot, every node uses an online algorithm to make qubit-to-channel assignments based on the pre-computed paths of *current S-D pairs* and make local swapping decisions based on local link states.
The design includes both offline and online algorithms.

The offline phase (top of Fig. 6) may happen at the system initialization or after the network topology changes. The results of an offline phase can be used by many succeeding time slots until a topology change happen. Hence, we may assume the time for an offline period is sufficiently long. The offline algorithm is run at a trusted server, with replica servers for robustness. These servers connect to all quantum nodes via classical networks. The outputs of the offline algorithm are the “candidate paths” for all possible S-D pairs. The candidate paths of each S-D pair are those paths connecting the S-D and with small values of the selected metric.

The algorithm of each time slot (bottom half of Fig. 6) is a four-phase design and run by each node in a distributed and concurrent manner. It should be fast and only use the -hop link-state information. P1 and P3 only include standard processes and do not have special algorithmic design. Q-PASS P2 takes the candidate paths from the offline algorithm and the S-D pairs as the input. It computes a number of selected paths for the S-D pairs and its local qubit-to-channel assignment. Note that the inputs are globally consistent on all nodes. Hence, the selected paths are also consistent on different nodes. The assignment will produce a number of successful links in P2. And in P3, nodes exchange the link states with their -hop neighbors. Q-PASS P4 uses the selected paths and link state information as the input to compute the the swapping decisions (i.e., internal links). After P4, possible long-distance entanglement can be built for S-D pairs.

We present the offline, P2, and P4 algorithms of Q-PASS in details.

#### 4.2.2 Offline path computation

The offline algorithm should find multiple paths for each S-D pair to provide multiple potential paths to select in each time slot. We use Yen’s algorithm [kshort] to get multiple paths for each pair. Note that the results of Yen’s algorithm is not contention-free: the paths may overlap at nodes or channels, and the network may not have enough qubits or channels to satisfy all the paths in a single time slot.

Computing the proposed routing metric EXT involves recursions, which may be slow for multi-path computation for all possible S-D pairs. Hence we propose three routing metrics, which are faster to compute. 1) Sum of node distances (SumDist). The success rate of a channel decreases exponentially with the physical distance .

Hence SumDist can partially reflect the difficulty of a path. 2) Creation Rate (CR). CR is computed as , where is the success rate of any channels on the -th hop of the path. 3) Bottleneck capacity (BotCap). From Figures 5 and 4, the path width has greater impact on the path quality. The BotCap metric is , prefers wider path over narrower path, and uses the CR to order paths with the same width.

We consider the routing metric as a design parameter, and their efficiency is compared in § 6.

For each possible S-D pair, the server running the offline algorithm will use Yen’s algorithm to get paths (offline paths) for the pair, and tell each node in the network about the resulting paths. And will grow by 50% percent next time if the paths are not enough for the pair. An example is shown in Fig. 7(a), the offline algorithm finds and as two paths.

#### 4.2.3 P2 algorithm of Q-PASS

The P2 algorithm runs on each node locally. The inputs are all the offline paths (known before this time slot) and the S-D pairs received in P1 , where is an S-D pair . The outputs are an ordered list of selected paths , each of which connects a single S-D pair. On the output, the local qubit-to-channel assignment and entanglement are performed on related nodes to build the links on these paths. Since and are globally known for all nodes, the output is also consistent on different nodes, similar to the global consistency of classical link-state routing.

The algorithm consists of two steps. 1) The paths computed from the offline algorithm for the current S-D pairs are retrieved and put into a priority queue, ordered by the routing metric. Then from the path with the lowest routing cost, the channels and qubits of the nodes on each path are reserved exclusively for each path. If a path has width by the offline algorithm, but currently available resource can only support width , then the path is reinserted to the queue with an updated metric calculated from . If , there is no available resource for the path, it is inserted to the back of the queue. This process ends until no paths can be fully satisfied.

2) After step 1, the queue contains all unsatisfiable paths in the ascending order of the routing metric. The qubits and channels for the satisfiable parts of each path (partial path) are reserved in the order of the path in the queue. The partial paths can be used to recover link failures for the major paths selected in step 1. For the example of Fig. 7(b), is reserved as the major path but does not have enough resource. However, can be reserved as a partial path.

When the two steps finish, each node assigns its qubits to the corresponding channels and try to generate quantum links. For example, in Fig. 7(b) will assign one qubit to the channel to and another to the channel to .

#### 4.2.4 P4 algorithm of Q-PASS

In P4, each node swaps the qubits locally to connect the links on the path, if the path is connected according to its local link states. However, link failures happen randomly, and the P4 algorithm focuses on the failure recovery based on the recovery paths established in P2. The inputs of P4 algorithm are: 1) S-D pairs from P1, 2) a major path list and a partial path list from P2, and 3) the -hop link states of this node from P3.

We present two challenges of P4 algorithm: 1) the reserved paths may not always succeed because quantum links are probabilistic, and 2) after -hop link state sharing in P3, no classical communication is allowed between any pair of nodes because the entanglement links decay quickly.

We propose segment-based path algorithm. The major path list is traversed from beginning to end. For each visited major path , it is divided into segments, each with width : , , , , such that each node knows the whole link states on the segment(s) containing it. Then for each ‘unresolved’ failed link, recovery paths are found from the recovery path list, the mark the recovery path as resolved.

An example is shown in Fig. 7. Assume , and thus each node knows the link states of its 1-hop neighbors. The major path is divided into two segments and , such that all nodes on a single segment know this segment is successful or not. If not, they will try to use a recovery path. In this example, , , and know link - fails. Hence, the recovery path is taken by both and . The distributed recovery path selection is consistent because all recovery paths can be ordered deterministically. Recall that a local policy is used to achieve distributed consistency for each path: each node places an intern link between the link with the smallest ID to its predecessor and the link with the smallest ID to its successor. And it repeats this process until no intern link can be made for this path.

### 4.3 Q-CAST: Contention-free pAth Selection at runTime

The offline algorithm in Q-PASS has two fundamental disadvantages. 1) Since it does not know the actual S-D pairs when the paths are used, it has to compute the paths for all pairs. 2) Besides the high computation cost, one more significant problem is that the computed paths may have severe resource contention. In Fig. 8(a), and are two S-D pairs. The offline algorithm of Q-PASS finds 25 paths for , all passing by any of the , then a single path for may take all available qubits on , and all 25 offline paths of fail to be reserved in the residual graph, even though channels and qubits are available outside the offline paths. Due to unpredictable combinations of S-D pairs and hence the unpredictable residual graph after previously reserved paths, it is hard to pre-calculate paths for all S-D pair combinations.

Q-CAST does not require any offline computation and always finds the paths according to the topology and current reservations on qubits and channels.

#### 4.3.1 Algorithm overview

The workflow of Q-CAST is shown in Fig. 9. Q-CAST is a 4-phase algorithm, which does not require any offline computation. Q-CAST P1 and P3 are standard procedures similar to those of Q-PASS. Q-CAST P2 takes the input of the network topology and the S-D pairs. It finds and reserves paths one by one, *without resource contention*. Recovery paths are also selected deterministically in P2. P4 takes the outputs of P2 and the link states from P3 to compute the swapping decisions.

#### 4.3.2 P2 Algorithm of Q-CAST

The core task for Q-CAST P2 is to find multiple paths based on the knowledge of S-D pairs, and the paths are contention-free on qubits and channels. Yen’s algorithm [kshort] does not satisfy the requirement because its output paths are highly overlapped. Note, Q-PASS uses Yen’s algorithm to find offline paths because the resulting overlapped path naturally provides small detours as recovery paths for major paths. We propose to search multiple contention-free paths for online S-D pairs using a greedy algorithm, which runs as follows. Step 1) For every S-D pair, it uses the EDA (described later) to compute an optimal path in terms of the routing metric EXT between this pair. Step 2) Among the optimal paths of all S-D pairs, it selects the path with the highest EXT and reserve the resource of this path. Then the residual graph is computed by removing the reserved resource. 1) and 2) are repeated with the residual graph until no more path can be found, or the number of paths exceeds 200 – a value to bound the number of paths in order to avoid unnecessary computation. We call this algorithm as Greedy EDA (G-EDA).

The above process aims to maximize the network throughput but does not consider fairness among S-D pairs. We will discuss how to balance throughput and fairness in a later section, which could be a future research topic.

The optimal routing metric. To find the optimal path under the EXT metric in a quantum network, the classical Dijkstra’s algorithm fails because it only finds the shortest path when the routing metric is additive. Here, ‘additive’ means the sum of the costs of all edges on the path is exactly the cost of the whole path. Obviously the ETX computed by Equation 1 is not additive.

We propose the Extended Dijkstra’s algorithm (EDA) to find the highest-ETX path in EXT between any S-D pair. The highest-ETX path gives the maximum evaluation value among all possible paths between the S-D pair, with respect to a path quality evaluation function . The input of is a path .

Similar to the original Dijkstra algorithm, EDA also constructs an optimal spanning tree rooted at the source node . At the beginning the *visited set* only includes . The evaluation value from to an unvisited node is set as 0 or the evaluation value of the edge if and are neighbors. Each time, the node with the maximum evaluation value to is added to the visited set and the evaluation values from to any other node are updated if and are neighbors. The algorithm stops when the destination is visited.
Different from the original Dijkstra algorithm, updating each evaluation value may cause the re-calculation of the evaluation function of the entire path, rather than simply adding the cost of a link. Though the updating may be complex, one optimization can be applied. If the path with hopcount and width grows by one hop and the new edge has at least width , the width of the new path stays unchanged to be . The algorithm needs to calculate and is a recursive function. The original value of in calculating can still be re-used, which significantly reduce the complexity of such recursion.

We skip the proof of the correctness of EDA due to space limit. Its correctness rely on a fact that the evaluation function of a path should monotonically decrease when extending to a longer path by adding another node at the end of . Since we use as the evaluation function, we explain the monotonicity of without a strict proof. As the grows, may stay unchanged or decrease because the new edge may be narrower than . In addition, adding one more hop will increase the risk of failure of the path. Hence, adding one hop means no wider path width and more hops to be transmitted, none of which can increase .

Bound the path length. We set the upper-bound threshold of the path hopcount to ensure bounded path searching in EDA. During the EDA, for any path with hopcount larger than , the path is ignored because it is unlikely to be a good path. The value of can be determined at system initialization. For a new network , 100 pairs of nodes are randomly selected. Then, multipath routing is performed via G-EDA for each pair. The largest hopcount of the resulting paths whose is set to be .

Recovery paths. After finding the paths via G-EDA (denote as major paths), the remaining qubits and channels can be utilized to construct recovery paths, each of which ends at two nodes (denote as switch nodes) on a single major path.

The switch nodes should be no more than hops away on a major path, where is the link state range, because in P4 the two nodes should ensure

consistent swapping decisions.

The recovery paths are found as following. For every node on a major path, we use EDA to find recovery paths between and in the residual graph, where is another node that is hop away on the major path and is a small constant parameter. When all nodes are processed, the algorithm will run further iterations for the recovery paths that covers hops on the major path, for to . In Fig. 10(a), the major path is and three recovery paths are found.

Every node will assign its qubits based on the reserved major paths and recovery paths, without any qubit/channel contention.

#### 4.3.3 P4 Algorithm of Q-CAST

In P4, each node knows the major paths, the recovery paths, and the -hop link states. It then makes the swapping decisions locally. The challenges for Q-PASS P4 still present for Q-CAST P4: probabilistic link failures and no interactive communication between nodes is allowed.

We propose an exclusive-or (xor, ) based algorithm to recover from potential link failures. We define the xor operator of two set of channels : . As both ends (switch nodes) of a recovery path are on a single major path, we can always find a sequence of nodes between the two switch nodes on the major path. This node sequence together with form a loop in the network graph, called a ‘recovery loop’. Then, the link recovery algorithm works as following. The major path list is traversed from beginning to end. Each visited major path is treated as separated 1-paths. For each 1-path, nodes find a set of recovery paths for failed links, such that the xor result of the major path and the recovery loops contains no hops on the failed links. To break the tie, shorter recovery paths are preferred. For example, in Fig. 10(a), and both find that the major path disconnects at edge . Also, both of them know that there are two recovery paths that can cover , namely the one from to and the one from to . Hence the shorter one from to will be used, because shorter paths are likely to succeed than the long ones. still swaps qubits on the major path and switches to the recovery path.

The recovery algorithm is different from that of Q-PASS is because each recovery path in Q-CAST is dedicated to a single major path.

## 5 Time and space costs

We denote the number of S-D pairs as , and the maximum width of paths as , which is determined by node capacities and edge widths. We denote the maximum number of paths as in EDA. The number of nodes is . We summarize the results here and some details together with the pseudocode can be found in the Appendix.

Cost of routing metric evaluation.

The time cost to calculate for a ()-path according to Equation 1 is , and the space cost is .

Cost of P2 algorithm of Q-PASS.

The time cost is and the space cost is .

Cost of EDA. The time cost for EDA is . The space cost is .

## 6 Performance Evaluation

### 6.1 Simulator Implementation

We implement the proposed network models and algorithms on a custom-built time-based simulator, with additional supports for topology generation, statistics, and network visualization. We do not use packet-based simulation because quantum networks do not use packet switching.

As shown in Figures 12 and 12, the visualization tool shows the network topology, current qubit/channel occupation, and existing quantum links at simulation runtime, for protocol analysis and demonstration.

The repository of the simulator is found on the anonymous link [QuantumCode] and will be open to public for researchers to work on quantum network research.

We do not assume any specific topology and randomly generate quantum networks for simulations. We set the area holding quantum networks is a 100K units by 100K units square, each unit may be considered as 1KM. As the routing performance relies on the channel success rates rather than the length, we are not losing any generosity here. The network generation algorithm requires three input parameters: the number of nodes , the average number of neighbors , and the average success rate of all channels . Nodes are randomly placed and the distance of any two nodes is at least units. The edges are generated following the Waxman model [Waxman] that has been used for Internet topology generators [brite].

After the topology generation, a binary search on the model parameter is further carried out to make the average channel success rate to be . The number of qubits for each node is independently uniformly picked from 10 to 14. The edge width is independently uniformly generated from 3 to 7, for each edge. We pick the range for and based on our conjecture of a well-functioning quantum network. Our designs should work on wider ranges, which we cannot cover due to enormous possibilities.

### 6.2 Methodology

We evaluate the throughput, scalability, and fairness of the proposed entanglement routing algorithms. To gain the insight of the performance metrics and to provide reference for future research, we show more simulation statistics: the resource efficiency towards high throughput, the contribution of recovery paths for both algorithms. Each data shown in the section is the average from 10 different network topologies.

We let the number of nodes vary in set , average channel success rate vary in , internal link success rate vary in , link state range vary in , average degree vary in , and the number of S-D pairs vary from 1 to 10. To control variable, we show the results under the reference setting , unless explicitly changed to observe the data trend. For each setting of , 10 random networks are generated, and we simulate 1000 independent time slots on each of the network.

We compare Q-PASS and Q-CAST with two existing routing algorithms that have been used in quantum network studies: single-link multipath routing (SLMP) [RoutingEntanglement] and greedy routing [GreedyRoutingQuantum]. Note the studies of [RoutingEntanglement] and [GreedyRoutingQuantum] are limited to special topologies such as circular or grid networks. Our results are the first to evaluate these algorithms on generalized topologies.

### 6.3 Evaluation results

Throughput. Figures 16, 16 and 16 show the CDF of throughputs for Q-PASS, Q-CAST, Greedy, and SLMP, under the reference setting. The throughput results are calculated in terms of ebits per time slot (eps). The BotCap, CR, and SumDist are the routing metrics for the Q-PASS, and they are shown separately for better comparison. Despite the multipath routing, SLMP shows the lowest throughput because of the unreliability of a single channel/link. It fails to deliver any ebits in 10 percent of the time slots, and for 90 percent of the time slots, the total throughput between 10 S-D pairs are less than 5. The Greedy enjoys a high throughput, and for more than 90 percent of the time, it delivers more than 15 ebits for 10 random S-D pairs. For Q-PASS, all the three metrics of it exhibit similar throughput, and the the CR metric gives the highest throughput among all metrics, which delivers about 2 eps more than the Greedy. Q-CAST shows great advantages over all other algorithms and outperforms the CR about 5 eps. Q-CAST is also the most reliable because it seldom delivers less than 5 eps. Since CR is slightly better than other metrics, we use CR to represent Q-PASS in the following results.

Vary link state range. In P3, each node shares its link states with its -hop neighbors, and hence, influences the path recovery performance. Fig. 16 shows the average throughput on different . The Greedy algorithm does not rely on and is shown for reference. contributes little to the overall performance because most path failures are just one hop -, which can be recovered by and with their own link states. is sufficient for Q-CAST, and larger slightly degrades the throughput because longer and more unreliable recovery paths may be selected. This would occupy the routing resource which could have been allocated to other shorter and more reliable recovery paths.

Vary link success rates. Figures 20 and 20 show the average throughput of Q-PASS, Q-CAST, Greedy, and SLMP on different quantum device abilities by varying the average channel success rate and swapping (internal link) success rate. When the channel success rate or the swapping success rate is small, the overall throughput will be degraded. A robust routing algorithm should still perform well on low ability networks. From the figures, the swapping success rate also has big impact on the average throughput, because the link failure in the P2 can be mitigated by the recovery algorithms in P4, but there is no circumvention for swapping errors. And the Q-CAST performs the best among the four algorithms.

Scalability. We evaluate the scalability of routing algorithms on two dimensions: the size of the network and the number of concurrent S-D pairs . A larger network means the average distance of S-D pairs is longer; and more concurrent S-D pairs in one time slot introduce higher level of resource contention. Fig. Figures 20 and 20 show the average throughput on the two dimensions. All algorithms exhibit a logarithmic throughput decrease with the number of nodes in the network. Q-CAST outperforms others on all network sizes, and the throughput of Q-CAST is as high as 7.5eps when the network contains 800 nodes. The reason of lower throughput in larger networks is because the average path length is longer for the S-D pairs. Longer paths are more likely to fail in quantum networks. Besides, the throughput of all algorithms grow sub-linearly with the number of S-D pairs, due to resource contentions. Q-CAST outperforms others on most settings, and the advantage of Q-CAST over other algorithms grows rapidly with the number of S-D pairs. It is because Q-CAST actively resolves the resource contentions for the S-D pairs.

Fairness. Though we aim to maximize the throughput in the current designs, the fairness among the S-D pairs are evaluated. Fig. 24 shows the average number of successful S-D pairs under different number of concurrent requests. For a time slot, a S-D pair is successful (epair) when they establish at least one ebits after P4. Q-CAST outperforms others and all algorithms grows sub-linearly. Fig. 24 shows the CDF of the number of paths allocated to every S-D pair. A -path is counted as separate paths. As a base line requirement, any S-D pair should be allocated at least one major paths, which is fulfilled by all algorithms. The SLMP is the most fair. The Q-CAST has a turning point on the CDF figure, which means 40 percent of S-D pairs are allocated less than 9 paths, and the other pairs are allocated 10 to 14 paths, which is very fair. The Q-PASS is the most biased algorithm.

Recovery paths. We evaluate the contribution of recovery paths to the overall throughput for both Q-PASS and Q-CAST, by comparing their throughput with that of their recovery path-free versions Q-PASTR and Q-CASTR. The results are shown in Fig. 24. The recovery paths contribute about 0.5eps to Q-PASS and 1eps to Q-CAST. We further show the average number of occupied channels in one time slot for Q-CAST, Q-CASTR, and Q-PASS in Fig. 24, where the -axis show the throughput of each case. Q-PASS is not shown in this figure because it takes way more channels in the recovery paths and the results are not in this range of -axis. Q-PASSR takes times less channels compared with Q-PASS, and Q-CASTR saves 25% channels from the 400 channels taken by Q-CAST.

As the recovery paths are contention-free for Q-CAST, more interesting statistics are collected on Q-CAST recovery paths. The CDF of the width of recovery paths is shown in Fig. 26. The recovery paths can be wider when the number of S-D pairs is small, because of the low resource contention between S-D pairs. For most cases, the widths of recovery paths for a single S-D pair is larger than those of the 10 concurrent S-D pairs by 2. Besides, the CDF of total number of recovery paths of a single major path is shown in Fig. 26. In larger networks, the major paths are longer and more recovery paths can be found.

Summary of evaluations. Q-CAST exhibits much higher throughput, robustness, and scalability than other routing algorithms. SLMP has much lower overall throughput and Greedy’s throughput is between SLMP and Q-CAST.

Q-PASS also shows good throughput and the metric CR provides the highest throughput for Q-PASS. If the minimum resource utilization is a concern for some quantum networks, recovery paths for both algorithms can be disabled for best efficiency. Q-CASTR is a good balance between throughput and resource efficiency.

## 7 Discussion

Better fairness. The algorithms proposed in this paper aim to maximize throughput, and each time slot is considered totally separately. A simple extension, however, is available to both Q-PASS and Q-CAST to provide better fairness while maintaining high throughput. For any S-D pair that has failed to share an ebit in a slot , the pair and the failing streak are broadcast to all nodes in P1 in the slot . The routing metric of all paths connecting this S-D pair is multiplied with a factor such as , which means their paths are slightly over-evaluated, and thus are more likely to be selected. If the pair still fails, the failing streak increases to a higher factor such as 2, and the related routing metric is multiplied with in . Eventually, this pair will succeed.

Prioritized routing. Both Q-PASS and Q-CAST are extendable to support simple prioritized routing. Suppose S-D pairs are in different priority classes, identified by the number , and the priority is ‘hard’ – a single S-D pair in priority class is far more valuable than all S-D pairs in priority class and lower. In P2 of Q-PASS and Q-CAST, the offline paths (only Q-PASS) and online paths (both algorithms) of the highest priority S-D pair are selected until no more path is available. More paths are then selected in the residual graph for S-D pairs in lower priority class. The P4 of Q-CAST is not modified because the selected paths have no contention. In P4 of Q-PASS, the paths of the highest priority S-D pair are recovered first.

Continuous model. The time slot model used by this work is called the on-demand model in [GreedyRoutingQuantum, RoutingEntanglement]. The continuous model is proposed in [GreedyRoutingQuantum], which assume a quantum link established in previous slots and possibly be used in later slots. Under the continuous model, failed links can be retried throughout multiple time slots while holding the rest of the path, until every link on a path is successful. Then the path is built via quantum swapping. However, this approach only works for a single S-D pair. If concurrent S-D pairs exist, routing may easily fail because some links are occupied by the holding paths, unless there is global link state broadcast that causes high communication cost and long latency.

We consider the continuous model as another direction which requires a co-design of the network topology and the routing algorithm.

## 8 Conclusion

This work presents a new entanglement routing model of quantum networks that reflects the difference compared to classical networks and new entanglement routing algorithms that utilize the unique properties of quantum networks. The proposed algorithm Q-CAST increases the network throughput by a big margin compared to other methods. We expect more future research will be conducted to the entanglement routing problem and could contribute to the success of quantum networks.

## References

## Appendix A Appendix

### a.1 Finding the optimal path selection for Q-CAST

We summarize the hardness of the multiple contention-free path selection problem without classifying it into a certain complexity class, and show its hardness in three examples. On one hand, because of the resource constraints (qubits/channels), path selection depends highly on the link states and hence the search space is much more than the classical algorithms which only depends on the weighted graph while edges and nodes have unlimited capacity; on the other hand,

is non-linear, which invalids many existing proofs based on the linear additivity of the routing metric and thus degrades the efficiency of classical algorithms.Example 1. Despite its good performance (shown in § 6), we prove G-EDA is not the optimal. An example graph is shown in Fig. 27 ^{2}^{2}2Red path: . Green path: . Blue path: .. Suppose all the edges have width 3, all channels have creation rate , the swapping success rate , and have qubit capacity 6, and all other nodes have capacity 3. Then the optimal contention-free paths are the blue path plus the green path. But the G-EDA will output only the red path. The reason of the failure of G-EDA is it falls in a local minimum and fails to give the max-flow – the width of the red path is 3, as opposed to 6 for the blue path plus the green path.

Example 2. Though the classical max-flow algorithm gives the optimal solution, it performs worse than G-EDA in some other cases. Consider the same topology in Fig. 27 with changed parameters. Suppose all blue and green edges have width 1, red edges have width 2, all channels have creation rate , the swapping success rate , and have qubit capacity 3, and all other nodes have capacity 2. From Fig. 5, we know when , one -path is better than three -paths. Hence, the optimal solution is the red path with , which can be found via G-EDA. The max-flow algorithm, however, gives the green path, the blue path, and the red path – all paths are single – which is the sub-optimal solution.

Example 3. Due to the enormous search space, we failed to find the optimal strategy via brute-force even in a 10-node network. Suppose , every node has 15 qubits and 6 edges, and each edge is composed of 5 quantum channels. In the brute-force searching, we do not assume the P2 and P4 are carried out based on ‘paths’, but just try all possible assignments of qubits to channels, perform the swapping, calculate the between the given S-D pair, and record the highest result. For any S-D pair, the search space for P2 is ^{3}^{3}3This number is got via a recursive algorithm instead of mathematical derivation. Consider the number of unique combinations of 15 indistinguishable balls put into 6 different buckets, each with capacity 5. . Even worse, the quantum swapping in P4 depends on local states, which is prohibitively hard to enumerate all possible swapping combinations.

### a.2 Pseudocode for P2 algorithm of Q-PASS

The pseudocode for P2 algorithm of Q-PASS is shown in Alg. 1. We define a function , whose input are a path and current qubit capacity of all nodes, and output is the width of the path.

### a.3 Pseudocode for EDA

### a.4 Time and space cost analysis

To avoid unbound computation and space cost in P2, we set the maximum number of multipath . We set the maximum path hopcount according to the network itself. For any input , 100 S-D pairs are randomly selected, and then multipath routing is performed via G-EDA between each S-D pair. The largest hopcount of selected paths whose is the maximum hopcount of all selected paths. We denote the number of nodes as , the number of S-D pairs as , and the maximum width of paths as , which is determined by node capacities and edge widths.

#### a.4.1 Cost of routing metric evaluation

The calculation of can be performed by following the recursive formula set 1. For an -hop path with width , the calculation of goes as following. Iterate on , from 1 to and further iterate on , from to : calculate , , , , and . Five -element arrays are allocated to store the values. After that, is calculated in time. Hence, the time cost is , and the space cost is .

#### a.4.2 Cost of P2 algorithm of Q-PASS

The initialization costs time. The double-for loop costs time. The while loop costs time. Hence, the overall time cost is .

Each of the , , and costs space, the costs space, the costs space. Hence, the overall space cost is .

#### a.4.3 Cost of EDA

For a classical network , the Dijkstra’s algorithm costs time because the dequeue operation costs time, the reorder operation of the Fibonacci heap costs time, and each edge is visited at most once. Similarly, the time cost for EDA is . The space cost is .

Comments

There are no comments yet.