Papers
Topics
Authors
Recent
Search
2000 character limit reached

Quasilinear Equivalence Checking for Detector Error Models

Published 12 Jun 2026 in quant-ph, cs.LO, cs.PL, cs.SE, and math.CT | (2606.14677v1)

Abstract: A Detector Error Model (DEM) is a structured representation of error mechanisms in quantum circuits, which has gained popularity in quantum compilation pipelines for its ability to capture fault-tolerance at a circuit level. It lists error mechanisms as instructions targeting detectors and observables, specifying for each physical fault channel the probability that the fault fires, the detectors it triggers, and the observables it flips. In this paper, we develop an equational theory for DEMs, with its associated categorical semantics. We present a sound, terminating, confluent rewriting system for DEM terms, formulating it as a symmetric monoidal theory (a PROP) over the Giry monad. We prove that every DEM term has a unique normal form, which can be computed efficiently in quasilinear time $O(k|E|\log|E|)$, where $|E|$ is the number of instructions and $k$ bounds the size of a target set. This provides a complete set of invariants (via Tanner graphs) for structural DEM equivalence. We provide the first static decision procedure for DEM equivalence, with rigorous correctness guarantees. It is complete (decides full decoder-equivalence exactly) for non-adaptive quantum error correction (QEC) pipelines, and scales to a sound and applicable decision procedure for partially-adaptive circuits (lattice surgery, distributed QEC, ...) without suffering exponential overhead. We discuss its application to the verification and optimisation of quantum compilers.

Authors (1)

Summary

  • The paper introduces a quasilinear rewriting system for Detector Error Models that yields unique normal forms for structural equivalence in QEC pipelines.
  • It employs scope-local algebraic methods, achieving O(k|E|log|E|) complexity by effectively reducing instruction multiplicity via XOR semantics.
  • The approach enables scalable static verification in quantum compilers, ensuring semantic preservation during circuit optimizations and transformations.

Quasilinear Algebraic Equivalence for Detector Error Models

Introduction

"Quasilinear Equivalence Checking for Detector Error Models" (2606.14677) develops a rigorous, efficient algebraic framework to decide structural equivalence of Detector Error Models (DEMs) in quantum error correction pipelines. DEMs represent error mechanisms within quantum circuits, delineating the probabilistic activation of detectors and logical observables associated with physical fault channels. This work formulates DEMs within a categorical semantics, introduces a syntactic rewriting system, proves canonical properties including completeness and efficiency, and establishes formal invariants for equivalence, targeting both non-adaptive and partially-adaptive quantum error correction workflows.

Formalization of Detector Error Models

The DEM abstraction generalizes the typical error model specification in tools like Stim, transitioning from file-level semantics to structured algebra over discrete symmetric monoidal categories. Each DEM term is a composition of error instructions, sequential composition, and repeat blocks capturing temporal scheduling. Error instructions follow XOR semantics: repeated targets within an instruction cancel due to parity, reflecting the underlying Boolean nature of detector triggers and logical flips.

The scope-local structure is integral: repeat blocks define nested scopes, prohibiting rewriting across scope boundaries. This matches the physical realities of quantum syndrome extraction protocols—distinct measurement rounds encode statistical independence, and improper scope merging would misrepresent joint distributions.

Symmetric Monoidal Rewriting System

The core of the paper is the construction of a symmetric monoidal rewriting theory (a PROP) for DEM terms. The rewriting system RR operates via scope-local rules:

  • XOR fusion: same-target instructions are fused by XOR-ing their probabilities using pq=p+q2pqp \oplus q = p + q - 2pq.
  • Cancellation: instructions with zero probability or empty targets are eliminated.
  • Odd multiplicity reduction: repeated targets are reduced modulo 2 multiplicity.
  • Instruction commutativity: instructions commute within the same scope.

Repeat blocks are handled by a congruence rule, enforcing independence of rewrite steps per scope. The semantics is grounded categorically: composition of error events adopts Kleisli composition in the Giry monad, restricted to binary-valued events. The resulting rewriting system is shown to be sound, terminating, and confluent.

Unique Normal Forms and Structural Invariants

The system guarantees a unique normal form for any DEM term (modulo permutation within scope), with normalization algorithmic complexity O(kElogE)O(k |E| \log |E|), where E|E| is the number of instructions and kk bounds target set size. This result is non-trivial—simulation-based equivalence checking is exponentially expensive due to rare-event statistics, and exhaustively unrolling repeat blocks is infeasible for deep circuits.

One of the paper's strongest claims is that normal forms yield a complete set of invariants for structural equivalence in non-adaptive circuits: the normal form's Tanner graph uniquely characterizes the DEM's observable distribution structure. Two DEMs are equivalent if and only if their normal-form Tanner graphs are isomorphic under target-preserving bijections, encompassing both the bipartite topology and instruction probabilities.

Deciding DEM Equivalence: Theoretical Guarantees and Algorithms

Scope-local equivalence is computationally tractable. For observable-separated, detector-separated DEMs—as generated by standard QEC pipelines—the procedure decides full decoder-equivalence. The completeness is established under the observable-separation condition: each logical observable appears in the instructions of at most one scope, and detectors are scope-disjoint. When these criteria are met, checking equivalence reduces to normalization and sorted comparison, eliminating the need for sampling or full distribution estimation.

For partial adaptivity, the notion of observable-coherence classes is introduced. Scopes sharing logical observables are grouped, and the equivalence check is applied within these classes, allowing local unrolling and factoring of observables' marginal distributions. This modularizes the exponential complexity, maintaining polynomial scaling for the majority of practical DEMs.

Application in Quantum Compiler Verification

The implications are immediate for quantum software engineering. Static equivalence checking becomes scalable, supporting rigorous regression testing and optimization validation in quantum compilers. The method certifies semantic preservation of DEMs after circuit transformation, patching, and lattice surgery steps. It is robust to repeat block structure and circuit depth, allowing precise verification for realistic QEC regimes.

The approach also opens avenues for further categorical and algebraic study of quantum error models. The algebraic invariants might be embedded into refinement type systems or proof assistants, enhancing compiler verification workflows. Connections to diagrammatic methods like ZX-calculus are evident, presenting further opportunities for integration with graphical circuit reasoning frameworks.

Future Directions and Discussion

The completeness theorem for non-adaptive pipelines is precise and efficient. For fully adaptive protocols, a completeness result remains open, although the hybrid procedure is sound and practical. Extending the algebraic theory to handle more expressive circuit structures, classical control flow, or integrating effect handlers (in the style of probabilistic programming monads) constitutes promising theoretical directions. Practical integration into DEM analysis libraries such as emlint, and further optimization of normalization algorithms (e.g., via hashing of target multisets), is expected.

Conclusion

This work rigorously establishes that DEM structural equivalence, for broad classes of QEC pipelines, can be decided efficiently via algebraic normalization modulo scope-local rewriting. The principal results—unique normal forms, efficient O(kElogE)O(k|E|\log|E|) algorithms, and complete invariants for decoder-equivalence—constitute a strong theoretical foundation for static verification and optimization of quantum error correction software. Extensions to adaptive protocols and further categorical enrichment are salient future directions, with practical benefits for scalable QEC compiler validation and formal methods in quantum computing.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 6 likes about this paper.