On Testing Quantum Programs

Andriy Miranskyy,Lei Zhang
DOI: https://doi.org/10.1109/ICSE-NIER.2019.00023
2018-12-22
Abstract:A quantum computer (QC) can solve many computational problems more efficiently than a classic one. The field of QCs is growing: companies (such as DWave, IBM, Google, and Microsoft) are building QC offerings. We position that software engineers should look into defining a set of software engineering practices that apply to QC's software. To start this process, we give examples of challenges associated with testing such software and sketch potential solutions to some of these challenges.
Software Engineering,Emerging Technologies,Quantum Physics
What problem does this paper attempt to address?
This paper attempts to address the challenges in quantum computer software testing. Specifically, the author focuses on the need for software engineers to define a series of software engineering practices applicable to quantum computer software as the technology of quantum computers (QC) develops. In the paper, this discussion process is initiated by presenting some examples of challenges in quantum computer software testing and proposing potential solutions to these challenges. ### Main Issues 1. **Applicability of Quantum Computers**: - The paper first introduces the advantages of quantum computers over classical computers in solving certain specific problems, such as efficiently simulating quantum systems and quickly cracking encryption algorithms. - It emphasizes the advantages of quantum computers in handling problems in the BQP (Bounded - Error Quantum Polynomial Time) class, which may not be effectively solved on classical computers. 2. **Testing Challenges of Quantum Computers**: - **White - Box Testing and Black - Box Testing**: Due to the black - box nature of quantum computers, traditional white - box testing methods (such as interactive debugging) are difficult to apply. Therefore, the paper explores how to conduct effective black - box testing on quantum computers. - **Verification and Validation**: The paper discusses how to ensure the correctness and effectiveness of quantum computer programs, especially how to perform verification in the case where there may be errors in the hardware, operating system, and compiler of quantum computers. 3. **Migration and Innovation of Software Engineering Practices**: - The paper raises an important question: which existing software engineering practices can be migrated to the field of quantum computers, which need to be modified, and which new practices need to be created. - For example, static analysis methods such as code review and code inspection can be applied to quantum computer software, but interactive debugging faces huge challenges. ### Solutions - **White - Box Testing**: Although interactive debugging on actual quantum computers is not feasible, white - box testing can be carried out on quantum simulators. In addition, the paper suggests developing new testing tools and techniques to meet these challenges. - **Verification and Validation**: To ensure the correctness of quantum computer programs, the paper suggests using multiple methods, including running the same program on different quantum computers to compare results and developing new verification protocols (such as protocols for verifying quantum computing results using classical computers). - **Software Engineering Practices**: The paper calls on the software engineering community to start exploring and defining software engineering practices applicable to quantum computers, including methods and techniques for testing, verification, and validation. ### Conclusion The paper emphasizes that as quantum computer technology becomes increasingly mature, software engineers need to start considering how to apply existing software engineering practices to the field of quantum computers and develop new methods to solve the unique challenges of quantum computers. This will not only help improve the quality of quantum computer software but also promote the further development and application of quantum computing technology.