# Service for Deploying Digital Twins of QKD Networks
## 1 Introduction  
Since the development of the Quantum Theory, applied physicists and engineers have been thinking about different ways to apply the unique features quantum objects present to design new technologies and useful products. Nowadays, it is common, for example, to find Non-deterministic Random Bit Generators (NRBG) in modern electronic products. These generators use a quantum process as an entropy source to generate random bits for critical applications, like random key generation. Even more disruptive technologies are just around the corner. From engineering and design to biology or medicine, quantum computing will bring significant advances in all these fields [1, 2]. However, this powerful machinery poses a threat to the security of all networks. Currently, the information we exchange is encrypted using keys formed according to algorithms, such as the Rivest-Shamir-Adleman (RSA) [3] or the Diffie-Hellman (DH) [4] algorithms, which are hard to break using an ordinary computer. But, since the late 1990s, mathematicians have been proposing quantum computing algorithms, like the paradigmatic case of [PERSON]'s algorithm [5], which would break the vast majority of these classic cryptographic algorithms without too much hassle. Since quantum computerscapable of implementing those quantum algorithms are becoming a reality, anyone with a quantum computer powerful enough would be able to decipher all the classically protected information exchanged by two network endpoints. How to protect sensitive information against this new technology is not something that has gone unnoticed by the scientific community. In fact, one of the most developed applications of quantum technologies is Quantum Key Distribution (QKD), where the security level of the communication between two nodes is based on general principles of Quantum Physics and, therefore, it does not depend on any computational assumptions. If the day when Quantum Computation is widely available comes, quantum networks protected by QKD will be an enabling technology to ensure the security of the information exchanged. The first prototypes of QKD networks are already being built around the world [6; 7; 8], and thanks to advances in detectors, transmitters, and measurement protocols, results are being achieved that break previous QKD speed and distance records [9; 10; 11]. However, quantum devices and equipment are still under development, making their availability low and their price high, hindering the deployment of physical QKD networks, and thus slowing down the process of protecting the information exchanged in our networks from new and powerful attacks. Given that QKD is a key technology to be developed in an era of paradigm shifts and that not everyone has current access to a physical QKD network, or cannot risk the network for the sake of experimentation, this paper presents a solution that automatically deploys a digital twin of a QKD network with any desired topology. The solution offers a service that allows automatic build and distribution of QKD nodes in virtual machines or physical devices, thanks to the implementation of Network Functions Virtualization (NFV) technologies. We use a quantum channel emulator which can be executed in these QKD nodes. With this, we can flexibly deploy emulated QKD nodes at different locations, a feature that, to the authors knowledge, is not available in existing state-of-the-art quantum emulation tools. This service relies solely on open-source technologies and is publicly available in [12] to ensure that any researcher interested in this field can carry out experiments and tests in order to develop QKD network technology without the requisite of having access to, or compromising, the machinery of a physical QKD network. The presented solution has been validated with several tests conducted in the 5G Telefonica Open Network Innovation Centre (STONIC), an advanced research and innovation laboratory founded by Telefonica and IMDEA Networks.