# First Request First Service Entanglement Routing Scheme for Quantum Networks
## 4 First Request First Service Entanglement Routing Scheme  
### The Proposed FRFS Scheme  
Assume that the entanglement distribution network is \(G=\langle V,E\rangle\), which consists of \(k\) nodes. For given arbitrary paired distant users (with node index of \(i\) and \(j\)), an efficient entanglement routing scheme is required to find a path through the entangled photon source in the large-scale network with dynamic topologies. The brightness \(B\) of the entangled photon source, \(\eta^{\text{ICC}}\), \(e^{\text{pol}}\), \(\text{DC}_{i}\), \(\text{DC}_{j}\) and \(t_{\text{CC}}\) of users can be treated as constant parameters once the network \(G\) is constructed. The coincidence counts \(\text{CC}^{\text{m}}\) and other evaluation criteria of the entanglement distribution between node \(i\) and node \(j\), is usually negatively correlated with \(l_{i}\) and \(l_{j}\), where \(l_{i}\) (\(l_{j}\)) is the link loss from the entangled photon source to node \(i\) (node \(j\)). Meanwhile, the network often faces the problem of limited path resources when assigning the path with the best evaluation criteria to multiple users requesting resources. Therefore, we propose a novel first request first service (FRFS) routing scheme for the entanglement distribution  
Figure 3: Schematic diagram of edges between a \(2\times 2\) BS and \(2\times 2\) AOS. The edges between BS and AOS are indicated by green lines. network with active wavelength multiplexing strategies, which finds the lowest loss path from an entangled photon source to each user in order. Assume that the index of entangled photon source is \(s\), the paired wavelength channels of signal and ideal photons for node \(i\) and \(j\) are \(\mathrm{ch}_{i}\) and \(\mathrm{ch}_{j}\). \(p_{i}\) (\(p_{j}\)) is defined as the path between node \(s\) to node \(i\) (\(j\)). The link loss matrix for the network \(G\) can be derived from \(V\) and \(E\). Thus, our proposed FRFS entanglement routing scheme mainly includes four procedures. First of all, for the node \(i\) and the wavelength channel \(\mathrm{ch}_{i}\), calculate \(p_{i}\) with the modified Dijkstra algorithm in the network \(G\), which is described in Section 4.2. Secondly, for the wavelength channel \(\mathrm{ch}_{i}\), the correlated import and output ports of all edges in \(p_{i}\) are marked as the in use status by the \"Lock\" operation, defined as \(V=Lock(V,p_{i},\mathrm{ch}_{i})\). Thirdly, for the node \(j\) and the wavelength channel \(\mathrm{ch}_{j}\), calculate \(p_{j}\) with the modified Dijkstra algorithm in the updated network \(G\). Finally, for the wavelength channel \(\mathrm{ch}_{j}\), the correlated import and output ports of all edges in \(p_{j}\) are marked as the in use status, by the operation \(V=Lock(V,p_{j},\mathrm{ch}_{j})\). Once the entanglement distribution request is released by node \(i\) and node \(j\), conduct the \(V=Unlock(V,p_{i},\mathrm{ch}_{i})\) and \(V=Unlock(V,p_{j},\mathrm{ch}_{j})\) to release the entanglement network link resources consumed by path \(p_{i}\) and \(p_{j}\). Definition 1: \(M=GM(v_{x},\mathrm{ch}_{x})\). Getting the pass-through loss matrix of node \(v\) for wavelength channel \(\mathrm{ch}_{x}\) as  
\[M= \begin{cases}W_{x}^{1}&|T_{x}|=1\\ W_{x}^{\mathrm{ch}_{x}}&\mathrm{ch}_{x}\in T_{x}\wedge|T_{x}|\geq 2\,.\\ \emptyset&\mathrm{ch}_{x}\
otin T_{x}\wedge|T_{x}|\geq 2\end{cases}  \tag{29}\]  
Definition 2: \(V=Lock(V,p_{x},\mathrm{ch}_{x})\). For the arbitrary adjacent edges a and b in the path \(p_{x}\) (\(a[3]=b[1]\)), the pass-through loss matrix \(M=GM(v_{a[3]},\mathrm{ch}_{x})\) of node \(a[3]\) are updated by setting \(M[a[4]][a[4]]=b[2]\) and \(M[b[2]][b[2]]=a[4]\) when \(T_{a[3]}\geq 0\), \(T_{a[3]}\) is the supported wavelength channel vector of node \(a[3]\). Definition 3: \(V=Unlock(V,p_{x},\mathrm{ch}_{x})\).