You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A distributed simulation of the BB84 quantum key distribution (QKD) protocol implemented with Qiskit, FastAPI, Docker, and microservices.
The system reproduces the full communication flow between Alice and Bob, including noisy channels, sifting, error reconciliation (CASCADE-lite + BICONF), and privacy amplification.
.
├── alice.py # Alice service (Qiskit + CASCADE + Privacy Amplification)
├── bob.py # Bob service (Qiskit Aer + channel + key derivation)
├── Dockerfile # Base image for both services
├── docker-compose.yml # Orchestration of microservices
├── requirements.txt # Python dependencies
└── README_en.md # This document
🧠 Core Concepts Implemented
QBER (Quantum Bit Error Rate): noise level of the quantum channel
Sifting: basis matching and partial bit disclosure
Reconciliation: interactive error correction via parity exchange
BICONF: hash-based confirmation of key consistency
Privacy Amplification: compression of the reconciled key using universal hashing
Quantum Simulation: Qiskit Aer backend with configurable depolarizing noise
🧰 Configurable Parameters
Parameter
Description
Example
n
Number of qubits simulated
20000
block
Block size in reconciliation
1024
rounds
Number of reconciliation passes
2
permute_seed
Random seed for permutation
123
confirm_tag_bits
Length of confirmation hash (BICONF)
64
target_bits
Desired length of the final key
4096
⚠️ Notes
The simulation uses Qiskit Aer, not actual quantum hardware.
The final /reveal_bits step is only used for debug and verification — it would not appear in a real QKD protocol.
Ready for future extensions with Prometheus and Grafana for performance metrics.
🚀 Next Steps
Integrate Prometheus/Grafana to measure communication latency and throughput
Implement full Cascade protocol with adaptive rounds
Simulate Eve interception scenarios to test QBER thresholds
Evaluate performance and energy efficiency per generated secure bit
👩💻 Authors
Developed as part of the Qiskit Hackathon (BB84 Quantum Key Distribution) project.
Focus: Quantum channel simulation, Docker microservices architecture, and performance evaluation.