Search-Based Quantum Program Testing via Commuting Pauli String

Asmar Muqeet, Shaukat Ali, Paolo ArcainiarXiv 2026

TL;DR

The authors introduce SB-QOPS (Search-Based Quantum prOgram testing via Pauli Strings), a novel testing framework that uses commuting Pauli strings and search algorithms to detect subtle faults in quantum circuits. By leveraging an expectation-value-based fitness function, SB-QOPS achieves a 100% fault-detection rate on circuits up to 29 qubits across multiple real-world quantum platforms, though its real-hardware success heavily relies on advanced error mitigation.

What Problem Does This Paper Address?

Testing quantum software is notoriously difficult. Unlike classical programs, quantum states collapse upon measurement, outputs are inherently probabilistic, and current hardware is plagued by environmental noise.

Existing Quantum Software Testing (QST) methods suffer from three major flaws:

  1. Simplistic Inputs: They often restrict test inputs to basic computational states ($|0\rangle$ and $|1\rangle$), making them poorly suited for programs designed to run on complex superpositions.
  2. Costly Oracles: They typically require complete program specifications—mapping every possible input to an expected output distribution—which quickly becomes unscalable as circuit sizes grow.
  3. Subtle Fault Vulnerability: Standard testing approaches struggle to differentiate between hardware noise and actual, subtle software bugs (e.g., a gate rotation angle that is off by a fraction of a radian).

As shown below, even a simple circuit experiences significant output distortion under noisy conditions, making bug detection a game of finding a needle in a haystack:

Figure 2: Comparison of ideal and noisy outputs for a three-qubit teleportation circuit.

Methods

To overcome these limitations, the authors propose SB-QOPS, which shifts the testing focus from input initialization to measurement operations.

Instead of preparing complex input states, SB-QOPS defines test cases as weighted combinations of Pauli strings (tensor products of $X, Y, Z,$ and $I$ operators). The framework groups these strings into "commuting families." Because commuting operators can be measured simultaneously, the results from a single circuit execution can be reused to compute expectation values for the entire family, drastically reducing the testing budget.

The core architecture consists of two main phases:

  1. Pauli Transformation: The circuit under test (CUT) and a compact program specification ($PS_{compact}$) are used to generate applicable commuting Pauli families.
  2. Search-Based Test Assessment: Metaheuristic search algorithms explore the test space using a fitness function defined as the absolute difference between the expected and observed expectation values ($|Exp - Obs|$).

The authors evaluated three search strategies to guide this exploration: a Genetic Algorithm (GA), Hill Climbing (HC), and the (1+1) Evolutionary Algorithm ((1+1) EA).

Figure 3: Overview of SB-QOPS: The set (F, EV , M ) represents the core elements of SB-QOPS. It consists of a Pauli family F, the corresponding eigenvalues EV associated with the Pauli strings in that family, and a specified measurement outcome M . The specified outcome refers to a single Pauli string selected from F and is determined according to a compact program specification, denoted as PScompact.

Datasets

The approach was evaluated using 10 real-world application circuits sourced from the widely recognized MQT Bench suite.

  • Fault Injection: To test the limits of the framework, the authors manually injected highly subtle faults by introducing rotational gates with very small angles, causing minor deviations that easily bypass standard statistical tests (like chi-square tests).
  • Scaling: The benchmarks were scaled across six distinct qubit counts: 5, 10, 15, 20, 25, and 29 qubits, resulting in a total evaluation setup of 180 quantum circuits.

Key Insights and Ideas

  • The Scalability Paradox: Counterintuitively, fault detection became easier as the number of qubits increased. In larger circuits, the effects of a subtle fault propagate more broadly due to quantum entanglement and superposition. While this makes bugs easier to catch, it makes them significantly harder to localize.
  • Noise vs. Mitigation: Under simulated noise without error mitigation, the fitness distributions of faulty and non-faulty circuits overlapped extensively, rendering a single global testing threshold useless.
  • Hardware-Integrated Success: Open-source error mitigation tools (like basic Zero-Noise Extrapolation) proved insufficient for real hardware testing. However, when utilizing IBM's advanced, hardware-integrated ZNE combined with Probabilistic Error Amplification (PEA), the noise was suppressed enough to establish a reliable fault-detection threshold.

Key Results

  • Perfect Detection: Both the Genetic Algorithm (GA) and the (1+1) EA achieved a near-perfect or perfect 100% average fault-detection score on larger circuits, vastly outperforming the random-search baseline of the original QOPS approach.
  • Speed vs. Quality: The (1+1) EA converged much faster, making it ideal for tight computational budgets, whereas the GA was superior at optimizing the absolute fitness values.
  • Cross-Platform Portability: The framework successfully executed and detected faults across three major hardware ecosystems: IBM (156-qubit QPU), IQM (56-qubit QPU), and Quantinuum (20-qubit emulator).

Limitations and Future Work

The primary limitation identified is fault localization. Because a single quantum bug spreads its impact across many distinct failing test cases (a one-to-many relationship), identifying the exact faulty gate remains a challenge.

The authors note that future work will focus on adapting classical spectrum-based fault localization to the quantum domain, alongside quantum-specific techniques like circuit slicing and lightweight tomography (e.g., classical shadows) to pinpoint bugs more precisely.

Summary updated

BibTeX
@misc{muqeet2026search,
  author = {Asmar Muqeet and Shaukat Ali and Paolo Arcaini},
  title = {{Search-Based Quantum Program Testing via Commuting Pauli String}},
  year = {2026},
  eprint = {2602.11487},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.11487},
}
Figure