DEV Community

Cover image for Building a Quantum-Safe BB84 Simulation with Qiskit 1.0+ and NumPy
TheSpacetimeDebugger
TheSpacetimeDebugger

Posted on

Building a Quantum-Safe BB84 Simulation with Qiskit 1.0+ and NumPy

Hi Dev Community šŸ‘‹
I’d like to share a recent project: a production-oriented simulation of the BB84 Quantum Key Distribution (QKD) protocol, implemented using the modern Qiskit 1.0+ SDK and NumPy.
With the transition to Qiskit 1.0 and the deprecation of many legacy interfaces, I found that there are relatively few clean and up-to-date reference implementations for experimenting with quantum key distribution. This project was developed to provide a modern baseline for QKD research and educational purposes.
šŸ› ļø Architectural Highlights
• Intercept-Resend Attack Simulation
Models an active eavesdropper (Eve) performing an intercept-resend attack, demonstrating measurement-induced state collapse and the security implications of the No-Cloning Theorem.
• Dynamic QBER Analysis
Continuously evaluates the Quantum Bit Error Rate (QBER). Whenever the error rate exceeds the theoretical security threshold of approximately 11%, the protocol automatically rejects the generated key material.
• Structured CLI Scenarios
Provides clear terminal-based simulations for both secure and compromised communication channels, enabling straightforward comparison of protocol behavior under different conditions.
šŸ”— Open-Source Repository
The repository includes the complete implementation, mathematical foundations, and usage instructions:
šŸ‘‰ https://github.com/TheSpacetimeDebugger/quantum-secure-bb84⁠�
I’d be interested to hear any feedback or suggestions regarding the implementation and overall architecture. šŸš€

Top comments (0)