###########################################################################
## __ __ ##
## |__| |__| ##
## __ __ __ Quantum networking experiments with NetSquid ##
## __| |__| |__| |_ ##
## |__| |__| |_______| (c) 2020 C. Cicconetti ##
## |__| | | | | ##
## _ _ _ | | | | Ubiquitous Internet @ IIT-CNR ##
## | | | | | |__| | | ##
## | |_| | | | | https://github.com/ccicconetti/netsquid ##
## \___/|_| |__| ##
## ##
## Licensed under the MIT License <http://opensource.org/licenses/MIT> ##
###########################################################################
NetSquid is an event-driven simulator of networked quantum systems.
This repository contains a collection of tests, examples, and experiments using NetSquid done as part of the research activities of the Ubiquitous Internet research group of the Institute of Telematics and Informatics of the National Research Council.
experiments
: experiments, one batch per directory, including the simulation scenarios, processing of results, and also some example plot generation scripts in Gnuplot; check theREADME.md
within each directory for more information on each experimentscripts
: miscellanea of scriptsuiiit
: extension of NetSquid that is used to run the experiments, also include non-NetSquid specific ancillary modules (e.g., for multi-process execution of simulations and post-processing of results); it also contains the unit tests in files starting withtest_
Sandox
: random collection of experiments with NetSquid and its dependenciesTutorial
: some of the examples provided by NetSquid revisited
The library assumes version 0.9.8 of Netsquid and has been tested with Python 3.6.9 on Linux (Ubuntu 18.04) and Python 3.7.6 on Mac OS X.
The source code is formatted using black.
Python 3 must be used. It is suggested to use a virtual environment so as to install all required packages with a matching version. For instance, using virtualenv:
virtualenv -p python3 myvenv
(echo "PYTHONPATH=$PYTHONPATH:$PWD" ; echo "export PYTHONPATH") >> myvenv/bin/activate
source myvenv/bin/activate
The virtual environment will remain active in the shell from which the source
command has been requested until logout. If you want to quit early the virtual environment without closing the shell you may run:
deactivate
To install all the dependencies at once using pip you have to first obtain a username and password for NetSquid by registering here, then issue the following command (you will be prompted for the username and password obtained):
pip install --extra-index-url https://pypi.netsquid.org -r requirements.txt
If no errors occurred pip list
will include the packages just installed and you will be able to execute the examples and experiments, for instance:
cd Sandbox
python my_repeater_chain.py
The following command should execute without throwing a ModuleNotFoundError
or other exceptions:
python -c "import uiiit.qnetwork"
The unit tests use unittest
Python library and can be executed by entering the uiiit
directory and then running:
python -m unittest