
Q2NS is a modular, inherently extensible simulation framework for quantum networks, built on top of ns-3. Q2NS augments ns-3 with quantum-network primitives while remaining fully compatible with ns-3’s classical discrete-event simulation environment. The goal is to provide a flexible, open, and scalable platform for Quantum Internet research.
Q2NS's design reflects recent advances in quantum-native network architectural modeling (1). The “2” in Q2NS is intentional and applies to both Q and N: Q2 captures quantumness at the message and control functionality levels, while 2N reflects the enforced decoupling between network control and in-network operation execution within a unified framework (1).
As described in our paper, users build a network with NetController, then create, manipulate, and send qubits through QNode. This allows for a decoupling of protocol control logic from node- and channel-level operations, enabling rapid prototyping and adaptation across heterogeneous and evolving Quantum Internet scenarios. Q2NS also natively supports multiple quantum-state representations through a unified plug-in interface, allowing interchangeable state-vector, density-matrix, and stabilizer backends.
This repository additionally includes q2nsviz (Q2NSViz), a lightweight visualization companion for trace-based animations. It jointly renders physical- and entanglement-connectivity graphs and supports entangled-state manipulations, facilitating an intuitive inspection of entanglement dynamics and protocol behavior. More details can be found in our documentation and related works!
Q2NS is developed within the Horizon Europe ERC-CoG QNattyNet project (grant n. 101169850) at the University of Naples Federico II, funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.
Works with ns-3.47
Build History : Q2NS v0.1Release Notes
This ns-3 extension is one or more contributed modules.