Skip to content

Quantum Debugging in Action: Statistical and State Vector Assertions

Coco Gong, Rena Feng, Era Thaqi, Margaret Martonosi

quant-ph

Abstract

Debugging quantum programs presents fundamentally different challenges from classical debugging: quantum systems have exponentially large state spaces, and measuring a quantum state collapses it. Our assertion-based approach provides debugging support despite these constraints, and we implement it in NVIDIA CUDA-Q, which has recently gained rapid adoption due to its GPU-accelerated simulation and hardware integration capabilities. This tool, QDB3, provides a Python assertions library that extends prior work in sampling-based assertions with state vector assertions that directly inspect simulated amplitudes. We demonstrate the complementary usage of both assertion forms in a set of teaching examples, including deterministic, variational, and other circuit types.

Create a lesson

Metadata

Comments
2 pages, 2 figures, accepted as a poster paper at IEEE QCE 2026