Testing and analysis of quantum software
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
Quantum computing’s potential depends equally on hardware advancements and software reliability. As quantum software grows increasingly complex, comprehensive testing becomes essential to ensure its reliability and benefit from hardware progress. This thesis explores automatic testing techniques to strengthen the quantum software infrastructure by identifying bugs across multiple levels of the quantum software stack. The thesis begins with a literature survey examining the state of the art in quantum software testing and analysis, identifying gaps and establishing consistent terminology in this interdisciplinary field. An empirical study follows, investigating faults in quantum software, revealing the existence of quantum-specific bugs for the first time. The core contribution of this thesis lies in three practical approaches for bug detection in quantum software at both platform-level - software closer to quantum hardware - and program-level - software closer to end users and applications. For platform-level bug detection, this thesis introduces two approaches: MorphQ, the first testing tool that employs metamorphic testing to identify bugs in Qiskit, the most popular quantum computing platform; and QITE, the first cross-platform testing framework that leverages assembly-level representation to ensure consistency across different platforms. For program-level bug detection, this thesis presents LintQ, the first static analysis framework for detecting bugs in Qiskit-based quantum programs. The evaluation of these techniques revealed numerous issues in the current quantum software stack, including industrially relevant and widely adopted platforms like Qiskit, PyTket and PennyLane and real-world quantum programs. These findings represent a significant contribution toward strengthening the quantum software ecosystem and provide the quantum software engineering community with a foundational set of approaches to build upon and improve the reliability of quantum software.