QuSema agent targets silent bugs in quantum libraries Qiskit and PennyLane
Researchers present QuSema, an autonomous testing agent that uses quantum semantics as an oracle to find non-crashing defects that conventional testing misses.
In plain words
Quantum software libraries can contain bugs that never cause crashes or error messages, so they quietly return wrong results. QuSema is an automated agent that reads a library's documentation and code, reasons about what quantum operations should do, and writes tests to confirm suspicious behavior. In a reported evaluation it found 40 previously unknown bugs that developers confirmed.
What was announced
The authors argue that existing testing for quantum libraries depends on failure-based or comparison-based oracles, which only flag problems when execution fails, breaks runtime checks, or disagrees with another implementation. When no suitable execution-based oracle exists, silent bugs can slip through and produce incorrect results that flow into experimental conclusions, simulation studies, and algorithm designs. QuSema instead treats constraints from quantum semantics and documentation as a source-level semantic oracle, checking whether implementation logic can turn valid inputs into invalid outputs.
The system runs an agentic loop: it repeatedly inspects API documentation and source code, reasons about intended behavior of quantum operations, identifies possible semantic deviations, and validates them by generating executable tests through library APIs, turning high-level mismatches into concrete, user-triggerable bug reports. Implemented for Qiskit and PennyLane, QuSema was evaluated on a benchmark of 20 historical silent bugs, where the authors report higher mean bug relocation counts than Claude Code and Codex, with a DeepSeek configuration costing less than Claude Code. It also discovered 40 previously unknown bugs confirmed by developers, 30 of them silent.
What it does not show
- The evidence is the paper's abstract only; full methodology, benchmark details, and how bug relocation counts were measured are not available in the supplied passages.
- Reported comparisons with Claude Code and Codex and the developer-confirmed bug counts come from the authors and are not independently verified.
For security and IT teams
- Scope
- QuSema was implemented for the Qiskit and PennyLane libraries; the abstract does not describe support for other quantum frameworks.
Sources
Source-support review completed 28 Nov 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 28 Nov 2026
New to the subject? AI from the Ground Up starts from the beginning.