Testing Quantum Programs with Multiple Subroutines

08/19/2022
by   Peixun Long, et al.
0

Errors in quantum programs are challenging to track down due to the uncertainty of quantum programs. Testing is, therefore, an indispensable method for assuring the quality of quantum software. Existing testing methods focus only on testing quantum programs with quantum circuits or single subroutines and, therefore, cannot effectively test quantum programs with multi-subroutines. In this paper, we first discuss several critical issues that must be considered when testing multi-subroutine quantum programs and point out the limitations and problems with existing testing methods. We then present a novel framework for testing multi-subroutine quantum programs that allow for both unit and integration testing. Our framework includes two novel test coverage criteria for the equivalent class partition of quantum variables to guide our testing tasks and techniques to test quantum programs with several common patterns. We also discuss how to generate test cases based on our framework. To evaluate the effectiveness of our testing framework, we implemented a tool called QSharpTester for testing Q# programs with multiple subroutines. We used it to conduct experiments on hundreds of mutation programs deriving from seven original Q# programs. The experimental results show that our testing methods can deal with broader types of quantum programs than existing ones and perform well on almost all faulty mutation programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/30/2023

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

Quantum computing has emerged as a promising field with the potential to...
research
08/23/2018

Measuring Coverage of Prolog Programs Using Mutation Testing

Testing is an important aspect in professional software development, bot...
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...
research
10/16/2018

QuanFuzz: Fuzz Testing of Quantum Program

Nowadays, quantum program is widely used and quickly developed. However,...
research
03/16/2021

On Testing and Debugging Quantum Software

Quantum computers are becoming more mainstream. As more programmers are ...
research
08/31/2023

QuCAT: A Combinatorial Testing Tool for Quantum Software

With the increased developments in quantum computing, the availability o...

Please sign up or login with your details

Forgot password? Click here to reset