A Semantic Quantum Circuit Cache for Scalable and Distributed Quantum-Classical Workflows
Mar Tejedor 1 2 , Javier Conejero 1 , Rosa M. Badia 1 2 · 2026
Read A Semantic Quantum Circuit Cache for Scalable and Distributed Quantum-Classical Workflows by Mar Tejedor 1 2 , Javier Conejero 1 , Rosa M. Badia 1 2 (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-26788.txt.
Introduction
Tejedor, Conejero, and Badia introduce the Quantum Circuit Cache, an addressable system that spots circuits doing the same thing and reuses prior results across runs and backends. Hybrid workflows often run large circuit sets that look different yet do the same thing, wasting computation. ZX-calculus reduction plus Weisfeiler-Leman graph hashing yields circuit IDs for fast lookup in LMDB or Redis caches. On MareNostrum 5, caching removes nearly 92 percent of wire-cutting runs. Speedups reach seven times on one node and over eleven times on a 35-qubit device.
Catalog record
| CREATOR | Mar Tejedor 1 2 , Javier Conejero 1 , Rosa M. Badia 1 2 |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 52205 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2604.26788
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
A Semantic Quantum Circuit Cache for Scalable and Distributed Quantum-Classical Workflows Mar Tejedor 1 2 , Javier Conejero 1 , Rosa M. Badia 1 2 Abstract Hybrid quantum–classical workflows often execute large ensembles of circuits that differ syntactically but implement identical operations, leading to substantial redundant computation. To address this, we introduce the Quantum Circuit Cache , a content-addressable system that detects semantic equivalence and reuses previously computed results across executions, backends, and workflow stages. Our approach combines ZX-calculus reduction with isomorphism-invariant Weisfeiler–Leman graph hashing to generate deterministic circuit identifiers, enabling constant-time lookup (O(1)) in distributed caches supporting both lightweight LMDB and scalable Redis deployments. The system integrates transparently into hybrid HPC workflows and remains backend-agnostic across CPU, GPU, and QPU environments. We evaluate the system on MareNostrum 5 with two representative workloads: distributed wire cutting and Differential Evolution–based QAOA optimization. For wire cutting, caching eliminates up to 91.98 % 91.98\% of redundant subcircuit simulations (equivalent to 7,544 7{,}544 subcircuits), yielding speedups up to 7.0 × 7.0\times on a single node and maintaining advantages at scale, with Redis-based caching achieving up to 1.6 × 1.6\times speedups under high parallelism. Validation on a 35-qubit superconducting QPU (MareNostrum Ona) confirms these benefits, achieving an 11.2 × 11.2\times speedup on real hardware. In distributed QAOA optimization, equivalence-aware caching avoids up to 27.6 % 27.6\% of circuit evaluations ( 7,044 7{,}044 circuits) and consistently reduces execution cost without altering the optimization algorithm. In both cases, reuse grows with concurrency and circuit structure, highlighting redundancy as a major systems bottleneck and demonstrating the effectiveness of our Quantum Circuit Cache. These results establish semantic circuit caching as a powerful systems-level optimization for large-scale hybrid quantum–classical computing. As quantum computing increasingly integrates with HPC infrastructures, such techniques will play a central role in enabling efficient, scalable, and practical quantum applications on current and future platforms. 1 Barcelona Supercomputing Center, Barcelona, Spain 2 Universitat Politècnica de Catalunya, Barcelona, Spain [email protected] I Introduction Hybrid quantum–classical computing has emerged as a dominant execution paradigm for near-term quantum algorithms, combining quantum processors with classical simulation, optimization, and orchestration layers. In practice, such workflows are increasingly executed at scale on High-Performance Computing (HPC) systems, where a significant number of quantum circuits may be generated, transformed, and executed as part of a single application. A key, but often overlooked inefficiency in these workflows, is the prevalence of redundant quantum circuit execution. Redundancy arises naturally in a wide range of settings, including circuit cutting, variational quantum algorithms, parameter sweeps, error mitigation protocols, and benchmarking studies. In these scenarios, many circuits differ syntactically (e.g., due to gate reordering, compilation artifacts, or local simplifications) while remaining semantically equivalent – they implement the same quantum operation. Naïvely re-executing such circuits, whether via classical simulation on CPUs and GPUs or via execution on quantum processing units (QPUs), incurs significant computational cost, possible queueing delays, and unnecessary consumption of scarce quantum and classical resources. Despite this, most existing quantum software stacks treat circuits as simple objects, identified only by their syntactic representation. This limitation becomes particularly acute at scale, where hybrid workflows generate massive numbers of overlapping circuits and where even modest reductions in redundant execution can yield substantial performance gains. To address this challenge, we introduce the Quantum Circuit Cache , a content-addressable caching subsystem designed to eliminate redundant quantum circuit execution through semantic equivalence detection. Rather than relying on syntactic equality, the cache identifies when a newly submitted circuit represents a quantum operation that has already been executed, and transparently retrieves the corresponding stored result. When a cache hit occurs, circuit execution (including translation, simulation, or hardware submission) is bypassed entirely. The Quantum Circuit Cache is founded on three core principles. First, semantic equivalence : equivalence detection is based on the underlying quantum operation, not on surface-level circuit syntax. Second, determinism and reproducibility : cache keys are uniquely determined across runs, nodes, and execution environments, enabling reliable reuse in distributed settings. Third, scalability and backend independence : the cache is designed to operate efficiently under HPC parallelism and to support heterogeneous simulation and execution backends, including CPUs, GPUs, and QPUs. At the technical level, the cache combines graph-theoretic reduction using the ZX-calculus with isomorphism-invariant graph hashing to construct deterministic identifiers for quantum circuits. These identifiers are used to index a persistent key–value store, enabling constant-time lookup O(1) and retrieval of previously computed results. The system supports both lightweight, disk-backed deployments for local or moderate-scale workloads and distributed, in-memory deployments for large-scale HPC environments, while maintaining a unified cache format across backends. In summary, this work makes the following contributions: • We identify redundant quantum circuit execution as an inefficiency in large-scale hybrid quantum–classical workflows. • We propose a content-addressable Quantum Circuit Cache that enables semantic equivalence detection and transparent reuse of quantum circuit results. • We present a graph-based reduction and hashing pipeline that yields deterministic, scalable circuit identifiers suitable for HPC deployment. • We demonstrate a flexible cache architecture supporting both local and distributed backends, with portable persistence across execution environments. Beyond a single application domain, this work positions semantic circuit caching as a reusable systems primitive for hybrid quantum–classical computing. By identifying computational equivalence at the circuit level rather than at the syntactic level, the proposed approach enables transparent reuse across optimization loops, distributed executions, and heterogeneous backends without modifying quantum algorithms or optimizers. To our knowledge, this is the first explicit implementation. The remainder of this paper is organized as follows. Section II reviews related work on quantum circuit equivalence and existing caching approaches. Section III provides necessary background on quantum circuits, the ZX-calculus, and graph hashing techniques. Section IV presents the design of our Quantum Circuit Cache, including the semantic hashing pipeline and distributed backend architecture. Section V evaluates the system on two representative hybrid quantum-classical workloads: distributed wire cutting (Section V-A ) and Differential Evolution-based QAOA optimization (Section V-B ). Section VI discusses the implications of our results and potential limitations. Finally, Section VII concludes the paper and outlines directions for future work. II Related Work Quantum circuit equivalence has been extensively studied in compilation, verification, and optimization, typically as a decision problem aimed at validating compiler transformations or reasoning formally about circuit behavior. Early approaches relied on direct matrix comparison or symbolic reasoning, which rapidly becomes infeasible for large circuits [ 10 ] . To improve scalability, structural representations and classical reasoning techniques were introduced. Decision-diagram methods such as quantum multiple-valued decision diagrams (QMDDs) provide compact operator representations for equivalence checking without full matrix construction, though memory can grow rapidly for deep or highly entangled circuits [ 13 , 15 ] . More advanced techniques combine symbolic reasoning with canonical representations to improve robustness in compiler validation [ 2 ] , and SAT- or model-counting-based approaches achieve strong performance in restricted regimes but remain costly for general circuits [ 12 ] . Graphical reasoning using the ZX-calculus has emerged as a powerful framework for circuit equivalence and simplification. The ZX-calculus represents quantum processes diagrammatically with semantics-preserving rewrite rules that reveal nontrivial circuit identities [ 1 ] . Automated tools such as PyZX [ 11 ] enable substantial reductions through algebraic simplification and normalization [ 3 ] , and ZX-based techniques have