qcrypto
is a basic, yet flexible quantum cryptography simulation library. It is built upon NumPy, making use of its powerful vectorized operations to allow for the simulation of entangled systems of qubits. Thus, it is built in such a way that it can be easily expanded by the end-user. It offers the following main classes:
-
QstateEnt
: Used for the simulation of a general set of qubits which may or may not be entangled. -
QstateUnEnt
: Similar toQstateEnt
, but limited to only simulating unentangled systems of qubits. However, what it lacks in flexibility it makes up in performance: whileQstateEnt
handles$2^N$ coefficients, this class only needs to handle$2\times N$ . -
Agent
: Used to simulate the agents (Alice, Bob, Eve, etc.) in quantum cryptography protocols, allowing for a more intuitive implementation of the desired simulation.
For more information how these features work, you can take a look at this notebook for a showcase of QstateEnt
and QstateUnEnt
, and this notebook for an example simulation of BB84 using this library.
To install qcrypto
to your Python environment, run the following commands.
git clone [email protected]:GuillermoFidalgo/QKDP.git
cd QKDP
pip install .
If you plan on using qcrypto
in a Jupyter Notebook, for the last command, run this instead:
pip install ".[nb]"
Thanks goes to these wonderful people (emoji key):
Guillermo A. Fidalgo-Rodríguez 🖋 💻 🚧 |
Roy F. Cruz Candelaria 🔬 💻 🖋 |
tetianmaz 🖋 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!