A Virtualized BB84 QKD Simulator in Python Using Qiskit Aer for Education and Prototyping

Abstract

With the rapid advancement of quantum technologies, quantum key distribution (QKD) has become a key approach to secure communication. This study presents a software-only implementation of the BB84 QKD protocol developed in Python using IBM’s Qiskit Aer simulator. The proposed framework is designed for educational and prototyping purposes rather than for hardware-level security evaluation. The simulator models the core stages of BB84: random bit/basis generation, state preparation, basis-dependent measurement, sifting, and parameter estimation via QBER, followed by conceptual post-processing. Evaluation reports (i) the expected sifted-key ratio under random basis selection, (ii) the ideal-channel QBER behavior under noise-free Aer execution, and (iii) the theoretical intercept–resend detection probability derived from standard BB84 analysis. For sequences of ≥100 bits, the implementation matches standard BB84 expectations under ideal Aer execution: an expected sifted-key ratio of ≈50%, QBER → 0 in the absence of adversarial interference, and an intercept–resend detection probability above 99.9% for m = 100 disclosed verification bits. These results demonstrate that an idealized virtual environment can reproduce the BB84 measurement–disturbance trade-off in the information-theoretic sense, without claiming physical decoherence modeling unless an explicit Aer noise model is enabled. The analysis focuses on idealized BB84 behavior, where disturbance arises solely from basis mismatch and intercept– resend measurements rather than from physical decoherence or hardware noise models. The framework provides a reproducible platform for teaching and early-stage experimentation, with future work targeting realistic noise models and advanced post-processing.

Author Biography

Mert Büyükdede, Istanbul Atlas University, Faculty of Engineering and Natural Sciences, Department of Computer Engineering, Istanbul, Turkey

Dr. Mert Büyükdede is an assistant professor in the Department of Computer Engineering at Istanbul Atlas University. He received his BSc degree in Physics Education and his PhD degree in Physics Education from Dokuz Eylul University. His current research interests include physics education, quantum physics, computer science, and STEM education.

References

[1] Galindo, A., and Martín-Delgado, M. A. (2002). Information and computation: Classical and quantum aspects. Reviews of Modern Physics, 347-423. Online first publication. http//:doi.org/10.1103/RevModPhys.74.347

[2] Shannon, C. E. (1949). Communication theory of secrecy systems. The Bell System Technical Journal, 28(4), 656-715. Online first publication. http//:doi.org/10.1002/j.1538-7305.1949.tb00928.x

[3] Çelik, S. (2021). Kuantum Kriptolojisi ve Siber Güvenlik. Bilişim Teknolojileri Dergisi, 14(1), 53-64. Online first publication. http//:doi.org/10.17671/gazibtd.733309

[4] Hu, F., Lamata, L., Sanz, M., Chen, X., Chen, X., Wang, C., and Solano, E. (2020). Quantum computing cryptography: Finding cryptographic Boolean functions with quantum annealing by a 2000 qubit D-Wave quantum computer. Physics Letters A, 126214, Online first publication. http//:doi.org/10.1016/j.physleta.2019.126214.

[5] Furrer, F. J. (2020). Roger A. Grimes. Cryptography Apocalypse: Preparing for the Day When Quantum Computing Breaks Today’s Crypto. Springer.

[6] Clixto, M. (2009). Quantum computation and cryptography: An overview. Natural Computing, 8(4), 663. Online first publication. http//:doi.org/10.1007/s11047-008-9094-8

[7] Gürsakal, N., and Çelik, S. (2020). Kuantum Bilgisayarlar Teknolojik Anlamda Ne Getirecek? Küresel Ekonomiye Yön Veren Yeni Teknolojiler. Ankara: Akçağ Yayınları.

[8] Feynman, R. P. (1982). Simulating physics with computers. International Journal of Theoretical Physics, 21, 6-7. Online first publication. http//:doi.org/10.1007/BF02650179

[9] Preskill, J. (2018). Quantum Computing in the NISQ era and beyond. Quantum, 2, 79. Online first publication. doi:10.22331/q-2018-08-06-79

[10] Chen, L., Jordan, S., Liu, Y. K., Moody, D., Peralta, R., Perlner, R., and Smith-Tone, D. (2016). Report on post-quantum cryptography. US Department of Commerce, National Institute of Standards and Technology, 12, 1-8. Online first publication. http//:doi.org/10.6028/NIST.IR.8105

[11] Microsoft Azure (2022). “Kübit nedir?”, Received From: https://azure.microsoft.com/tr-tr/resources/cloud-computing-dictionary/what-is-a-qubit/#introduction

[12] Montanaro, A. (2016). Quantum algorithms: An overview. npj Quantum Information, 2(1), 1-8. Online first publication. http//:doi.org/10.1038/npjqi.2015.23.

[13] Shor, P. W. (1994). Algorithms for quantum computation: Discrete logarithms and factoring. Proceedings 35th Annual Symposium on Foundations of Computer Science, Santa Fe, NM, USA, 124-134. Online first publication. http//:doi.org/10.1109/SFCS.1994.365700

[14] Grover, L. K. (1997). Quantum mechanics helps in searching for a needle in a haystack. Physical Review Letters, 79(2), 325. Online first publication. http//:doi.org/10.1103/PhysRevLett.79.325

[15] Hassan, N. A., and Hijazi, R. (2017). Data hiding techniques in Windows OS: A practical approach to investigation and defense. Syngress. Received From: https://www.researchgate.net/publication/317973198_Data_hiding_techniques_in_Windows_OS_A_Practical_approach_to_investigation_and_defense

[16] Şahin, F. (2015). Modern Blok Şifreleme Algoritmaları. İstanbul Aydın Üniversitesi Dergisi, 7(26), 23-40. Online first publication. http//:doi.org/10.17932/IAU.IAUD.m.13091352.2015.7/26.15-21

[17] Toyran, M. (2007). Quantum Cryptography. IEEE 15th Signal Processing and Communications Applications, 1-4. Online first publication. http//:doi.org/10.1109/SIU.2007.4298797

[18] Gümüş, E. (2011, February). Quantum cryptography and key distribution protocols. Paper presented at the Academic Computing Conference, İnönü University, Malatya. https://ab.org.tr/ab11/ozet/27.html

[19] Sasaki, M., Fujiwara, M., Ishizuka, H., Klaus, W., Wakui, K., Takeoka, M., and Zeilinger, A. (2011). Field test of quantum key distribution in the Tokyo QKD Network. Optics Express, 19(11), 10387-10409. Online first publication. http//doi.org/10.1364/OE.19.010387

[20] Peev, M., Pacher, C., Alléaume, R., Barreiro, C., Bouda, J., Boxleitner, W., and Zeilinger, A. (2009). The SECOQC quantum key distribution network in Vienna. New Journal of Physics, 11(7), 075001. Online first publication. doi:10.1088/1367-2630/11/7/075001

[21] Elliott, C., Colvin, A., Pearson, D., Pikalo, O., Schlafer, J., and Yeh, H. (2005). Current status of the DARPA quantum network. In Quantum Information and Computation III, 5815, 138-149. Online first publication. http//:doi.org/10.48550/arXiv.quant-ph/0503058

[22] Stucki, D., Legre, M., Buntschu, F., Clausen, B., Felber, N., Gisin, N., ... and Zbinden, H. (2011). Long-term performance of the SwissQuantum quantum key distribution network in a field environment. New Journal of Physics, 13(12), 123001. Online first publication. http//:doi.org/10.1088/1367-2630/13/12/123001

[23] Xu, F., Chen, W., Wang, S., Yin, Z., Zhang, Y., Liu, Y., ... and Guo, G. (2009). Field experiment on a robust hierarchical metropolitan quantum cryptography network. Chinese Science Bulletin, 54(17), 2991-2997. Online first publication. http//:doi.org/10.48550/arXiv.0906.3576

[24] Hughes, R. J., Nordholt, J. E., McCabe, K. P., Newell, R. T., Peterson, C. G., and Somma, R. D. (2013). Network-Centric Quantum Communications. In Frontiers in Optics 2013. Online first publication. doi: https://doi.org/10.48550/arXiv.1305.0305

[25] Koushik, C. S. N., Choubey, S. B., Choubey, A., and Pachori, K. (2020). A Literature Review on Quantum Experiments at Space Scale—QUESS Satellite. Innovations in Electronics and Communication Engineering, 13-25.

[26] Cross, A. (2018). The IBM Q experience and QISKit open-source quantum computing software. APS 2018, L58-003.

[27] IBM (2018). Kuantum Devreleri İçin Açık Bir Yüksek Performans Simülatörü, IBM Araştırma Yazı İşleri Ekibi. Received From: https://qiskit.org/documentation/tutorials/simulators/1_aer_provider.html

[28] Bennett, C. H., and Brassard, G. (1984). Quantum cryptography: Public key distribution and coin tossing. Proceedings of IEEE International Conference on Computers, Systems and Signal Processing, Bangalore, India, 175–179. https://doi.org/10.48550/arXiv.2003.06557

[29] Ekert, A. K. (1991). Quantum cryptography based on Bell’s theorem. Physical Review Letters, 67(6), 661–663. https://doi.org/10.1103/PhysRevLett.67.661

[30] Pirandola, S., Andersen, U. L., Banchi, L., Berta, M., Bunandar, D., Colbeck, R., et al. (2020). Advances in quantum cryptography. Advances in Optics and Photonics, 12(4), 1012–1236. https://doi.org/10.1364/AOP.361502

[31] Coopmans, T., Knegjens, R., Dahlberg, A., Maier, D., van Dam, S., and Wehner, S. (2020). NetSquid: A NETwork Simulator for QUantum Information using Discrete events. Quantum Science and Technology, 5(2), 025003 https://doi.org/10.1088/2058-9565/ab6bf9

[32] Dahlberg, A., Skrzypczyk, M., Coopmans, T., and Wehner, S. (2018). SimulaQron: An emulator for developing quantum internet software. npj Quantum Information, 4, 29. https://doi.org/10.1038/s41534-018-0070-7

[33] Aguado, A., Kraft, M., van der Meer, R., and Wehner, S. (2021–2024). QuISP: A Quantum Internet Simulation Package. Software Repository: https://github.com/sfc-aqua/quisp

Authors

  • Mert Büyükdede Istanbul Atlas University, Faculty of Engineering and Natural Sciences, Department of Computer Engineering, Istanbul, Turkey

DOI:

https://doi.org/10.31449/inf.v50i13.9101

Downloads

Published

05/18/2026

How to Cite

Büyükdede, M. (2026). A Virtualized BB84 QKD Simulator in Python Using Qiskit Aer for Education and Prototyping. Informatica, 50(13). https://doi.org/10.31449/inf.v50i13.9101