A Framework for the Efficient Evaluation of Runtime Assertions on Quantum Computers
Preprint
Abstract
The continuous growth of quantum computing and the increasingly complex quantum programs resulting from it lead to unprecedented obstacles in ensuring program correctness. Runtime assertions are, therefore, becoming a crucial tool in the development of quantum programs. They assist developers in the debugging process and help to test and verify the program. However, while assertions can be implemented in a straightforward manner on classical computers, physical limitations of quantum computers pose considerable challenges for the evaluation of quantum assertions. Access to the quantum state of a program is limited, execution time is expensive and noise can significantly distort measurement outcomes. To address these problems, this work proposes a framework that assists developers in the evaluation of runtime assertions on real quantum computers. It translates a variety of assertions into sets of measurements, reduces execution overhead where possible and evaluates the measurement results after the execution even in the presence of noise. This approach substantially aids developers in the debugging process, enabling efficient assertion-driven debugging even in large programs. The proposed framework is available as an open-source implementation at https://github.com/munich-quantum-toolkit/debuggerKeywords
All Related Versions
This publication has 16 references indexed in Scilit:
- Automatically Refining Assertions for Efficient Debugging of Quantum Programs2025
- A Framework for Debugging Quantum Programs2025
- symQV: Automated Symbolic Verification of Quantum Programs2023
- Quantum software testing: State of the artJournal of Software: Evolution and Process, 2021
- Hardware-efficient variational quantum eigensolver for small molecules and quantum magnetsNature, 2017
- A variational eigenvalue solver on a photonic quantum processorNature Communications, 2014
- Debugging quantum processes using monitoring measurementsPhysical Review A, 2014
- Efficient quantum state tomographyNature Communications, 2010
- A practical approach to programming with assertionsIEEE Transactions on Software Engineering, 1995
- Determination of quasiprobability distributions in terms of probability distributions for the rotated quadrature phasePhysical Review A, 1989