https://github.com/aliro-technologies/realistic-quantum-network-simulation-for-bbm92

realistic-quantum-network-simulation-for-bbm92

realistic-quantum-network-simulation-for-bbm92

This repo contains code and data to reproduce results in the paper "Realistic quantum network simulation for experimental BBM92 key distribution". This paper uses the Aliro Quantum Network Simulation (AQNSim) python package to simulate BBM92 key distribution, reproducing experimental results and verifying analytical theory.

Environment Setup

Some of the code in this repo requires the aqnsim Python package to run. For more information about the AQNSim python package or to gain access, please visit our website.

All simulations in this repo can be run in the aqnsim-dev conda environment provided by AQNSim. All AQNSim simulations in this repo are compatible with AQNSim v0.12.0 (aqnsim==0.12.0).

We have included a yml file in this repo to run the theory and experimental analysis scripts (run_theory.sh, run_exp_analysis.sh, and run_make_comparison_plot.sh) in this repo without having access to AQNSim. First, install conda.

To create the environment from the yml file, navigate to the root project directory and run the command:

(base) $ conda env create -f environment.yml

This command will create the realistic-qn-env environment. To activate the environment, run the command:

(base) $ conda activate realistic-qn-env

Running the code

The theory plots in Figures 2 and 3 (predicting BBM92 key rates and QBERs) can be generated by running the bash script run_theory.sh. The results will be stored in json files with the data type "numerics" provided within the file.

The AQNSim plots in Figures 2 and 3 (simulating BBM92 key rates and QBERs) can be generated by running the bash script run_simulations.sh. The results will be stored in json files with the data type "aqnsim" provided within the file.

The experiment plots in Figures 2 and 3 (calculating BBM92 key rates and QBERs) can be generated from the raw saved data by running the bash script run_exp_analysis.sh. The results will be stored in json files with the data type "experiment" provided within the file. Running this bash script will also generate Figures 6 (a plot estimating the internal source brightness) and 7 (a correlation matrix of measurement outcomes) from the raw saved data. The raw saved data file analyzed in the paper is Mar_20_RUN_2_0P8vTHRESHOLD_BBM92_TIMETAG_STREAM_16HIST_UBENCHPC_12345678_DAHVDAHV_bin_width_1ns_4_36pm.csv, but other saved experimental csv raw data files can also be analyzed with the appropriate estimated parameters inputted.

The simulations and plots for Figures 4 and 5 (simulation and theory showing entanglement generation rates and BBM92 secure key rates for repeater chains) can be generated by running the bash script run_repeater_chains.sh.

To create Figures 2 and 3 from the theory, AQNSim, and experimental analysis files, run the bash script run_make_comparison_plot.sh. When this script is run, the reference images in comparison_results directory will be overwritten.

Raw experimental data is saved in the folder timetagged_data.