Numerical security proof for the decoy-state BB84 protocol and measurement-device-independent quantum key distribution resistant against large basis misalignment
This is a public version of the code used in Numerical security proof for the decoy-state BB84 protocol and measurement-device-independent quantum key distribution resistant against large basis misalignment [arXiv]. This was built for v1.0.0 of the Open QKD Security package.
The code here will largely reproduce the decoy state BB84 and MDI-QKD key rate plots in the paper, with the exception that the original decoy state analysis used a compiled C++ MEX library (which directly calls Gurobi C++ API). For simplicity, this version uses MATLAB with CVX (with the SDP solvers or optionally with Gurobi as the backend) to achieve it instead with slightly less precision. As a result, the key rates fall off faster at longer distances for the decoy state protocols.
Caution
This code uses parallel computing to reduce run time, however CVX is known to be unstable when run in parallel. If you encounter instabilities when running the code, we recommend changing the parfor
loop to for
loops in the function MDIBB84WCPChannel.m
.
Caution
This repository is for archival and transparency purposes. This will only work with v1.0.0 of the Open QKD Security package.
In addition to MATLAB 2020b+, also install MATLAB's Parallel Computing Toolbox.
- Download the linked version of the code from above and follow all installation instructions,
- Download the latest release on the side bar and unzip in your preferred directory and add this folder to the Matlab path.
- Also follow the additional Mosek install instructions and install GUROBI for a closer match.
- Due to a bug in the v1.0 solver
step1SolverAsymptoticInequality.m
, we have provided a patched version in this repository. Replace the old version in the folderopenQKDsecurity/Solvers/AsymptoticInequality_Solver/
.
- Clone this repository and its exact submodules navigate to your desired directory and run,
git clone --recurse-submodules https://github.com/Optical-Quantum-Communication-Theory/Numerical-security-proof-for-the-decoy-state-BB84-and-MDI-QKD
- Follow all further installation instructions.
- Also follow the additional Mosek install instructions and install GUROBI for a closer match.
- Due to a bug in the v1.0 solver
step1SolverAsymptoticInequality.m
, we have provided a patched version in this repository. Replace the old version in the folderopenQKDsecurity/Solvers/AsymptoticInequality_Solver/
.
To reproduce the plots run:
Main_distance_MDI.m
Main_distance_BB84.m
Main_alignment_MDI.m
Main_alignment_BB84.m