Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
184 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Testing Multi-Subroutine Quantum Programs: From Unit Testing to Integration Testing (2306.17407v2)

Published 30 Jun 2023 in cs.SE and quant-ph

Abstract: Quantum computing has emerged as a promising field with the potential to revolutionize various domains by harnessing the principles of quantum mechanics. As quantum hardware and algorithms continue to advance, developing high-quality quantum software has become crucial. However, testing quantum programs poses unique challenges due to the distinctive characteristics of quantum systems and the complexity of multi-subroutine programs. This paper addresses the specific testing requirements of multi-subroutine quantum programs. We begin by investigating critical properties by surveying existing quantum libraries and providing insights into the challenges of testing these programs. Building upon this understanding, we focus on testing criteria and techniques based on the whole testing process perspective, spanning from unit testing to integration testing. We delve into various aspects, including IO analysis, quantum relation checking, structural testing, behavior testing, integration of subroutine pairs, and test case generation. We also introduce novel testing principles and criteria to guide the testing process. We conduct comprehensive testing on typical quantum subroutines, including diverse mutants and randomized inputs, to evaluate our proposed approach. The analysis of failures provides valuable insights into the effectiveness of our testing methodology. Additionally, we present case studies on representative multi-subroutine quantum programs, demonstrating the practical application and effectiveness of our proposed testing principles and criteria.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (77)
  1. Scaffold: Quantum programming language. Tech. rep., Department of Computer Science, Princeton University, 2012.
  2. Metamorphic testing of oracle quantum programs. In 2022 IEEE/ACM 3rd International Workshop on Quantum Software Engineering (Q-SE) (2022), IEEE, pp. 16–23.
  3. Qiskit: An Open-source Framework for Quantum Computing.
  4. Assessing the effectiveness of input and output coverage criteria for testing quantum programs. In 2021 14th IEEE Conference on Software Testing, Verification and Validation (ICST) (2021), IEEE, pp. 13–23.
  5. Modeling quantum programs: challenges, initial results, and research directions. In Proceedings of the 1st ACM SIGSOFT International Workshop on Architectures and Paradigms for Engineering Quantum Software (2020), pp. 14–21.
  6. Using formal methods to derive test frames in category-partition testing. In Proceedings of COMPASS’94-1994 IEEE 9th Annual Conference on Computer Assurance (1994), IEEE, pp. 69–79.
  7. Introduction to software testing. Cambridge University Press, 2016.
  8. Computational complexity: a modern approach. Cambridge University Press, 2009.
  9. Stabilization of quantum computations by symmetrization. SIAM Journal on Computing 26, 5 (1997), 1541–1557.
  10. Quantum state discrimination. arXiv preprint arXiv:0810.1970v1 (2008).
  11. Beck, K. Test-driven development: by example. Addison-Wesley Professional, 2003.
  12. Parameterized quantum circuits as machine learning models. Quantum Science and Technology 4, 4 (nov 2019), 043001.
  13. Silq: A high-level quantum language with safe uncomputation and intuitive semantics. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (2020), pp. 286–300.
  14. Tight bounds on quantum searching. Tech. rep., 1996.
  15. Quantum fingerprinting. Physical Review Letters 87, 16 (2001), 167902.
  16. Improved quality of protocol testing through techniques of experimental design. In Proceedings of ICC/SUPERCOMM’94-1994 International Conference on Communications (1994), IEEE, pp. 745–752.
  17. Optimal large-scale quantum state tomography with pauli measurements.
  18. Variational quantum fidelity estimation. Quantum 4 (2020), 248.
  19. Metamorphic testing: a new approach for generating next test cases. technical report hkust-cs98-01. Hong Kong Univ. of Science and Technology (1998).
  20. Prescription for experimental determination of the dynamics of a quantum black box. Journal of Modern Optics 44, 11-12 (1997), 2455–2467.
  21. The AETG system: An approach to testing based on combinatorial design. IEEE Transactions on Software Engineering 23, 7 (1997), 437–444.
  22. The automatic efficient test generator (AETG) system. In Proceedings of 1994 IEEE International Symposium on Software Reliability Engineering (1994), IEEE, pp. 303–309.
  23. Exploiting dynamic quantum circuits in a quantum algorithm with superconducting qubits. Phys. Rev. Lett. 127 (Aug 2021), 100501.
  24. Ket quantum programming. ACM Journal on Emerging Technologies in Computing Systems (JETC) 18, 1 (2021), 1–25.
  25. Structured programming. Academic Press Ltd., 1972.
  26. Deutsch, D. Quantum theory, the church–turing principle and the universal quantum computer. Proceedings of the Royal Society of London. A. Mathematical and Physical Sciences 400, 1818 (1985), 97–117.
  27. Direct estimations of linear and nonlinear functionals of a quantum state. Physical review letters 88, 21 (2002), 217901.
  28. Quantum software models: The density matrix for classical and quantum software systems design. In 2nd IEEE/ACM International Workshop on Quantum Software Engineering, Q-SE@ICSE 2021, Madrid, Spain, June 1-2, 2021 (2021), IEEE, pp. 1–6.
  29. Ferreira, F. C. An Exploratory Study on the Usage of Quantum Programming Languages. PhD thesis, 2022.
  30. Direct fidelity estimation from few pauli measurements. Phys. Rev. Lett. 106 (Jun 2011), 230501.
  31. Mutation testing of quantum programs: A case study with Qiskit. IEEE Transactions on Quantum Engineering 3 (2022), 1–17.
  32. 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 (2022), pp. 797–800.
  33. Quantum software testing: State of the art. Journal of Software: Evolution and Process (2021), e2419.
  34. Quantum programming language: A systematic review of research topic and top cited languages. Archives of Computational Methods in Engineering 28 (2021), 289–310.
  35. Google AI Quantum Team. Cirq.
  36. An introduction to quantum programming in Quipper. In International Conference on Reversible Computation (2013), Springer, pp. 110–124.
  37. Quantum state tomography via compressed sensing. Physical review letters 105, 15 (2010), 150401.
  38. Creating superpositions that correspond to efficiently integrable probability distributions. arXiv preprint arXiv:quant-ph/0208112 (2002).
  39. Grover, L. K. A fast quantum mechanical algorithm for database search. In Proceedings of the twenty-eighth annual ACM symposium on Theory of computing (1996), pp. 212–219.
  40. isQ: An integrated software stack for quantum programming. IEEE Transactions on Quantum Engineering (2023), 1–18.
  41. Quantum algorithm for linear systems of equations. Physical review letters 103, 15 (2009), 150502.
  42. Property-based testing of quantum programs in Q#. In First International Workshop on Quantum Software Engineering (Q-SE 2020) (2020).
  43. Caqr: A compiler-assisted approach for qubit reuse through dynamic circuit. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3 (New York, NY, USA, 2023), ASPLOS 2023, Association for Computing Machinery, p. 59–71.
  44. Statistical assertions for validating patterns and finding bugs in quantum programs. In Proceedings of the 46th International Symposium on Computer Architecture (2019), pp. 541–553.
  45. QBugs: A collection of reproducible bugs in quantum algorithms and a supporting infrastructure to enable controlled quantum software testing and debugging experiments. In Second International Workshop on Quantum Software Engineering (Q-SE 2021) (2021), pp. 28–32.
  46. Knill, E. Approximation by quantum circuits, 1995.
  47. Knuth, D. E. The art of computer programming, Volume I: Fundamental Algorithms, 3rd Edition. Addison-Wesley, 1997.
  48. Projection-based runtime assertions for testing and debugging quantum programs. Proceedings of the ACM on Programming Languages 4, OOPSLA (2020), 1–29.
  49. 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 (2020), pp. 1017–1030.
  50. Systematic approaches for precise and approximate quantum state runtime assertion. In IEEE International Symposium on High-Performance Computer Architecture, HPCA 2021, Seoul, South Korea, February 27 - March 3, 2021 (2021), IEEE, pp. 179–193.
  51. Equivalence, identity, and unitarity checking in black-box testing of quantum programs. arXiv preprint arXiv:2307.01481 (2023).
  52. Muskit: A mutation analysis tool for quantum software testing. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE) (2021), IEEE, pp. 1266–1270.
  53. Mingsheng, Y. Foundations of Quantum Programming, 1st ed. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2016.
  54. On testing quantum programs. In 2019 IEEE/ACM 41st International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER) (2019), IEEE, pp. 57–60.
  55. Is your quantum program bug-free? In 2020 IEEE/ACM 42nd International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER) (2020), IEEE Computer Society, pp. 29–32.
  56. On testing and debugging quantum software. arXiv preprint arXiv:2103.09172 (2021).
  57. Noise-aware quantum software testing. arXiv preprint arXiv:2306.16992 (2023).
  58. Quantum computing: progress and prospects. National Academies Press, 2019.
  59. Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press, 2010.
  60. Ömer, B. Structured quantum programming. PhD thesis, Institute for Theoretical Physics, Technical University of Vienna, 2003.
  61. Modelling quantum circuits with uml. In 2021 IEEE/ACM 2nd International Workshop on Quantum Software Engineering (Q-SE) (2021), IEEE, pp. 7–12.
  62. Towards a quantum software modeling language. In First International Workshop on Quantum Software Engineering (Q-SE 2020) (2020).
  63. Preskill, J. Quantum computing in the nisq era and beyond. Quantum 2 (2018), 79.
  64. Qrisp: A framework for compilable high-level programming of gate-based quantum computers. PlanQC-Programming Languages for Quantum Computing (2022).
  65. Shor, P. W. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM review 41, 2 (1999), 303–332.
  66. Q#: enabling scalable quantum computing and development with a high-level DSL. In Proceedings of the Real World Domain Specific Languages Workshop 2018 (2018), pp. 1–10.
  67. Determination of quasiprobability distributions in terms of probability distributions for the rotated quadrature phase. Phys. Rev. A 40 (Sep 1989), 2847–2849.
  68. QuanFuzz: Fuzz testing of quantum program. arXiv preprint arXiv:1810.10310 (2018).
  69. QDiff: Differential testing of quantum software stacks. ASE.
  70. Application of combinatorial testing to quantum programs. In 2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS) (2021), IEEE, pp. 179–188.
  71. Generating failing test suites for quantum programs with search. In International Symposium on Search Based Software Engineering (2021), Springer, pp. 9–25.
  72. Mutation-based test generation for quantum programs with multi-objective search. In Proceedings of the Genetic and Evolutionary Computation Conference (2022), pp. 1345–1353.
  73. Quratest: Integrating quantum specific features in quantum program testing. In 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE) (2023), IEEE, pp. 1149–1161.
  74. Unambiguous discrimination of mixed quantum states. Physics Letters A 353, 4 (2006), 300–306.
  75. Discrimination between pure states and mixed states. Phys. Rev. A 75 (Jun 2007), 062306.
  76. Zhao, J. Quantum software engineering: Landscapes and horizons. arXiv preprint arXiv:2007.07047 (2020).
  77. Bugs4Q: A benchmark of real bugs for quantum programs. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE) (2021), IEEE, pp. 1373–1376.
Citations (9)

Summary

We haven't generated a summary for this paper yet.

X Twitter Logo Streamline Icon: https://streamlinehq.com