How usnistgov/mqns works
MQNS is a discrete-event simulator for comparing quantum-entanglement routing strategies. A user configures a network, traffic, and simulation; the network is built and routes are computed, then forwarding models entanglement generation, swapping, and optional purification while tracking qubits and memory. The simulator schedules events and supports monitoring. The README documents major forwarding and link-model capabilities; the source index and excerpts support the core implementation links, but do not expose every runtime dispatch, so uncertain links are omitted.
Main entry points: controller.py Routing controller · link_layer.py Entanglement link layer · network.py Network and requests · builder.py Network builder
Components 21
Scenario Setup
- Network builder
mqns/network/builder.py - Network topology
mqns/network/topology - Network and requests
mqns/network/network/network.py - Traffic generation
mqns/network/network
Routing and Forwarding
- Proactive controller
mqns/network/proactive/controller.py - Routing controller
mqns/network/fw/controller.py - Route computation
mqns/network/fw/routing.py - Path algorithms
mqns/network/route - Forwarding strategies
mqns/network/fw/forwarder.py - Swap sequences
mqns/network/fw/swap_sequence.py - Qubit multiplexing
mqns/network/proactive
Quantum Resources
- Entanglement link layer
mqns/network/protocol/link_layer.py - Link architectures
mqns/entity/qchannel/link_arch.py - Quantum memory
mqns/entity/memory/memory.py - Qubit and state models
mqns/models/qubit - Entanglement models
mqns/models/epr/entanglement.py - Noise models
mqns/models/error
Simulation Runtime
- Event simulator
mqns/simulator/simulator.py - Events and time
mqns/simulator/event.py - Simulation monitor
mqns/entity/monitor/monitor.py
Other components
- Simulation user
Connections 23
- Simulation user → Network builder: configures
mqns/network/builder.py - Network builder → Network topology: constructs
mqns/network/builder.py - Network builder → Network and requests: builds
mqns/network/builder.py - Simulation user → Traffic generation: defines
- Traffic generation → Network and requests: creates requests
mqns/network/network/__init__.py - Network and requests → Routing controller: provides routes
mqns/network/fw/controller.py - Routing controller → Network and requests: builds routes
mqns/network/fw/controller.py - Routing controller → Route computation: computes paths
mqns/network/fw/controller.py - Route computation → Path algorithms: queries paths
mqns/network/fw/routing.py - Routing controller → Forwarding strategies: installs paths
mqns/network/fw/controller.py - Proactive controller → Routing controller: dispatches commands
mqns/network/proactive/controller.py - Proactive controller → Qubit multiplexing: configures allocation
mqns/network/proactive/controller.py - Forwarding strategies → Swap sequences: uses sequences
- Forwarding strategies → Entanglement link layer: initiates distribution
- Entanglement link layer → Link architectures: models link generation
mqns/network/protocol/link_layer.py - Entanglement link layer → Quantum memory: reserves qubits
mqns/network/protocol/link_layer.py - Quantum memory → Qubit and state models: stores
mqns/entity/memory/memory.py - Entanglement link layer → Entanglement models: generates pairs
mqns/network/protocol/link_layer.py - Entanglement models → Noise models: applies error models
mqns/models/epr/entanglement.py - Entanglement models → Qubit and state models: uses states
mqns/models/epr/entanglement.py - Simulation user → Event simulator: runs simulation
- Event simulator → Events and time: schedules events
mqns/simulator/simulator.py - Event simulator → Simulation monitor: notifies watchers
mqns/simulator/simulator.py