Published December 22, 2025
| Version v1
Software
Open
qkd_bb84_simulator.py — Professional BB84 Quantum Key Distribution Simulator
Authors/Creators
Description
qkd_bb84_simulator.py v1.3 — Professional BB84 Quantum Key Distribution Simulator
Features
• Zero extra setup — single file (only NumPy)
• Complete BB84 protocol with basis sifting and error checking
• Realistic depolarizing channel + photon loss (standard 0.2 dB/km fiber model)
• Intercept-Resend eavesdropping with rigorous information-theoretic bound
• Asymptotic secure key rate via binary entropy (Shor-Preskill style: 1 - 2h(QBER) - I_Eve)
• Privacy amplification via XOR folding (toy universal hashing)
• Generates final provably secure key
• High-resolution plot: secure key rate vs. fiber distance (independent simulations per point)
• Exports detailed statistics + secure key to JSON/CSV
Dependencies
• Requires numpy (>=1.21.0) — standard in scientific Python
• matplotlib (>=3.5.0) optional for --plot
Intended for cryptographers, quantum network engineers, and financial security teams designing provably secure quantum communication systems — provides accurate modeling of key rates, eavesdropping detection, and distance limitations that motivate quantum repeater development.
Real usage:
python qkd_bb84_simulator.py --bits 200000 --error_rate 0.015 --eve_present --verbose --plot
python qkd_bb84_simulator.py --bits 100000 --loss_prob 0.3 --output qkd_results.json
Made by Britt (2025) — MIT License
Files
275e8078cdb38b581797a6af5418ace5-ddf8fa8cbb1822bd3d3367265e65df15201dabc8.zip
Files
(3.3 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:ae856ccc66a7dd8097cd91b74d518a95
|
3.3 kB | Preview Download |