A discrete-event scheduler designed for quantum networks
Project description
SimQN
Welcome to SimQN's documentation. SimQN is a discrete-event based network simulation platform for quantum networks. SimQN enables large-scale investigations, including QKD protocols, entanglement distributions protocols, and routing algorithms, resource allocation schemas in quantum networks. For example, users can use SimQN to design routing algorithms for better QKD performance. For more information, please refer to the Documents.
SimQN is a Python3 library for quantum networking simulation. It is designed to be general propose. It means that SimQN can be used for both QKD network, entanglement distribution network and other kinds of quantum networks' evaluation. The core idea is that SimQN makes no architecture assumption. Since there is currently no recognized network architecture in quantum networks investigations, SimQN stays flexible in this aspect.
SimQN provides high performance for large-scale network simulation. SimQN use Cython to compile critical codes in C/C++ libraries to boost the evaluation. Also, along with the common used quantum state based physical models, SimQN provides a higher-layer fidelity based entanglement physical model to reduce the computation overhead and brings convenience for users in evaluation. Last but not least, SimQN provides several network auxiliary models for easily building network topologies, producing routing tables and managing multiple session requests.
Get Help
- This documentation may answer most questions.
- The tutorial here presents how to use SimQN.
- The API manual shows more detailed information.
- Welcome to report bugs at Github.
Installation
Install and update using pip
:
pip3 install -U qns
First sight of SimQN
Here is an example of using SimQN.
from qns.simulator.simulator import Simulator
from qns.network.topology import RandomTopology
from qns.network.protocol.entanglement_distribution import EntanglementDistributionApp
from qns.network import QuantumNetwork
from qns.network.route.dijkstra import DijkstraRouteAlgorithm
from qns.network.topology.topo import ClassicTopology
import qns.utils.log as log
init_fidelity = 0.99 # the initial entanglement's fidelity
nodes_number = 150 # the number of nodes
lines_number = 450 # the number of quantum channels
qchannel_delay = 0.05 # the delay of quantum channels
cchannel_delay = 0.05 # the delay of classic channels
memory_capacity = 50 # the size of quantum memories
send_rate = 10 # the send rate
requests_number = 10 # the number of sessions (SD-pairs)
# generate the simulator
s = Simulator(0, 10, accuracy=1000000)
# set the log's level
log.logger.setLevel(logging.INFO)
log.install(s)
# generate a random topology using the parameters above
# each node will install EntanglementDistributionApp for hop-by-hop entanglement distribution
topo = RandomTopology(nodes_number=nodes_number,
lines_number=lines_number,
qchannel_args={"delay": qchannel_delay},
cchannel_args={"delay": cchannel_delay},
memory_args=[{"capacity": memory_capacity}],
nodes_apps=[EntanglementDistributionApp(init_fidelity=init_fidelity)])
# build the network, with Dijkstra's routing algorithm
net = QuantumNetwork( topo=topo, classic_topo=ClassicTopology.All, route=DijkstraRouteAlgorithm())
# build the routing table
net.build_route()
# randomly select multiple sessions (SD-pars)
net.random_requests(requests_number, attr={"send_rate": send_rate})
# all entities in the network will install the simulator and do initiate works.
net.install(s)
# run simulation
s.run()
# count the number of successful entanglement distribution for each session
results = [src.apps[0].success_count for req in net.requests]
# log the results
log.monitor(requests_number, nodes_number, results, s.time_spend, sep=" ")
Contributing
Welcome to contribute through Github Issue or Pull Requests. Please refer to the develop guide.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for qns-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccf573c45060b4ddf0b2ce29aca8cd83897c3ab25aa288e6abede9dfb86e55d1 |
|
MD5 | 9083486d00c30a5b9deff830b26ce533 |
|
BLAKE2b-256 | 0006f9a00120e57b8b0294f535f0a18ba52f8097e34a0689b4d33d0bf84d1474 |
Hashes for qns-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 350b7ab1429f93e9ef9b9d67f674d0f2fb397117fdd1819dbc5823e2ccd1072c |
|
MD5 | 69d934eb72986c90d833c79133668a84 |
|
BLAKE2b-256 | eeb1579337a5aa70de85bce3e2933b171d450e9571bc46290bb9ae40a3e5884f |
Hashes for qns-0.1.4-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3bc81a9eb39d6319d2e7cf04f1292163b4d408239e1b8c6199d9f8d424a79c8 |
|
MD5 | ab59a5b1eb5ac9ae2a2968ef056a3fc7 |
|
BLAKE2b-256 | 23444b0fe4071bfe3991aece60434223e0e56347781c3af28eaef775a1db9895 |
Hashes for qns-0.1.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 432535ffb55c068defcff32eeecd455b38f7f6088b02b12cb711290158a0e06d |
|
MD5 | e3507f410694e0bbf96f89f8c07d2f26 |
|
BLAKE2b-256 | 7dd8e47195362bc77e39dd15cbddec538185ae31a7461514642aeb00babf3fb2 |