PapersSelected

QuSema Agent Detects Silent Bugs in Qiskit and PennyLane

QuSema: Detecting Silent Bugs in Quantum Libraries via Quantum-knowledge-enhanced Agents

Why we picked it

Silent bugs in quantum libraries can corrupt research results without any crash or error, and conventional testing oracles miss them when no reference implementation exists. QuSema's semantic-oracle approach shows domain reasoning can replace execution-based checks, outperforming general coding agents like Claude Code and Codex on this task. Developers maintaining quantum SDKs, and researchers whose simulations depend on Qiskit or PennyLane, should watch its confirmed findings and consider semantic-guided testing in their workflows.

QuSema is an autonomous testing agent that finds silent bugs in quantum libraries by using quantum semantics and documentation as a source-level semantic oracle.

Body

It runs an agentic loop that inspects API documentation and source code, reasons about intended quantum operation behavior, and validates suspected deviations with executable tests generated through library APIs.

The tool is implemented for Qiskit and PennyLane.On a benchmark of 20 historical silent bugs, QuSema achieved higher mean bug relocation counts than Claude Code and Codex, with its DeepSeek configuration costing less than Claude Code.

It also discovered 40 previously unknown bugs confirmed by developers, 30 of them silent.

Original · arXiv: DeepSeek

QuSema: Detecting Silent Bugs in Quantum Libraries via Quantum-knowledge-enhanced Agents

Quantum libraries are now critical infrastructure for quantum algorithm development, yet their correctness remains difficult to test. Existing testing techniques mainly rely on failure-based or comparison-based oracles, exposing bugs only when executions fail, violate runtime checks, or disagree with another implementation. Their applicability is limited when suitable execution-based oracles are unavailable, leaving some silent bugs undetected. Such missed bugs can produce incorrect results that propagate into experimental conclusions, simulation studies, and algorithmic designs. Here we present QuSema, an autonomous testing agent for finding silent bugs in quantum libraries. QuSema uses constraints from quantum semantics and documentation as a source-level semantic oracle to assess whether implementation logic can produce invalid outputs from valid inputs. It operates through an agentic loop that repeatedly inspects library API documentation and source code, reasons about the intended behavior of quantum operations, identifies potential semantic deviations, and validates them by generating executable tests through library APIs. Guided by quantum-domain reasoning, QuSema turns high-level behavioral mismatches into concrete, user-triggerable bug reports, enabling it to uncover non-crash defects. We implement QuSema for Qiskit and PennyLane. On a benchmark of 20 historical silent bugs, QuSema achieves higher mean bug relocation counts than Claude Code and Codex, with the DeepSeek configuration costing less than Claude Code. QuSema also discovers 40 previously unknown bugs confirmed by the developers, including 30 silent bugs.

Industry Coordinates & Source Verification

This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include QuSema, Qiskit, PennyLane, Claude Code.

Primary source verification: published directly by arXiv: DeepSeek with first-party authority.