Testing and Debugging Quantum Programs: The Road to 2030 (2405.09178v2)
Abstract: Quantum computing has existed in the theoretical realm for several decades. Recently, quantum computing has re-emerged as a promising technology to solve problems that a classical computer could take hundreds of years to solve. However, there are challenges and opportunities for academics and practitioners regarding software engineering practices for testing and debugging quantum programs. This paper presents a roadmap for addressing these challenges, pointing out the existing gaps in the literature and suggesting research directions. We discuss the limitations caused by noise, the no-cloning theorem, the lack of a standard architecture for quantum computers, among others. Regarding testing, we highlight gaps and opportunities related to transpilation, mutation analysis, input states with hybrid interfaces, program analysis, and coverage. For debugging, we present the current strategies, including classical techniques applied to quantum programs, quantum-specific assertions, and quantum-related bug patterns. We introduce a conceptual model to illustrate concepts regarding the testing and debugging of quantum programs and the relationship between them. Those concepts are used to identify and discuss research challenges to cope with quantum programs through 2030, focusing on the interfaces between classical and quantum computing and on creating testing and debugging techniques that take advantage of the unique quantum computing characteristics.
- Metamorphic Testing of Oracle Quantum Programs. In Proceedings of the IEEE/ACM 3rd International Workshop on Quantum Software Engineering (Q-SE 2022). IEEE Computer Society, Los Alamitos, CA, USA, 16–23. https://doi.org/10.1145/3528230.3529189
- Assessing the Effectiveness of Input and Output Coverage Criteria for Testing Quantum Programs. In Proceedings of the 14th IEEE Conference on Software Testing, Verification and Validation (ICST’21). IEEE, Porto de Galinhas, Brazil, 13–23.
- Shaukat Ali and Tao Yue. 2023. On the Need of Quantum-Oriented Paradigm. In Proceedings of the 2nd International Workshop on Quantum Programming for Software Engineering (¡conf-loc¿, ¡city¿San Francisco¡/city¿, ¡state¿CA¡/state¿, ¡country¿USA¡/country¿, ¡/conf-loc¿) (QP4SE 2023). Association for Computing Machinery, New York, NY, USA, 17–20. https://doi.org/10.1145/3617570.3617868
- When software engineering meets quantum computing. Commun. ACM 65, 4 (mar 2022), 84–88. https://doi.org/10.1145/3512340
- Qiskit: An Open-source Framework for Quantum Computing. https://doi.org/10.5281/zenodo.2573505
- Entanglλ𝜆\lambdaitalic_λe: A Translation Framework from Quipper Programs to Quantum Markov Chains. In New Frontiers in Quantitative Methods in Informatics, Simonetta Balsamo, Andrea Marin, and Enrico Vicario (Eds.). Springer International Publishing, Cham, 113–126.
- Thinking Too Classically: Research Topics in Human-Quantum Computer Interaction. In Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems (Glasgow, Scotland Uk) (CHI ’19). Association for Computing Machinery, New York, NY, USA, 1––12. https://doi.org/10.1145/3290605.3300486
- José Campos and André Souto. 2021. Qbugs: A collection of reproducible bugs in quantum algorithms and a supporting infrastructure to enable controlled quantum software testing and debugging experiments. In Proceedings of the IEEE/ACM 2nd International Workshop on Quantum Software Engineering (Q-SE 2021). IEEE Computer Society, Madrid, Spain, 28–32.
- Partial Equivalence Checking of Quantum Circuits. https://doi.org/10.48550/ARXIV.2208.07564
- Elías F. Combarro. 2022. Quantum Computing Foundations. In Quantum Software Engineering, Manuel A. Serrano, Ricardo Pérez-Castillo, and Mario Piattini (Eds.). Springer, Switzerland, Chapter 1, 1–24.
- Quantum Software Testing: Current Trends and Emerging Proposals. In Quantum Software Engineering, Manuel A. Serrano, Ricardo Pérez-Castillo, and Mario Piattini (Eds.). Springer, Switzerland, Chapter 9, 167–191.
- Software Engineering Challenges for Quantum Computing: Report from the First Working Seminar on Quantum Software Engineering (WSQSE 22). SIGSOFT Softw. Eng. Notes 48, 2 (apr 2023), 29––32. https://doi.org/10.1145/3587062.3587071
- QMutPy: A Mutation Testing Tool for Quantum Algorithms and Applications in Qiskit. In Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis (Virtual, South Korea) (ISSTA 2022). Association for Computing Machinery, New York, NY, USA, 797–800. https://doi.org/10.1145/3533767.3543296
- Quantum software testing: State of the art. Journal of Software: Evolution and Process 35, 4 (2021), e2419. https://doi.org/10.1002/smr.2419
- Testable Designs of Toffoli Fredkin Reversible Circuits. https://doi.org/10.48550/ARXIV.2108.07448
- Off-the-shelf Components for Quantum Programming and Testing. In Proceedings of the 1st Quantum Software Engineering and Technology Workshop (Q-SET’20, Vol. 2705), Ricardo Pérez-Castillo, Mario Piattini, Guido Peterssen, and Jose Luis Hevia (Eds.). CEUR-WS.org, Denver, USA, 14–19. http://ceur-ws.org/Vol-2705/short2.pdf
- Google. 2022. Production ML Systems. https://developers.google.com/machine-learning/crash-course/production-ml-systems. Accessed: March 31st, 2024..
- Supervised learning with quantum-enhanced feature spaces. Nature 567, 7747 (March 2019), 209–212. https://doi.org/10.1038/s41586-019-0980-2
- Jack D. Hidary. 2019. Quantum Computing: An Applied Approach. Springer. [Online; accessed 2022-08-02].
- Property-Based Testing of Quantum Programs in Q#. In Proceedings of the IEEE/ACM 42nd International Conference on Software Engineering Workshops (Seoul, Republic of Korea) (ICSEW’20). Association for Computing Machinery, New York, NY, USA, 430––435. https://doi.org/10.1145/3387940.3391459
- Yipeng Huang and Margaret Martonosi. 2018. QDB: from quantum algorithms towards correct quantum programs. arXiv preprint arXiv:1811.05447 (2018).
- Yipeng Huang and Margaret Martonosi. 2019. Statistical Assertions for Validating Patterns and Finding Bugs in Quantum Programs. In Proceedings of the 46th International Symposium on Computer Architecture (Phoenix, Arizona) (ISCA ’19). Association for Computing Machinery, New York, NY, USA, 541–553. https://doi.org/10.1145/3307650.3322213
- Quantum Computing for the Quantum Curious. Springer Nature. [Online; accessed 2022-08-02].
- IBM. 2024. IBM Composer. https://quantum.ibm.com/composer. Accessed: March 31st, 2024..
- Kamil Khadiev. 2022. Lecture Notes on Quantum Algorithms. https://arxiv.org/abs/2212.14205
- Martin Laforest. 2015. The mathematics of quantum mechanics. University of Waterloo (2015).
- Projection-Based Runtime Assertions for Testing and Debugging Quantum Programs. In Projection-Based Runtime Assertions for Testing and Debugging Quantum Programs, Vol. 4. Association for Computing Machinery, New York, NY, USA, Article 150, 29 pages. https://doi.org/10.1145/3428218
- Exploiting Quantum Assertions for Error Mitigation and Quantum Program Debugging. In 2022 IEEE 40th International Conference on Computer Design (ICCD). 124–131. https://doi.org/10.1109/ICCD56317.2022.00028
- Quantum Circuits for Dynamic Runtime Assertions in Quantum Computation. In Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems (Lausanne, Switzerland) (ASPLOS ’20). Association for Computing Machinery, New York, NY, USA, 1017–1030. https://doi.org/10.1145/3373376.3378488
- Ji Liu and Huiyang Zhou. 2021. Systematic Approaches for Precise and Approximate Quantum State Runtime Assertion. In 2021 IEEE International Symposium on High-Performance Computer Architecture (HPCA). 179–193. https://doi.org/10.1109/HPCA51647.2021.00025
- Peixun Long and Jianjun Zhao. 2022. Testing Quantum Programs with Multiple Subroutines. https://doi.org/10.48550/ARXIV.2208.09206
- A Comprehensive Study of Bug Fixes in Quantum Programs. https://doi.org/10.48550/ARXIV.2201.08662
- Muskit: A Mutation Analysis Tool for Quantum Software Testing. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE). 1266–1270. https://doi.org/10.1109/ASE51524.2021.9678563
- Sara Ayman Metwalli and Rodney Van Meter. 2022. A Tool For Debugging Quantum Circuits. In 2022 IEEE International Conference on Quantum Computing and Engineering (QCE). 624–634. https://doi.org/10.1109/QCE53715.2022.00085
- Nir Minerbi. 2022. Quantum Software Development with Classiq. Springer International Publishing, Cham, 269–280. https://doi.org/10.1007/978-3-031-05324-5_14
- Andriy Miranskyy. 2022. Using Quantum Computers to Speed up Dynamic Testing of Software (QP4SE 2022). Association for Computing Machinery, New York, NY, USA, 26–31. https://doi.org/10.1145/3549036.3562061
- Andriy Miranskyy and Lei Zhang. 2019. On Testing Quantum Programs. In Proceedings of the 41st International Conference on Software Engineering: New Ideas and Emerging Results (Montreal, Quebec, Canada) (ICSE-NIER 19). IEEE Press, 57–60. https://doi.org/10.1109/ICSE-NIER.2019.00023
- Is Your Quantum Program Bug-Free?. In Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering: New Ideas and Emerging Results (Seoul, South Korea) (ICSE-NIER ’20). Association for Computing Machinery, New York, NY, USA, 29–32. https://doi.org/10.1145/3377816.3381731
- A design for testability technique for quantum reversible circuits. In East-West Design & Test Symposium (EWDTS 2013). 1–4. https://doi.org/10.1109/EWDTS.2013.6673147
- Michael A. Nielsen and Isaac L. Chuang. 2011. Quantum Computation and Quantum Information: 10th Anniversary Edition (10th ed.). Cambridge University Press, USA.
- Santiago Núñez-Corrales. 2023. Quantum abstract machines without circuits: the need for higher algorithmic expressiveness. arXiv:2307.08422 [quant-ph]
- OpenQasm. 2024. OpenQASM Live Specification. https://openqasm.com. Accessed: March 31st, 2024..
- Matteo Paltenghi and Michael Pradel. 2022a. Bugs in Quantum Computing Platforms: An Empirical Study. 6, OOPSLA1, Article 86 (apr 2022), 27 pages. https://doi.org/10.1145/3527330
- Matteo Paltenghi and Michael Pradel. 2022b. MorphQ: Metamorphic Testing of Quantum Computing Platforms. https://doi.org/10.48550/ARXIV.2206.01111
- Fault Testing for Reversible Circuits. https://doi.org/10.48550/ARXIV.QUANT-PH/0404003
- Tirthak Patel and Devesh Tiwari. 2021. Qraft: Reverse Your Quantum Circuit and Know the Correct Program Output (ASPLOS ’21). Association for Computing Machinery, New York, NY, USA, 443–455. https://doi.org/10.1145/3445814.3446743
- Maria Schuld and Francesco Petruccione. 2021. Machine Learning with Quantum Computers. Springer Nature. [Online; accessed 2022-08-02].
- Osvaldo Simeone. 2022. An Introduction to Quantum Machine Learning for Engineers. arXiv:2205.09510
- qHiPSTER: The Quantum High Performance Software Testing Environment.
- D.D. Stancil and G.T. Byrd. 2022. Principles of Superconducting Quantum Computers. Wiley. https://books.google.de/books?id=zc94zQEACAAJ
- ProjectQ: an open source software framework for quantum computing. 2 (jan 2018), 49.
- Qiskit Development Team. 2021. Qiskit AerSimulator. https://qiskit.org/ecosystem/aer/stubs/qiskit_aer.AerSimulator.html. Accessed: April 27, 2023.
- W.F. Tichy. 1998. Should computer scientists experiment more? Computer 31, 5 (1998), 32–40. https://doi.org/10.1109/2.675631
- Essentials of software engineering. Jones & Bartlett Learning.
- Poster: Fuzz Testing of Quantum Program. In 2021 14th IEEE Conference on Software Testing, Verification and Validation (ICST). IEEE. https://doi.org/10.1109/icst49551.2021.00061
- QDiff: Differential Testing of Quantum Software Stacks. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE). 692–704. https://doi.org/10.1109/ASE51524.2021.9678792
- Guess What Quantum Computing Can Do for Test Case Optimization. arXiv:2312.15547 [cs.SE]
- Application of Combinatorial Testing to Quantum Programs. In 2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS). IEEE. https://doi.org/10.1109/qrs54544.2021.00029
- QuSBT: Search-Based Testing of Quantum Programs. In 2022 IEEE/ACM 44th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion). IEEE. https://doi.org/10.1109/icse-companion55297.2022.9793826
- Test Case Minimization with Quantum Annealers. arXiv:2308.05505 [cs.SE]
- Shigeru Yamashita and Igor L. Markov. 2009. Fast Equivalence-checking for Quantum Circuits. (2009). https://doi.org/10.48550/ARXIV.0909.4119
- Invariants of Quantum Programs: Characterisations and Generation. SIGPLAN Not. 52, 1 (jan 2017), 818–832. https://doi.org/10.1145/3093333.3009840
- Jianjun Zhao. 2020. Quantum Software Engineering: Landscapes and Horizons. https://doi.org/10.48550/ARXIV.2007.07047
- An Empirical Study of Bugs in Quantum Machine Learning Frameworks. arXiv:2306.06369 [cs.SE]
- Identifying Bug Patterns in Quantum Programs. https://doi.org/10.48550/ARXIV.2103.09069
- Bugs4Q: A Benchmark of Real Bugs for Quantum Programs. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE Computer Society, Los Alamitos, CA, USA, 1373–1376. https://doi.org/10.1109/ASE51524.2021.9678908