Noise-aware Verification and Synthesis of Quantum Programs

Stefanie Muroya, Krishnendu Chatterjee, Thomas A. HenzingerarXiv 2026

TL;DR

This paper introduces a novel framework for verifying and automatically synthesizing quantum programs tailored to real, noisy hardware. By shifting the mathematical foundation from density matrices to quantum ensembles, the authors develop a noise-aware Hoare logic and synthesis tools that outperform standard textbook algorithms on real IBM quantum devices, revealing a surprising need for classical probabilistic branching in optimal quantum code.

What Problem Does This Paper Address?

We are currently living in the Noisy Intermediate-Scale Quantum (NISQ) era, meaning real-world quantum hardware is highly prone to errors. Despite this, most formal logics and verification tools for quantum programming assume an idealized, noise-free environment.

Furthermore, existing quantum verification frameworks typically model quantum states using density matrices. While density matrices accurately capture final measurement statistics, they abstract away structural information about the underlying probability distributions. This makes modular reasoning incredibly difficult: you cannot easily analyze a small quantum subroutine in isolation because the density matrix discards vital information about how that subsystem correlates with the rest of the global quantum state.

This paper addresses this gap by building a formal framework for noise-aware, modular quantum program verification and synthesis.

Methods

The authors depart from tradition by using ensembles (probability distributions with finite support over classical-quantum states) as their core semantic primitive instead of density matrices. Ensembles preserve the structural and correlation data that density matrices lose, which is essential for analyzing subroutines without knowing the global state.

Using this foundation, the paper delivers three core contributions:

  1. Noise-aware Quantum Hoare Logic (nQHL): The first formal logic that incorporates hardware error models (published by vendors) directly into program preconditions and postconditions.
  2. Automated Verification (Model Checking): For loop-free programs, the toolchain translates the program and hardware specifications into an "ensemble graph" (a Markov chain) and performs bounded model checking using arbitrary-precision arithmetic.
  3. Hardware-Optimal Synthesis: The authors model the automatic generation of loop-free quantum programs as a game-theoretic problem on a Markov Decision Process (MDP). For unique initial states, they use Bellman value-iteration. For uncertain initial states (linear preconditions), they use linear programming to find an optimal mix of deterministic strategies.

Datasets

The framework was evaluated using 55 real IBM hardware specifications accessed via the IBM Qiskit toolkit (v2.2.1).

The authors evaluated their verification and synthesis tools on five common quantum computing subroutines:

  • Parity-bitflip (used in error correction)
  • State-reset
  • GHZ state-preparation
  • Local Bell-state preparation
  • State-discrimination for nonorthogonal quantum states

Key Insights and Ideas

  • Ensembles Enable Modularity: Different global quantum states can induce local subsystems that look identical under a density matrix but evolve into completely distinguishable global states. Shifting to ensemble semantics preserves this hidden context, making modular analysis possible.
  • The Necessity of Classical Randomness: A fascinating "aha moment" in the paper is the proof that optimal quantum programs sometimes require classical probabilistic branching. To maximize success when the initial state is uncertain, the optimal strategy involves flipping a classical, weighted coin to decide which quantum instruction to execute next—even on perfectly noise-free hardware.
  • No One-Size-Fits-All Program: Because different physical qubits on a chip have unique error rates, the optimal program changes depending on the specific hardware topology and noise profile.

Key Results

The synthesis tool successfully generated hardware-optimal, loop-free subroutines that consistently beat standard textbook baselines by adapting to specific hardware noise:

  • Parity-bitflip: Achieved a maximum improvement of 4.85% in success probability over the textbook baseline on the IBM Washington architecture.
  • State-Reset: Demonstrated a massive 27.65% improvement in accuracy on the Torino hardware configuration.
  • State-Discrimination: Yielded a 24.21% accuracy boost at horizon 2 compared to noise-free baseline designs.

All synthesized programs for unknown initial states utilized classical probabilistic branching, validating the authors' theoretical insight.

Limitations and Future Work

  • Bounded and Loop-Free: The synthesis and verification methods are strictly limited to loop-free programs with a fixed execution horizon ($k$). This is a fundamental constraint, as unbounded state reachability in this context is mathematically undecidable.
  • Precondition Complexity: While the tool handles linear preconditions efficiently by evaluating the corners of state polytopes, scaling the game-theoretic synthesis approach to more general, non-linear preconditions remains an open challenge.

Summary updated

Abstract

While most research on quantum programming considers an idealized, noise-free semantics for quantum programs, we reason about quantum programs that are executed on real, noisy hardware. We consider the error models published by quantum hardware vendors to give a hardware-dependent semantics to quantum programs. This work presents a comprehensive study of noise-aware quantum programming, ranging from logical foundations to automated verification and synthesis. We develop a noise-aware quantum Hoare logic, and use it to derive algorithmic methods for the bounded verification of quantum programs on specific hardware, and for the automatic synthesis of noise-optimal loop-free quantum programs. In this way, we synthesize hardware-dependent subroutines that commonly occur in quantum algorithms, such as parity checks, quantum state preparation, and quantum state discrimination. We evaluate our method on the hardware specifications provided by the IBM Qiskit toolkit. Besides finding different optimal subroutines for different noise models, our synthesis tool also shows that classical probabilistic branching is needed for optimality in quantum programming.
BibTeX
@misc{muroya2026noise,
  author = {Stefanie Muroya and Krishnendu Chatterjee and Thomas A. Henzinger},
  title = {{Noise-aware Verification and Synthesis of Quantum Programs}},
  year = {2026},
  eprint = {2608.05807},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.05807},
}
Figure