Testing Multi-Subroutine Quantum Programs: From Unit Testing to Integration Testing

被引:4
作者
Long, Peixun [1 ,2 ]
Zhao, Jianjun [3 ]
机构
[1] Chinese Acad Sci, Inst Software, State Key Lab Comp Sci, Beijing, Peoples R China
[2] Univ Chinese Acad Sci, Beijing, Peoples R China
[3] Kyushu Univ, Fac Informat Sci & Elect Engn, Fukuoka, Japan
基金
中国国家自然科学基金;
关键词
Quantum computing; software testing; unit testing; integration testing;
D O I
10.1145/3656339
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 article 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.
引用
收藏
页数:61
相关论文
共 76 条
  • [1] Abhari Ali, 2012, Scaffold: Quantum programming language
  • [2] Metamorphic Testing of Oracle Quantum Programs
    Abreu, Rui
    Fernandes, Joao Paulo
    Liana, Luis
    Tavares, Guilherme
    [J]. 3RD INTERNATIONAL WORKSHOP ON QUANTUM SOFTWARE ENGINEERING (Q-SE 2022), 2022, : 16 - 23
  • [3] Aleksandrowicz Gadi, 2019, Zenodo, DOI 10.5281/ZENODO.2562111
  • [4] Ali Shaukat, 2020, APEQS 2020: Proceedings of the 1st SIGSOFT International Workshop on Architectures and Paradigms for Engineering Quantum Software, P14, DOI 10.1145/3412451.3428499
  • [5] Assessing the Effectiveness of Input and Output Coverage Criteria for Testing Quantum Programs
    Ali, Shaukat
    Arcaini, Paolo
    Wang, Xinyi
    Yue, Tao
    [J]. 2021 14TH IEEE CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST 2021), 2021, : 13 - 23
  • [6] AMMANN P, 1994, COMPASS '94 - PROCEEDINGS OF THE NINTH ANNUAL CONFERENCE ON COMPUTER ASSURANCE, P69, DOI 10.1109/CMPASS.1994.318466
  • [7] [Anonymous], 2016, Introduction to software testing
  • [8] Arora S, 2009, COMPUTATIONAL COMPLEXITY: A MODERN APPROACH, P1, DOI 10.1017/CBO9780511804090
  • [9] Stabilization of quantum computations by symmetrization
    Barenco, A
    Berthiaume, A
    Deutsch, D
    Ekert, A
    Jozsa, R
    Macchiavello, C
    [J]. SIAM JOURNAL ON COMPUTING, 1997, 26 (05) : 1541 - 1557
  • [10] Beck Kent L., 2003, Test-driven development: by example