This repository contains the numerical method for calculating the secret key rate of QKD with the finite key analysis.
This package uses and is written in Python 3.x
It is optional to use/install the MATLAB tools, but we use MATLAB and CVX because certain SDPs take too long to be solved. Please install the following MATLAB tools:
Optional (but desirable): Install MOSEK solver for python.
-
If you'd like to use the MATLAB tools, please install the tools described above.
-
Install the required python packages using:
pip install -r requirements.txt
-
Installation of Numerical QKD Python package can be done via setuptools >= 36.2.7:
python setup.py install
The convex optimization problems are solved using two disciplined convex programming (DCP) tools:
- cvxpy : www.cvxpy.org (Python)
- cvx : www.cvxr.com (MATLAB)
Please refer see the Jupyter notebooks in the examples
folder to see
how you can use this library.
The simplest example is: simple_BB84_example.ipynb
.
To see how postselection is performed, see BB84_protocol.ipynb
.