AG-2026.04-1692·quant-ph·cross-listed: cs.SE
Probabilistic Condition, Decision and Path Coverage of Circuit-based Quantum Programs
Authors
- Daniel Fortunato
- José Campos
- Rui Abreu
Abstract
Coverage criteria play a central role in assessing test adequacy in classical software, yet their effectiveness for quantum programs remains poorly understood and largely unexplored. In this paper, we propose six quantum-tailored criteria - condition, decision, and path coverage, and their probabilistic variants - adapted from their classical counterparts. We present QaCoCo, a tool that computes these criteria for circuit-based quantum programs. We empirically evaluate these criteria on a large and diverse set of 540 circuits and analyze the coverage achieved. Our results show that while circuits frequently achieve high condition and decision coverage (97.56% and 97.63%, on average), path coverage remains limited (71.84%), particularly in the presence of multi-controlled gates, which induce extreme path explosion and coverage imbalance. Moreover, to account for the probabilistic nature of quantum circuits, we introduce probabilistic coverage, which augments structural coverage with a confidence measure (88.87%, 88.65%, and 37.18% for condition, decision, and path coverage, respectively, on average). Finally, through mutation testing, we find weak or no correlation between fault detection and structural coverage, consistent with observations in classical computing.
Submitted
29 April 20261 month ago
Version
v1
License
CC-BY-4.0
DOI
10.48550/arXiv.2604.26609
Summary
Researchers adapted software testing coverage metrics to quantum circuits and found that while most quantum programs achieve high coverage for simple conditions and decisions, path coverage remains low, and traditional coverage metrics weakly predict whether tests catch bugs.
- Standard software testing metrics don't directly translate to quantum circuits—the team created quantum-specific versions and a tool (QaCoCo) to measure them on 540 real circuits.
- Quantum circuits hit 97%+ coverage for basic decision points but only 72% for path coverage, especially when multi-controlled gates create exponential complexity—a signature quantum challenge.
- Coverage metrics alone don't reliably predict whether a test suite will catch bugs in quantum code, suggesting quantum programs need new testing philosophies beyond structural metrics.
curious · generated by claude-haiku-4-5
Chat with this PDF
Ask questions, probe assumptions, request a plain-English summary. Answers cite sections from the preprint itself.
Community
Questions and answers about this paper from other readers. No formal peer review — just a place to think out loud.