# Service for Deploying Digital Twins of QKD Networks
## 2 Background
### Quantum Network Simulators  
A fundamental component of the service will be the quantum network emulator used to build the quantum channels in the virtual QKD network. There is a variety of quantum network simulators and emulators that allow simulating the transmission and operation of qubits between two nodes [34]. The choice of the simulator or emulator to be used is a fundamental part of the development of the service, as some features of the QKD network digital twin will depend on which software solution is used. One of our design criteria was to build the service as open-source software, making it available to the research community, network engineers, and stakeholders working in the field of quantum networks and QKD. Flexibility was also a fundamental requirement, that is, the service must be able to deploy digital twins of moderately complex QKD networks, built by multiple QKD nodes and quantum links. Moreover, deployments should be realized within a reduced time frame, requiring minimal intervention from the user, who should only provide the details of the QKD network to be deployed as a digital twin. The digital twin must in turn resemble as much as possible the real QKD network, and as no real network runs locally on a single device, a simulator that offers the possibility of distributing the network nodes among different machines is needed. To ease the implementation or elimination of different functionalities, a modular design is sought, which allows working on different components of the digital twin independently. Figure 1: General example of two sites in a QKD network by ETSI [27]. In the following, we present a brief review of the quantum simulators and emulators that have been studied for the development of the service:  
* **SeQueNCe** is a photonic network simulator implemented in Python, where a metropolitan-scale quantum network was successfully modelled using single photon simulations [35]. It is divided into five modules, from the hardware to the application layer, with cross-module communication. This simulator allows the modification of many classical and quantum parameters, from the attenuation and the delay introduced by the channels to the fidelity of entanglement between two qubits, or the efficiency of the single-photon detectors. It also includes an implementation of quantum memories and several entanglement-related protocols [35]. * **QuNetSim** is a Python simulator designed to model the network layer and above instead of focusing on the simulation of the physical properties of quantum networks [36]. It includes many existing basic protocols as a toolbox to make easier the development of more complex protocols. It can process both classical and quantum information and uses a network layering model based on the Internet architectural model, with three layers: application, transport, and network [36]. * **NetSquid** is a modular simulator available as a Python package. It allows modelling different physical quantum devices that can appear in a quantum network, as quantum memories [37]. Users can choose between a detailed description of the quantum states using wave functions or density matrices, or a simplified version using the stabiliser formalism. It can support the simulation of large-scale networks thanks to its computation engine, which can manage multiple qubits simultaneously [37]. * **The Parallel Simulation Framework** is an optimized parallel simulator, proved to be nine times faster than a sequential simulator in an experiment involving a 64-node QKD network [38]. It has two different layers, the upper one corresponds to the modelled hardware and protocols, and the lower layer consists of the kernel responsible for the parallel discrete event simulation. It only implements the BB84 protocol but can be expanded to other schemes [38]. * **SimulaQron** is a Python emulator with a modular design, that allows running the different quantum network nodes on different physical or virtual machines.