Automatically Refining Assertions for Efficient Debugging of Quantum Programs
Preprint
Abstract
As new advancements in the field of quantum computing lead to the development of increasingly complex programs, approaches to validate and debug these programs are becoming more important. To this end, methods employed in classical debugging, such as assertions for testing specific properties of a program's state, have been adapted for quantum programs. However, to efficiently debug quantum programs, it is key to properly place these assertions. This usually requires a deep understanding of the program's underlying mathematical properties, constituting a time-consuming manual task for developers. To address this problem, this work proposes methods for automatically refining assertions in quantum programs by moving them to more favorable positions in the program or by placing new assertions that help to further narrow down potential error locations. This allows developers to take advantage of rich and expressive assertions that greatly improve the debugging experience without requiring them to place these assertions manually in an otherwise tedious manner. An open-source implementation of the proposed methods is available at https://github.com/cdatum/mqt-debugger.Keywords
All Related Versions
This publication has 11 references indexed in Scilit:
- Testing and Debugging Quantum CircuitsIEEE Transactions on Quantum Engineering, 2024
- A Literature Survey of Assertions in Software Testing2023
- Bugs4Q: A benchmark of existing bugs to enable controlled testing and debugging studies for quantum programsJournal of Systems and Software, 2023
- symQV: Automated Symbolic Verification of Quantum Programs2023
- Quantum software testing: State of the artJournal of Software: Evolution and Process, 2021
- Is your quantum program bug-free?2020
- Invariants of quantum programs: characterisations and generationACM SIGPLAN Notices, 2017
- Debugging quantum processes using monitoring measurementsPhysical Review A, 2014
- The Daikon system for dynamic detection of likely invariantsScience of Computer Programming, 2007
- A practical approach to programming with assertionsIEEE Transactions on Software Engineering, 1995