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

06/30/2023
by   Peixun Long, et al.
0

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, the development of 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. In this paper, we address the specific testing requirements of multi-subroutine quantum programs. We begin by investigating critical properties through a survey of existing quantum libraries, providing insights into the challenges associated with testing these programs. Building upon this understanding, we present a systematic testing process tailored to the intricacies of quantum programming. The process covers unit testing and integration testing, with a focus on aspects such as IO analysis, quantum relation checking, structural testing, behavior testing, and test case generation. We also introduce novel testing principles and criteria to guide the testing process. To evaluate our proposed approach, we conduct comprehensive testing on typical quantum subroutines, including diverse mutations and randomized inputs. 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 processes, principles, and criteria.

READ FULL TEXT
research
08/19/2022

Testing Quantum Programs with Multiple Subroutines

Errors in quantum programs are challenging to track down due to the unce...
research
07/04/2023

Equivalence, Identity, and Unitarity Checking in Black-Box Testing of Quantum Programs

Quantum programs exhibit inherent non-deterministic behavior, which pose...
research
06/18/2023

On Refactoring Quantum Programs

Refactoring is a crucial technique for improving the efficiency and main...
research
04/18/2022

QuSBT: Search-Based Testing of Quantum Programs

Generating a test suite for a quantum program such that it has the maxim...
research
12/21/2018

On Testing Quantum Programs

A quantum computer (QC) can solve many computational problems more effic...
research
03/17/2021

An Integration Test Order Strategy to Consider Control Coupling

Integration testing is a very important step in software testing. Existi...
research
06/29/2023

Noise-Aware Quantum Software Testing

Quantum Computing (QC) promises computational speedup over classic compu...

Please sign up or login with your details

Forgot password? Click here to reset