A Quantum Router Architecture for High-Fidelity Entanglement Flows in Quantum Networks

The past decade has seen tremendous progress in experimentally realizing the building blocks of quantum repeaters. Repeater architectures with multiplexed quantum memories have been proposed to increase entanglement distribution rates, but an open challenge is to maintain entanglement fidelity over long-distance links. Here, we address this with a quantum router architecture comprising many quantum memories connected in a photonic switchboard to broker entanglement flows across quantum networks. We compute the rate and fidelity of entanglement distribution under this architecture using an event-based simulator, finding that the router improves the entanglement fidelity as multiplexing depth increases without a significant drop in the entanglement distribution rate. Specifically, the router permits channel-loss-invariant fidelity, i.e. the same fidelity achievable with lossless links. Furthermore, this scheme automatically prioritizes entanglement flows across the full network without requiring global network information. The proposed architecture uses present-day photonic technology, opening a path to near-term deployable multi-node quantum networks.


INTRODUCTION
Quantum networks distribute quantum information to enable functions that are impossible on classical networks. Key to these applications is the sharing of entanglement between many users over large distances, allowing quantum key distribution, distributed quantum computing, and quantum-enhanced sensing. While entanglement distribution has been demonstrated over short distances [1], long-distance quantum networking is hampered by the exponential loss of photons in optical fibers [2]. Quantum repeaters [3] can overcome this problem by forming chains of entangled nodes. Figure 1a shows a schematic of such a repeaterconnected quantum network. A graph of quantum repeaters connected by quantum links forms the backbone of the network. Client nodes are quantum computers that connect to the network through their nearest repeater node, while repeater nodes facilitate the sharing of entanglement between clients. Hidden under the link layer abstraction [4] lies a physical layer of repeater devices and lossy quantum channels, the components of which are illustrated in the Figure. A typical repeater device, shown in Fig. 1b, consists of a memory capable of generating and storing entanglement with a photonic mode. The entanglement scheme used in a link between two repeater nodes determines the devices and channels used in the physical layer. Nitrogen vacancy (NV) centers in diamond have been entangled at a distance of 1.3 km [1] using the emission-based scheme proposed by Barrett and Kok [5], which uses a 50:50 beamsplitter to erase whichpath information and detectors to herald entanglement. A related scheme proposed by Cabrillo [6] was used to * englund@mit.edu provide on-demand entanglement between NV centers using a phase-stabilized fiber link [7]. Recently, the directtransmission (PLOB) bound [2] for quantum communication was broken [8] using a scheme proposed by Duan and Kimble [9], which relies on scattering photons from spins in high-cooperativity cavities. These protocols are all inherently probabilistic, such that a single attempt at distributing entanglement succeeds with probability p distant .
The latency due to two-way communication for entanglement distribution in first-generation repeater networks forms a bottleneck that can be resolved by multiplexing of many quantum memories at each repeater node [10]. To overcome this problem of latency, Ref. [11] introduced a multiplexing scheme that is restricted to cavity-based entanglement protocols. Alternatively, Ref. [12] proposed a scheme that is compatible with emission-based protocols, but does not maintain the fidelity of entanglement distribution. Previous papers considered switching to improve quantum key distribution rates, but have not quantified the effects of local connectivity on infidelities [13][14][15]. Here, we introduce a quantum router scheme that uses multiplexing and all-to-all conditional local switching to increase entanglement fidelities and maintain entanglement rates for leading memory types and entanglement protocols. Our router architecture bears similarities to the quantum key distribution protocol introduced in a contemporaneous proposal by Trényi and Lütkenhaus [16], but our paper considers spin-photon implementations of quantum repeaters in general quantum networks.
The router uses local, low-loss connections to link different users' entangled qubits, thereby establishing entanglement across the channel. This quantum router architecture is motivated by recent advances in integrated photonics, with demonstrations of fast and low-loss onchip switching [17] of many photonic modes and the inte- Components of a quantum repeater network. The quantum network comprises client nodes, which end users directly access, and repeater nodes, which connect clients by propagating entanglement through the network. (a) Physical layer implementation. In the physical layer [4], repeater nodes may be connected by a variety of entanglement protocols. While all protocols require transmission of an entangled photon though a photonic channel, the specific protocol used in each link determines the physical configuration of these channels (e.g. optical fibers) and measurement devices associated with that link. Possible protocols include the cavity-mediated Duan-Kimble protocol [9] and the photon emission-based Barrett-Kok [5] and Cabrillo [6] protocols. These latter protocols employ an intermediate detector station between nodes to herald successful entanglement. (b) Components in a repeater node. We classify repeater nodes based on the number of other nodes they connect to: a 4-way and a 3-way repeater are labeled. All adjacent repeater nodes are connected by quantum and classical channels (shown explicitly in black and light red respectively). (c) Detector station used in the photon emission-based protocols to herald entanglement. gration of quantum emitters with integrated circuits [18].
In comparison with previous works, our proposed quantum router architecture is compatible with any entanglement generation protocol and quantum memory in the physical layer. Furthermore, our architecture extends naturally to chains of routers; in fact, we show that if brokered entanglement is used, the router can redirect entanglement flows to minimize latencies using only local information. We demonstrate these benefits by comparing the router architecture with a standard multiplexed architecture in which entanglement between users is generated serially [19,20], exploring the various impacts on repeater performance.

Router Architecture
We analyze the performance of our quantum router architecture for the NV center in diamond as the qubit platform and the Barrett-Kok [5] scheme as the entanglement protocol. However, our architecture is agnostic to the specific physical memory and entanglementgeneration protocol.
In Fig. 2, we show the connectivity between photonic and stationary qubits in (a) a standard multiplexed repeater considered for diamond color centers [19], and (b) a multiplexed repeater with a router. In this representation, each qubit register within the router is linked by a distinct mode to a corresponding register at an adjacent neighboring node, here labelled left and right for generality. Different modes are shown separately, though they may be transmitted through the same physical channel, for example via temporal or spectral multiplexing. Each qubit register comprises a single NV center with two physical qubits: one electron spin (dark red), which can be used for optically-mediated entanglement, and one nuclear spin (light red), which has no optical transition but which can use spin-spin interactions to couple to and store quantum information from its local electron spin. This enables the use of 'brokered entanglement' [21], where the electron spin serves as a short-term 'broker' of entanglement to the longer-term 'storage' qubit of the nuclear spin.
In the routerless architecture (Fig. 2a), each of the m qubit registers first establishes entanglement with the left neighboring node via its electron spin and the corresponding optical mode. Letting p distant be the success probability of one entanglement generation attempt, the process takes an average number of attempts 1/p distant . Once successful, this entanglement is swapped to the nuclear spin for storage, at which point the electron spin at- FIG. 2. Abstract representation of a 2-way standard repeater and a 2-way router in a quantum network. Each repeater node hosts m qubit registers, each of which here is formed by an NV center in diamond comprising a optically active electron spin (dark red) coupled to a long-coherence nuclear spin (light red), where the former serves as a broker to store entanglement in the latter. Multiple optical modes can be transmitted through the same physical link, e.g. via temporal or spectral multiplexing. (a) Standard routerless repeater. In a standard repeater, each qubit register has lossy quantum links to registers at adjacent network nodes on both the left and the right. (b) Router. In our router architecture, each qubit register has lossy links to only one of the left or right neighbors; however, the repeater node contains local, low-loss quantum channels that enable entanglement generation between all registers in the left bank and all registers in the right bank. As a result, the mean time a storage qubit must idle t idle while holding entanglement is shorter with a router. The idling time depends on t distant (the network clock period), t local (the local clock period), p distant and p local (the probability of generating entanglement over a distant and local link respectively).
tempts to establish entanglement with the right neighbor, again requiring an average of 1/p distant attempts. Thus, the nuclear spin must idle while storing entanglement for an average time t idle ∼ t distant /p distant , where t distant is the time needed per attempt of the entanglement protocol, typically limited by the round-trip communication time between the repeater and a detector station. Once this succeeds, a Bell state measurement (BSM) on the joint electron-nuclear spin state teleports entanglement to be shared between the left and right nodes. This protocol is performed simultaneously and independently on each qubit register.
In contrast, our router architecture (Fig. 2b) defines two 'banks' of registers, one with m 2 registers with optical links to the left, the other with m 2 registers with optical links to the right. The router connects these two banks using a low-loss m 2 × m 2 switchboard, over which entanglement protocols succeed with probability p local p distant . In this architecture, each qubit register first establishes entanglement with either the left or the right, as determined by their optical connectivity. As in the routerless case, each link requires an average of 1/p distant attempts before succeeding, after which these 'successful' registers will then swap entanglement to their nuclear spin. At this point, any successful registers enter a 'pairing' stage where registers in opposite banks are paired up and subsequent clock cycles attempt entanglement between electron spins in these pairs. This requires an average number of attempts 1/p local , taking a time t idle ∼ t local /p local ; here, the local clock period t local is likely dominated by any state initialization required by the entanglement protocol. Any successful but unpaired registers idle, waiting for a successful partner on the opposite side to become available. Once entanglement is formed within a pair, two electron-nuclear spin BSM's -one at each register -teleport entanglement to be shared across the full leftright link. Figure 3 compares the timeline of activity for a router and a standard repeater. Even though the router requires an additional 'pairing' stage, this stage requires a negligible amount of time compared to the time needed for a distant entanglement attempt t distant , so the router and the standard repeater can have similar clock cycles. Moreover, the router uses the entanglement with its neighboring nodes more quickly than the standard repeater does, so the router reaches its steady-state rate in a smaller number of clock cycles than the standard repeater.
This router architecture has two primary advantages even at steady state. First, the idling time t idle that a storage qubit must hold entanglement can be greatly reduced, decreasing errors due to decoherence. Second, the number of entanglement attempts a register must make while its storage qubit holds entanglement is reduced by a factor p local /p distant , thus sharply reducing the storage-qubit decoherence due to broker-qubit entanglement attempts. In the remainder of this article, we quantitatively examine the impact the router has on the steady-state performance of a quantum network.

Simulations
We use the NetSquid discrete event simulator [22] to compare the performance of repeaters with and without a router, computing the average rate and fidelity of entanglement distribution for a one-repeater network. In this network, a single repeater station connects Alice and Bob, as shown in Fig. 2 where Alice is the 'left node' and Bob is the 'right node'. We compare each architecture using the same number of total NV qubit registers m at the repeater, under the assumption that qubit registers will be a scarce resource in near-term quantum networks. We choose the emission-based Barrett-Kok protocol [5] for our entanglement protocol. The physical parameters of our repeater memories correspond to a realization using photonic integrated circuits discussed below, using experimentally-realized values reported in the literature (see Supplementary Note 1 for details). Figure 4b plots the entanglement distribution rates for both repeater architectures for various link distances as a function of the number of qubit registers m at the repeater node. For the routerless case, the rate scales linearly with m since the qubit registers operate independently. For low m, the router exhibits comparatively lower rates; however, as m increases, the difference between the two protocols decreases, such that in the limit of large m the two architectures perform comparably. This difference can be attributed to mismatches in the number of successful entanglements in Alice's and Bob's banks after a given clock cycle. The delay in resolving these mismatches, the number of which scales with √ m, lowers the rate of the router below the linear scaling of the routerless architecture. However, the fractional impact of this effect on the rate is reduced for large m, and the rate of the router approaches the routerless rate (see Supplementary Note 2 for a lower bound on the router rate).
Figures 4c-d plot the infidelity of the distributed entanglement for repeaters with and without a router. We consider three sources of infidelities in the distributed entanglement. The first source of infidelity is the typical depolarizing and dephasing noise experienced independently by the electron and nuclear spins, as characterized by their T 1 and T 2 coherence times. We model this noise on a qubit after time t as: For a repeater with no router, adding additional registers does not affect the amount of time an individual register must store entanglement; thus, increased multiplexing does not reduce this decoherence channel. However, for a repeater with a router, the number of registers has a dramatic effect on the fidelity. This observation can be understood by considering the mean idling time for a memory in this scheme, which is determined by the number of clock cycles a given register in the Alice (Bob) bank must idle after establishing entanglement on its respective side of the link before a register in the Bob (Alice) bank also succeeds and is available for the pairing stage of the protocol. This maps to the success mismatch problem discussed earlier; as such, in the limit of large m, most successful registers will be paired with a register in the opposite bank with every clock cycle, such that the idling time approaches the duration of a single such cycle. In contrast, with no router, a register must idle for on average 1/p distant 1 cycles. Thus, the addition of a router reduces the infidelity from this channel by a factor that approaches p distant .
The second source of error stems from coupling between the nitrogen nuclear spin and the NV electron spin. In particular, each excitation of the electron spin used to generate spin-photon entanglement in the Barrett-Kok protocol generates noise that decoheres the qubit stored in the nuclear spin. We can model this interactioninduced noise on the nuclear spin as [19]: where the dephasing a ≈ 1/4000 and the depolarization b ≈ 1/5000 for NV centers. Note that for other systems with stronger electron-nuclear spin coupling such as silicon vacancy centers in diamond [23], this effect may be stronger. For both architectures, after a register has gen- erated one entanglement link, it stores that entanglement in the nuclear spin while its electron spin attempts to generate entanglement on the other side -either directly to Bob in the case with no router, or to the opposite bank when using a router. In either case, each failed attempt decreases the fidelity of the final Alice-Bob EPR pair. Without a router, the mean number of failed attempts is equal to 1/p distant ; with a router, this number is instead 1/p local , dramatically reducing the infidelity from this effect.
The third source of infidelity comes from imperfect two-qubit gates and electron spin readout. The proposed router needs to perform twice as many two-qubit gates and readouts for each distributed EPR pair as a standard repeater. The cumulative infidelity of these operations is independent of m, p distant , and p local . When the link between adjacent nodes is short, these operations dominate the infidelity of the Alice-Bob EPR pair, disadvantaging the router. However, when the link becomes lossier, the previous two sources of infidelity dominate, causing the router to increasingly outperform the standard repeater in entanglement fidelity (see Supplementary Note 3 for more details).
As a result, the router enables channel-loss-invariant entanglement fidelity; that is, regardless of the network link efficiency, the router can achieve fidelity that is limited only by the gates performed on the quantum memories and decoherence during a single round-trip transit of the network. A threshold is crossed as the number of entanglement attempts per clock cycle exceeds 1/p distant , where the average clock cycle produces at least one entanglement event on both sides of the router. This limits the decoherence a memory must endure to that of one clock cycle, and, for the case where the memory coherence time is much longer than the link round-trip time, allows all routers to realize a fidelity that is purely limited by the fundamental gates necessary to perform the protocol (initialization, swapping, measurement, etc.). This The average rates and infidelities are plotted, with the standard error of the mean shown as the error bars. The lengths (1km, 10km, 20km, 30km) refer to the distance L between the repeater node and the detector station. (a) Link layer representation of the simulated one-repeater network. (b) Steady-state entanglement rate against m. As expected, the rate of entanglement generation increases with the number of repeater qubit registers (m), as expected. The entanglement rate of the router architecture is slightly lower than the entanglement rate of the standard repeater, and the difference decreases as the size of the repeater increases. (c) Ratio of entanglement infidelity against m. The fidelity of entanglement generated by the router is higher than that of the standard repeater for sufficiently large distances L. The fidelity of entanglement generated by the router improves as m increases, whereas that of the standard repeater does not. This causes the infidelity ratio to decrease as m increases. (d) Router infidelity against m. As m increases, the router infidelity approaches a channel-loss-invariant value that only depends on local gate fidelities and the round-trip travel time.
asymptotic channel-loss-invariant fidelity is illustrated in Fig. 4d. While increasing the distance between adjacent nodes increases the round-trip time and thus the decoherence in one clock cycle, Fig. 4c shows that the asymptotic infidelity increases less than it would have if it were to depend on the channel loss as well.

DISCUSSION
Though the complete bipartite connectivity of routers may appear challenging to implement, a router can be added to a standard multiplexed repeater with relatively little physical resource overhead. Figure 5 illustrates one such realization using photonic integrated circuits (PICs). Quantum registers are integrated onto PICs that contain an array of Mach-Zehnder interferometers (MZIs) [24], forming a fast switching network to connect (a) Standard repeater realization. A standard (routerless) repeater can be constructed using an m × k switch that connects all m repeater registers with the k links that go to other nodes in the network. (b) Router realization. A router can be constructed using an m × (k + 2) switch. Photons emitted by the m repeater registers can travel to the k links that go to other nodes in the network, or they can be sent to a local detector station for local entanglement generation. (c) MZI implementation of k = 4-way, m = 8-register router. A k-way, m-register router can be implemented using an MZI array of depth log 2 (m 2 k/2), comprising a register routing layer (depth 2 log 2 (m/2)), an interposer for routing from local to distant connections (depth 1), a network routing layer (depth log 2 (k)), and a local BSM layer (depth 1). The ends of the MZI array are coupled either directly to detectors for the local BSMs or a frequency conversion stage followed by fiber links to distant detector stations for networking. All losses considered in our simulations are shown here.
any register to any output channel. For a standard multiplexed k-way repeater with no local connectivity, this requires an m × k switch to connect m repeaters to any of the possible k neighbors in the network, as shown in Fig. 5a. However, a router can be embedded in this architecture by extending this to an m×(k+2) switch. The additional two ports lead to a detector station as shown in Fig. 5b, thus enabling photon-mediated entanglement between any two registers in the repeater. Since typical single photon detectors have dead times of a few tens of nanoseconds, a single pair of detectors could facilitate many attempts at local entanglement in a single repeater clock cycle, which may be hundreds of microseconds long depending on the length of the link being connected. The additional complexity involved in adding these two additional channels is small, making this approach an attractive option for implementing all-to-all local connectivity.
On a PIC, the m × k switch required for the routerless repeater can be realized on an MZI array of depth log 2 (m) + log 2 (k) [25]. However, this architecture does not permit simultaneous routing from multiple memories, which is desired for the local entanglement operations used in the quantum router. In Fig. 5c we present an architecture that permits arbitrary m × k routing for connecting registers to the network, allows simultaneous routing from two memories to perform Bell state mea-surements for local entanglement generation, and maintains O(log m) scaling of the array depth. The addition of a one-MZI interposer permits routing between the network and a Bell state measurement setup for local entanglement generation (see see Supplementary Note 4 for more details). The simulations presented in Fig. 4 utilize this architecture assuming an aluminum nitride (AlN)-based photonic chip; alternative implementations include using silicon nitride (SiN) [26] or lithium niobate (LN) [17]. The control requirements for such large MZI arrays are similar to those required by and demonstrated for optical neural nets [27] and programmable photonic circuits [28,29], allowing us to take advantage of this existing technology for our router. Additional improvements include integrating detectors on-chip [30] to eliminate the off-chip coupling inefficiency for local measurements and integrating the frequency conversion stage on-chip, which is feasible in highly nonlinear materials such as LN [31].
This platform is an attractive path for realizing recent proposals for on-chip polarization-to-spin based networking [32]. The PIC implementation presents an additional benefit if the links to Alice and Bob have different transmissivities. Since both the rate and fidelity of entanglement distribution are limited by the difference in the time needed to establish entanglement with both Alice and Bob, the repeater in Fig. 2b (with equal numbers of registers in the Alice and Bob banks) will be limited by the lossier side. In contrast, the PIC implementation allows dynamic allocation of registers to Alice and Bob to balance the rates of entanglement generation. This optimizes the entanglement rate by effectively increasing the multiplexing on lossier ports, and optimizes the entanglement fidelity by preventing a build-up of idling registers on a lower-loss port. Dynamic memory allocation is also of great importance for managing entanglement flows in general 2D quantum network geometries [33][34][35].
The router architecture has additional advantages in multi-repeater quantum networks. The high local connectivity of the router enable chains of repeaters to automatically connect the longest available entanglement links, favoring the generation of a single EPR pair shared between distant nodes over that of multiple EPR pairs shared between relatively proximate nodes. Specifically, the first-in, first-out behavior of a router guarantees that entanglement will always grow from the longest established chain. In contrast, even if we allow adjacent standard repeaters to have all-to-all connectivity between registers in adjacent nodes (e.g. by spectral shifting or time bin reordering), there is no guarantee that the longest links will be generated first.
This behavior is illustrated in Fig. 6, which compares the dynamics of a standard network and a router network under similar scenarios. Before each clock cycle, a repeater or router will determine which links to attempt on the subsequent clock cycle given the current link state. An example is shown in Fig. 6a. If we further allow the standard repeater to have knowledge of the global network state, it can adjust its transmission sequence to prioritize a longer link, e.g. by attempting to entangle registers B5 and C6 (instead of B5-C5 and B6-C6). In contrast, the router does not require any information about the network state; each register simply attempts entanglement with a fixed partner in a neighboring node. Figure 6b shows a possible network state after the entanglement attempts in a clock cycle. Each router uses local entanglement and Bell state measurements to connect its left and right banks of registers. Following a first-in-first-out strategy, it connects the first available entangled register in the left bank with the first available entangled register in the right bank, and repeats until only unentangled registers remain in one of the banks. Using only local information, the router network thus automatically connects as many long links as possible, as demonstrated by the link state in Fig. 6c. On the other hand, the standard repeater may not be able to connect long links even if there are enough successful entanglements to do so. As a result, the state of the standard network after this time step yields some long links, but also many singular short links that cannot be merged.
The router's strategy reduces the idling time between local entanglement generation and the delivery of this entanglement to the end users, thereby increasing the fidelity of the delivered entanglement. We highlight that this router behavior is realized without any need for knowledge of the global network state. In a true deployed network, communication latencies prevent individual nodes from knowing the state of the total network in real-time, making the router's ability to optimize fidelity with local-only information all the more notable.
In conclusion, we have addressed a critical problem in quantum repeater architectures: minimizing memory latencies to maintain entanglement fidelity across repeater networks. Specifically, the quantum router architecture enables entanglement fidelity that is invariant to the channel losses in the network. Our architecture applies to leading entanglement protocols and automatically prioritizes entanglement flows using only local information. An important next step will be to exploit the local connectivity for entanglement distillation [36] and local error correction [37] to further improve the fidelity of generated entanglement. In this way, the entanglement rate can be traded for entanglement fidelity, without modification to the router architecture. While the above analysis considered NV centers in diamond, the architectural benefits should apply to other quantum memory modalities, including solid-state artificial atoms, trapped ions and neutral atoms. In suitable parameter regimes, routers can also incorporate multiplexing into realizations of distance-independent entanglement rates using local GHZ projective measurements [38]. Our results emphasize the importance of local connectivity in designing multiplexed quantum repeaters for high-rate and high-fidelity entanglement distribution across quantum networks.   The standard repeater chain has one long link that spans all four nodes, but the router chain has two long links. The standard repeater chain is unable to connect the shorter links that are available to form long links.

DATA AVAILABILITY
The data that support the plots within this paper and other findings of this study are available from the corresponding author upon reasonable request.

CODE AVAILABILITY
The NetSquid simulation package is available for download by request at https://netsquid.org/. The additional code used to generate data in this work is presently available at https://github.com/leeyuan13/NetSquidSim.

COMPETING INTERESTS
The authors declare no competing financial or nonfinancial interests. The physical parameters of our repeater memories correspond to experimentally-realized values reported in literature, detailed in Supplementary Table 1. In particular, these simulations consider a number of loss mechanisms. Only a fraction η emission of the NV emissions are coherent and thus usable for quantum networking, with the remainder being scattered into an incoherent phonon-sideband. A common strategy to improve this fraction is to place the NV in a cavity which enhances coherent emissions via the Purcell effect. Our simulations assume such a strategy, using the best-demonstrated enhancement with NV centers [1]. The NV also emits into a wide range of spatial modes, yielding a limited collection efficiency η collection . Local routing at the repeater is performed with efficiency η local , determined by the loss of the photonic material, here assumed to be a recently-demonstrated aluminum nitride (AlN) platform. The NV's visible emission wavelength experiences high losses of around 8 dB/km in fiber [2]; as a result, long-distance networking applications require a frequency downconversion step to telecom wavelengths with efficiency η conversion . The primary source of loss is scattering in the optical fiber that links the network nodes. This loss scales exponentially with the link length L, giving transmission efficiency η link = e −αL . The transmission losses η transmission labeled in Fig. 5 combine contributions from frequency downconversion and scattering losses in the fiber. Finally, the single photon detectors used to herald entanglement have a finite detection efficiency η detection and dark count rate d.
There are two components to the efficiency of local routing η local : off-chip coupling efficiencies η off-coupling = 0.92 [3] and on-chip propagation efficiencies η on-chip = 0.9963 per MZI. To compute the latter, we assume that AlN on sapphire waveguides have a loss of 5.3 dB/cm with a footprint of 30 µm per MZI [4].

Supplementary Note 2: Rates of One-Repeater Networks
We can obtain simple expressions for the raw entanglement rate of single repeaters, not accounting for fidelities. In a standard routerless repeater, each register attempts entanglement on either the left link or the right link in a single network clock cycle t distant . The mean number of successful long-distance links in a clock cycle is mp distant , where m is the number of registers per node and p distant is the corresponding probability of success (as described in the main text). Two successful long-distance entanglements (one on the left and one of the right) are needed to generate an EPR pair, so the mean entanglement rate for a standard repeater is mp distant /2t distant .
For the described router architecture, however, any given register only attempts entanglement on one of the links. We assume that t local t distant , so that with optimized scheduling, the router can use the same clock cycle as the standard repeater. For our simulations, the time necessary for local entanglement formation is included. At the start of any clock cycle, some registers might be holding on to long-distance entanglement from the previous clock cycle, waiting to be matched with a new successful entanglement link from the other link.
Let ∆ t be the signed number of such registers at the start of clock cycle t, so that ∆ t is the number of excess entanglements over the left link if ∆ t > 0 and −∆ t is the number of excess entanglements over the right link if ∆ t < 0. Note that if there are excess entanglements over the left link, this means that all entanglements over the right link were matched in the previous clock cycle, and vice versa.
are independent binomial random variables representing the numbers of successful entanglement attempts on the left and right links respectively. (B and B r have an implicit time dependence.) The number of registers with entanglements from the previous clock cycle is |∆ t |, so the number of new entanglement attempts in clock cycle t is m − |∆ t |. Every pair of matched entanglements will establish local entanglement with high probability, allowing the router to perform the required Bell state measurements and generate an EPR pair across the repeater. Using the ergodic theorem, the mean entanglement rate for the described router architecture is hence (m−E|∆ t |)p distant /2t distant , where the expectation is taken over the stationary distribution of the Markov SUPPLEMENTARY TABLE 1. State-of-the-art parameters used in simulations. Noise from two-qubit gates and electron spin readout are modeled as depolarization; noise from memory-photon state preparation is modeled as dephasing.
It is difficult to find E|∆ t | analytically, but we can bound it from above: Hence, the router rate is at least (1 − 1/ √ 2m)mp distant /2t distant . This lower bound is close to the actual rates observed in the simulation (Fig. 4b).
With some modifications to the architecture, we can improve the router rate to be closer to the standard repeater rate. The router architecture described in the main text has E[∆ t+1 | ∆ t ] = ∆ t (1 − p distant ), causing imbalances in entanglements between the left and right links to persist over time. However, using the MZI implementation of the router (Fig. 5)

Supplementary Note 3: Fidelity Contributions
Many factors contribute to the infidelity of entanglement generated by a router or a standard repeater. The impact of each factor on the total infidelity often depends on other factors, but we can still estimate their respective first-order contributions to the high fidelity of the router by mitigating individual factors and observing the resulting infidelity.
In the main text, we identified three contributions to the infidelity of entanglement. First, memories holding entangled states decohere during the idling time T before they are paired with entanglement on the other side of the repeater. Second, each excitation of the electron spin used to produce spin-photon entanglement in the Barrett-Kok protocol generates interaction noise that disturbs the qubit stored in the nuclear spin. If the nuclear spin holds entanglement on one side of the repeater, the infidelity of Alice-Bob entanglement increases with the number of entanglement attempts A made by the corresponding electron spin. Third, local operations like two-qubit gates and Bell state measurements further increase to the infidelity of entanglement. Figure 4 shows that the infidelity of the router is smaller than the infidelity of the standard repeater. As the router can simultaneously attempt entanglement with both Alice and Bob, its entangled states have a lower idling time than they would in the standard repeater, i.e. ET router < ET standard . Moreover, when the nuclear spin shares an entangled state with Alice or Bob, the electron spin requires fewer attempts to establish local entanglement in the router than it would to establish distant entanglement in the standard repeater, because the probability of successfully generating entanglement is higher over a low-loss local link than over a lossy distant link. In other words, EA router < EA standard . Both of these factors reduce the router infidelity relative to the standard infidelity.  Barrett-Kok protocol) is L = 30km. δtot is the difference in fidelity between the standard repeater and the router; δop is the contribution from local operations; δA is the contribution from interaction noise; and δT is the contribution from decoherence. Comparing the standard repeater to the router, we estimate (δop, δA, δT ) ≈ (0.6δtot, 1.4δtot, 0.2δtot). Error bars are standard errors of the mean.
However, the router performs more local operations than the standard repeater for each Alice-Bob EPR pair. The router needs to perform two Bell state measurements to connect the Alice-router, router-router and Bob-router entanglements, whereas the standard repeater only needs to perform one Bell state measurement per Alice-Bob EPR pair. The router thus experiences greater infidelity from local operations than the standard repeater. Nevertheless, the combination of local operations, interaction noise and decoherence times causes the router to have lower overall infidelity.
Let δ tot be the difference between the router and standard infidelities. Let δ op be the contribution to this difference from local operations, δ A be the contribution from interaction noise (i.e. from the difference between the random variables A router and A standard ) and δ T be the contribution from decoherence (i.e. from the difference between the random variables T router and T standard ). To first order, we assume that the infidelity contributions are not interdependent, so we should have To identify the relative contributions of these three factors to the reduction in router infidelity, we estimate the mean infidelity using a sampling approximation. For example, to estimate the mean router infidelity, we first generate Alice-router entanglement. We draw a sample of the idling time T router and apply the appropriate dephasing and depolarization operation to the Alice-router entanglement. Then we generate router-Bob entanglement, draw a sample of the number of local entanglement attempts needed A router , apply the appropriate interaction noise to the Alice-router and router-Bob entanglements, and generate (local) router-router entanglement. Finally, we perform the two Bell state measurements, producing an Alice-Bob EPR pair. We repeat the procedure multiple times to generate samples of the Alice-Bob EPR pair, before approximating the mean router infidelity using the sample average. This simplified simulation does not reproduce the results of the full NetSquid simulation (cf. main text) exactly, but we observe that the simplified simulations produce the same trends as the full simulation.
Using the same sampling approximation, we can also estimate the router infidelity in the counterfactual situation where T router and/or A router have the same distribution as T standard and/or A standard respectively. The estimated infidelities are shown in Supplementary Fig. 1.
Even though the contribution of local operations to the router infidelity is significant, with δ op ≈ 0.6δ tot , the reduction in infidelity due to reduced interaction noise is even greater, with δ A ≈ 1.4δ tot . We also observe that the decrease in router infidelity with increasing multiplexing arises from T router . The average idling time of an entangled link with the router decreases as m increases, leading to lower infidelity. In contrast, the other contributions are not affected by the degree of multiplexing.
In the limit as m → ∞, the idling time of the router T router converges to zero, whereas the idling time of the standard repeater T standard is unchanged. As the channel loss affects T standard but not T router ( p − → 0) as m → ∞, the router achieves channel-loss-invariant fidelity in the limit of high multiplexing. Therefore, both the idling time and the number of entanglement attempts play important roles in reducing the infidelity of the router relative to that of the standard repeater.

Supplementary Note 4: Design of MZI Array
Mach-Zehnder interferometer (MZI) arrays are versatile design tools that have been demonstrated in optical neural networks [14], programmable photonic circuits [15,16] and other physical applications. MZI arrays are well-suited for implementing all-to-all connectivity in quantum routers, because MZIs can act as quantum switches between pairs of waveguides (Supplementary Fig. 2a). Figure 5 provides an example of how a quantum router can be built with an MZI array. The photon loss due to an MZI array is dependent on the array's depth, which is the maximum number of MZIs a photon has to traverse when travelling from one end of the array to the other. We want to design routers using shallow MZI arrays so as to minimize on-chip losses.
An m-register, k-way router will have (k + 2) output ports: k of the ports will lead to each of the router's neighboring nodes, whereas the remaining two ports will go to detectors for local Bell state measurements. Combining an on-chip MZI with the two local detectors will SUPPLEMENTARY FIGURE 2. Building the MZI array. (a) The MZI implements 2 × 2 universal gates, so by tuning the parameters of the MZI (e.g. the phase difference θ) we can use the MZI to switch photons between adjacent waveguide lines. (b) To achieve the non-blocking property at the two detector ports, we use a 4 × 4 unit cell with three MZIs that is non-blocking over alternate pairs of output ports. One pair is indicated by the solid red arrows; the other pair is indicated by the dotted pink arrows. (c) We connect unit cells like a binary tree, reducing four input lines to two output lines at each level. To maintain the non-blocking property over the output lines, we connect appropriate pairs of output lines at each level.
give the detector station required to generate entanglement locally using the Barrett-Kok protocol because MZIs can also function as beamsplitters. We assume that k remains fixed as m varies, because the number of qubits per repeater node is likely to increase significantly with further developments in integrated photonics [17].
The MZI array for an m-register, k-way router must be able to connect any register to any output port. Furthermore, we must be able to simultaneously connect any pair of registers to the two detector ports, because the incoming photons must arrive at the beamsplitter at the same time in the Barrett-Kok protocol. More stringent forms of the latter 'non-blocking' requirement have been extensively studied in classical switching networks [18]. A rectangular 'cross-point' arrangement of MZIs [19] is completely non-blocking over all output ports, but the depth of the MZI array scales linearly with the number of registers m. The photon losses of such a linear-depth array may be prohibitive in the limit of large m. On the other hand, a binary MZI tree will be able to connect any register to any output port, but it does not satisfy the non-blocking condition at the two detector ports.
'Dilated' MZI networks [19] are fully non-blocking, with a depth that scales logarithmically with m. However, dilated networks achieve the non-blocking property by incorporating significant routing redundancy between switches. As a result, the number of switches required scales quadratically with m, like the rectangular 'crosspoint' array. MZI arrays with more MZIs are harder to fabricate and control, even if the array depth and hence photon loss remains small.
We propose a tree-based MZI array design with logarithmic depth and a linear number of MZIs. Such a design is possible because we only require a fixed subset of output ports to be non-blocking, not all ports.
We use the 4 × 4 unit cell shown in Supplementary  Fig. 2b to build the MZI array. By choosing the state of each MZI appropriately, any pair of inputs from the left can be simultaneously connected with alternate pairs of outputs on the right. Starting from the m registers at the inputs of the MZI array, we build a tree of 4 × 4 unit cells by connecting four consecutive lines using a unit cell, producing two output lines in the next level of the tree ( Supplementary Fig. 2c). We repeat the process at each level until we are left with two non-blocking output lines. This tree forms the register routing layer in Fig. 5 of the main text.
We complete the connection between the registers and the (k + 2) output ports using an interposer, which switches the two non-blocking outputs (and other extra lines) from the register routing layer into the network routing layer or the local Bell state measurement layer. The network routing layer is simply a binary tree of MZIs that connects the interposer to the k outwardfacing ports. The local Bell state measurement layer contains one MZI that acts as a beamsplitter for the Barrett-Kok protocol.
We now count the depth of the MZI array. A photon from one of the m registers must travel through log 2 (m/2) unit cells to reach the two non-blocking output lines of the register routing layer. As each unit cell has a depth of two MZIs, the register routing layer has a depth of 2 log 2 (m/2). As shown in Fig. 5, we only need one MZI for the interposer. The network routing layer needs a depth-(log 2 k) MZI tree to link k output ports and the interposer. The local Bell state measurement layer only needs one MZI, and it is located in parallel to the network routing layer. Therefore, the above construction produces an MZI array of depth 2 log 2 (m/2)+1+max(log 2 k, 1) = 2 log 2 (m)+log 2 (k)−1, which is logarithmic in m. (If m and/or k are not powers of 2, we take the ceiling of log 2 (m) and/or log 2 (k) where appropriate.) The number of MZIs needed for this construction scales linearly with m. The register routing layer requires (m/2 − 1) unit cells, each of which has three MZIs. The interposer and local Bell state measurement layer need one MZI each, and the network routing layer needs (k−1) MZIs. Hence, the total number of MZIs in the array is 3(m/2 − 1) + 1 + (k − 1) + 1 = 3m/2 + k − 1 = O(m). SUPPLEMENTARY TABLE 2. Timeline of a clock cycle, as shown in Fig. 3. Representative times are derived from Ref. [20].
Step In summary, our construction satisfies the nonblocking requirement at the two detector ports using an O(log m)-depth, O(m)-switch MZI array, making it more efficient than standard approaches for designing photonic switches.

Supplementary Note 5: Proposed Timeline
For completeness and ease of comparison, we detail a timeline for the router and standard repeater in Supplementary Table 2. The majority of the clock cycle is occupied by the round-trip entanglement time (i.e. the time between the second Barrett-Kok pulse and the heralding of distant entanglement). The entanglement matching phase of the router clock cycle is expected to be small compared to the rest of the clock cycle, so the router and standard clock cycles are similar.
However, the idling time for a router is significantly shorter than that for a standard repeater. Supplementary Table 3 details the timeline of a full left-right entanglement, from the first entanglement attempt to the Bell state measurement. The idling time, i.e. the time between the first and second distant entanglements, approaches zero in the router as the degree of multiplexing m becomes large, whereas the idling time of the standard repeater remains constant at t distant /p distant . The longer idling time of the standard repeater causes more decoherence, and thus the left-right entanglement generated by the standard repeater has a lower fidelity than that of the router in the limit of high multiplexing.