Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2609.01037

A Dynamic Intermediate Representation for Hybrid Quantum-Classical Programs

Alex Rice, Chris Heunen, Tobias Grosser

cs.PLquant-phSubmitted Sep 1, 2026• Announced Sep 2, 2026• 0 citations
arXivHTMLPDF

Abstract

Quantum compilers typically follow the circuit model, representing programs as fixed sequences of gates. This static view breaks down in hybrid quantum-classical applications, where gate choices depend on runtime data or measurement results. We introduce a new Intermediate Representation (IR) that elevates gates to first-class values, enabling their dynamic creation, composition, and control. This unified representation allows classical computation to steer quantum behaviour, capturing phenomena including stochastic gate selection, adaptive error correction, and measurement-driven computation within a single framework. Case studies in noise modelling, randomised compilation, error correction, and measurement-based quantum computing show that our IR expresses these programs compactly and supports optimisations that were not possible in the circuit model. Evaluation on a benchmark suite of hybrid quantum-classical programs indicates that our IR represents programs compactly and facilitates compiler analysis and transformation.

Comments
12 pages

Related papers

Compile-Time Simplification of Classically Controlled Operations in Dynamic Circuits

Innocenzo Fulginiti, Yanbin Chen, Christian B. Mendl +1 more

Dynamic circuits use real-time outcomes of mid-circuit measurements, processed by a classical controller, to adapt subsequent operations during circuit execution. This additional flexibility over static circuits comes at a price. Mid-circuit measurements are typically slower and noisier than unitary gates. Furthermore, classical feedforward requires exchanging information between the quantum processor (QPU) and the classical controller, introducing latency that erodes the practical performance of dynamic circuits. We propose a compile-time optimization framework that reduces the use of classical controls in dynamic circuits while preserving their semantics. At its core, the framework uses a static analysis that symbolically executes the circuit by propagating classical information alongside the quantum state. By combining this classical-quantum information with the Probabilistic Circuit Model extended with probabilistic controls that emulate classical feedforward, we obtain an intermediate probabilistic representation of the dynamic circuit. In this representation, mid-circuit measurements and classically controlled operations can be removed or rewritten as purely unitary operations and probabilistic components. Compared to existing compile-time optimizations that target only mid-circuit measurements, our method applies to a broader class of dynamic circuits expressible in modern quantum programming languages. We evaluated our framework on randomly generated dynamic circuits, achieving about 50% classical feedforward reduction and even higher reductions in favorable settings.

quant-pharXiv:2605.28439•ISC High Performance (ISC)•May 28, 2026•1 citation

Enabling Retargetable Optimizing Compilers for Quantum Accelerators via a Multi-Level Intermediate Representation

Thien Nguyen, Alexander McCaskey

We present a multi-level quantum-classical intermediate representation (IR) that enables an optimizing, retargetable, ahead-of-time compiler for available quantum programming languages. To demonstrate our architecture, we leverage our proposed IR to enable a compiler for version 3 of the OpenQASM quantum language specification. We support the entire gate-based OpenQASM 3 language and provide custom extensions for common quantum programming patterns and improved syntax. Our work builds upon the Multi-level Intermediate Representation (MLIR) framework and leverages its unique progressive lowering capabilities to map quantum language expressions to the LLVM machine-level IR. We provide both quantum and classical optimizations via the MLIR pattern rewriting sub-system and standard LLVM optimization passes, and demonstrate the programmability, compilation, and execution of our approach via standard benchmarks and test cases. In comparison to other standalone language and compiler efforts available today, our work results in compile times that are 1000x faster than standard Pythonic approaches, and 5-10x faster than comparative standalone quantum language compilers. Our compiler provides quantum resource optimizations via standard programming patterns that result in a 10x reduction in entangling operations, a common source of program noise. Ultimately, we see this work as a vehicle for rapid quantum compiler prototyping enabling language integration, optimizations, and interoperability with classical compilation approaches.

arXiv:2109.00506•Sep 1, 2021•0 citations

Qaiji IR: An Eight-Layer Intermediate Representation Family for Hybrid Quantum-Classical Compilation

Jun Ye

Hybrid quantum-classical compilation relates ideal operations and measurement outcomes to control pulses and device instructions. Existing formats each describe part of this process, and their preservation checks are often specific to one tool rather than to a common intermediate representation (IR). I present Qaiji-IR, an eight-layer IR family organized by a five-axis semantic contract for data, semantics, lowering, runtime, and verification. Its implementation provides typed circuits, an operation-semantics layer (L4) that records operation structure and checks a bounded set of equivalence rules, and a native-scheduling layer (L2) with separate validation. Nine circuit pairs are compared with ideal reference calculations. An aggregate baseline, which compares operation categories and measurement counts, accepts four behavior-changing transformations: gate reordering and changes of rotation angle, operand, or measurement destination. The L4 checker passes none of them. It distinguishes strict equality from equality up to global phase and returns unsupported when its rules cannot decide, as for valid rotation fusion. L2 validation checks native schedules against their source circuits, decomposition rules, local matrices, and configured timing. A single-qubit active-reset program is compiled through the Qaiji-IR frontend, a syntax adapter, and the EmuPlat backend into pulses and device instructions for a virtual pulse processing unit (VPPU). Injected binary outcomes select the conditional drive. Backend predicate tests reveal incorrect execution for equality to zero and for a nonbinary feedback value. This backend path does not use the validated L2 schedule. Physical measurement feedback, calibrated pulse fidelity, and feedback latency require further work.

quant-pharXiv:2609.29305•Sep 25, 2026•0 citations

Learned Intermediate Representations in Quantum Compilers

João Vitor Pansani Relvas

This preprint introduces a conceptual and experimental framework for integrating learned continuous representations into quantum compiler architectures. Modern quantum compilers rely on symbolic intermediate representations and rule-based transformation passes applied over circuit graphs. While effective, such approaches are inherently discrete and constrained by handcrafted rewrite rules and heuristic search strategies. This work proposes a Learned Intermediate Representation (LIR) paradigm in which quantum circuits are embedded into a continuous latent space. Within this framework: Circuit graphs are mapped to fixed-dimensional embeddings. Latent representations capture structural and operational properties of quantum circuits. Learned models guide symbolic transformation selection. Structural validity and physical correctness are enforced by a symbolic compilation layer. The proposed approach does not replace existing compilation infrastructures. Instead, it augments traditional symbolic pipelines with a learnable representation layer that enables data-driven optimization strategies while preserving correctness guarantees. The preprint includes: A formal definition of the encoder and latent representation space. A hybrid neural-symbolic decoding formulation. An experimental methodology for comparing neural-guided and rule-based compilation. Evaluation metrics focused on structural cost reduction (e.g., two-qubit gate count). Discussion of theoretical considerations, limitations, and future research directions. This work represents an initial investigation into continuous intermediate representations for quantum compilation and is intended as a foundation for further research in adaptive and data-driven compiler design.

•Feb 25, 2026•0 citations

qstack: Compositional End-to-End Compilation for Fault-Tolerant Quantum Programs

Andres Paz, Dan Grossman

Compiling quantum programs for fault-tolerant execution requires transforming high-level operations through multiple abstraction layers: from logical gates to error-corrected encodings to hardware-native instructions. A key challenge is that quantum error correction turns purely quantum programs into hybrid quantum-classical programs, where classical feedback from syndrome measurements drives quantum corrections at runtime. Existing compilation frameworks handle these quantum and classical components separately, requiring manual adaptation of classical logic at each compilation stage, all while preserving program semantics. We present qstack, a compiler framework built around a purely quantum intermediate representation in which classical logic is accessed only through opaque callbacks, written in any classical language. The framework's central mechanism, callback wrapping, enables compositional compilation: each compiler pass automatically adapts both quantum operations and their associated classical callbacks, and any kernel dynamically generated by a callback is compiled through the full pipeline. This allows ISA translation and quantum error correction to be expressed as composable compiler passes, including concatenation of error-correcting codes, without manual intervention. We demonstrate end-to-end compilation from a high-level gate set through Clifford gates to trapped-ion native operations, with bit-flip and phase-flip repetition codes, the Steane code, and the Shor code obtained by composing two repetition passes.

quant-pharXiv:2605.16595•May 19, 2026•0 citations

Ensemble-IR: Concise Representation for Quantum Ensemble Programs

Sourish Wawdhane, Sashwat Anagolum, P.K. Das +1 more

Emerging quantum applications such as error mitigation, system characterization, and hybrid protocols often require running large families of related quantum circuits. Existing intermediate representations (IRs) and frameworks such as Qiskit, QIR, MitiQ, and OpenQASM do not provide primitives to concisely express such workloads. These tools instead rely on explicit enumeration of the unique circuits within each workload. We introduce Ensemble-IR, an intermediate representation designed to concisely express these ensemble workloads. Rather than enumerating each circuit separately, Ensemble-IR encodes an entire workload through a rich, shared unified program. This program specifies common circuit structure along with symbolic operations to express points of variation - such as gate types, gate placement, parameter values, or qubit configurations. Ensemble-IR enables quantum systems to load an entire family of circuits onto a device as a single concise file, allowing contained circuits to instead be recreated on-the-fly at runtime. We demonstrate Ensemble-IR across 18 real-world workloads from prior literature, highlighting its widespread utility for scalable quantum system development.

arXiv:2507.09581•Jul 13, 2025•0 citations
Quantum compilers typically follow the circuit model, representing programs as fixed sequences of gates. This static view breaks down in hybrid quantum-classical applications, where gate choices depend on runtime data or measurement results. We introduce a new Intermediate Representation (IR) that elevates gates to first-class values, enabling their dynamic creation, composition, and control. This unified representation allows classical computation to steer quantum behaviour, capturing phenomena including stochastic gate selection, adaptive error correction, and measurement-driven computation within a single framework. Case studies in noise modelling, randomised compilation, error correction, and measurement-based quantum computing show that our IR expresses these programs compactly and supports optimisations that were not possible in the circuit model. Evaluation on a benchmark suite of hybrid quantum-classical programs indicates that our IR represents programs compactly and facilitates compiler analysis and transformation.
Dynamic circuits use real-time outcomes of mid-circuit measurements, processed by a classical controller, to adapt subsequent operations during circuit execution. This additional flexibility over static circuits comes at a price. Mid-circuit measurements are typically slower and noisier than unitary gates. Furthermore, classical feedforward requires exchanging information between the quantum processor (QPU) and the classical controller, introducing latency that erodes the practical performance of dynamic circuits. We propose a compile-time optimization framework that reduces the use of classical controls in dynamic circuits while preserving their semantics. At its core, the framework uses a static analysis that symbolically executes the circuit by propagating classical information alongside the quantum state. By combining this classical-quantum information with the Probabilistic Circuit Model extended with probabilistic controls that emulate classical feedforward, we obtain an intermediate probabilistic representation of the dynamic circuit. In this representation, mid-circuit measurements and classically controlled operations can be removed or rewritten as purely unitary operations and probabilistic components. Compared to existing compile-time optimizations that target only mid-circuit measurements, our method applies to a broader class of dynamic circuits expressible in modern quantum programming languages. We evaluated our framework on randomly generated dynamic circuits, achieving about 50% classical feedforward reduction and even higher reductions in favorable settings.
We present a multi-level quantum-classical intermediate representation (IR) that enables an optimizing, retargetable, ahead-of-time compiler for available quantum programming languages. To demonstrate our architecture, we leverage our proposed IR to enable a compiler for version 3 of the OpenQASM quantum language specification. We support the entire gate-based OpenQASM 3 language and provide custom extensions for common quantum programming patterns and improved syntax. Our work builds upon the Multi-level Intermediate Representation (MLIR) framework and leverages its unique progressive lowering capabilities to map quantum language expressions to the LLVM machine-level IR. We provide both quantum and classical optimizations via the MLIR pattern rewriting sub-system and standard LLVM optimization passes, and demonstrate the programmability, compilation, and execution of our approach via standard benchmarks and test cases. In comparison to other standalone language and compiler efforts available today, our work results in compile times that are 1000x faster than standard Pythonic approaches, and 5-10x faster than comparative standalone quantum language compilers. Our compiler provides quantum resource optimizations via standard programming patterns that result in a 10x reduction in entangling operations, a common source of program noise. Ultimately, we see this work as a vehicle for rapid quantum compiler prototyping enabling language integration, optimizations, and interoperability with classical compilation approaches.
Hybrid quantum-classical compilation relates ideal operations and measurement outcomes to control pulses and device instructions. Existing formats each describe part of this process, and their preservation checks are often specific to one tool rather than to a common intermediate representation (IR). I present Qaiji-IR, an eight-layer IR family organized by a five-axis semantic contract for data, semantics, lowering, runtime, and verification. Its implementation provides typed circuits, an operation-semantics layer (L4) that records operation structure and checks a bounded set of equivalence rules, and a native-scheduling layer (L2) with separate validation. Nine circuit pairs are compared with ideal reference calculations. An aggregate baseline, which compares operation categories and measurement counts, accepts four behavior-changing transformations: gate reordering and changes of rotation angle, operand, or measurement destination. The L4 checker passes none of them. It distinguishes strict equality from equality up to global phase and returns unsupported when its rules cannot decide, as for valid rotation fusion. L2 validation checks native schedules against their source circuits, decomposition rules, local matrices, and configured timing. A single-qubit active-reset program is compiled through the Qaiji-IR frontend, a syntax adapter, and the EmuPlat backend into pulses and device instructions for a virtual pulse processing unit (VPPU). Injected binary outcomes select the conditional drive. Backend predicate tests reveal incorrect execution for equality to zero and for a nonbinary feedback value. This backend path does not use the validated L2 schedule. Physical measurement feedback, calibrated pulse fidelity, and feedback latency require further work.
This preprint introduces a conceptual and experimental framework for integrating learned continuous representations into quantum compiler architectures. Modern quantum compilers rely on symbolic intermediate representations and rule-based transformation passes applied over circuit graphs. While effective, such approaches are inherently discrete and constrained by handcrafted rewrite rules and heuristic search strategies. This work proposes a Learned Intermediate Representation (LIR) paradigm in which quantum circuits are embedded into a continuous latent space. Within this framework: Circuit graphs are mapped to fixed-dimensional embeddings. Latent representations capture structural and operational properties of quantum circuits. Learned models guide symbolic transformation selection. Structural validity and physical correctness are enforced by a symbolic compilation layer. The proposed approach does not replace existing compilation infrastructures. Instead, it augments traditional symbolic pipelines with a learnable representation layer that enables data-driven optimization strategies while preserving correctness guarantees. The preprint includes: A formal definition of the encoder and latent representation space. A hybrid neural-symbolic decoding formulation. An experimental methodology for comparing neural-guided and rule-based compilation. Evaluation metrics focused on structural cost reduction (e.g., two-qubit gate count). Discussion of theoretical considerations, limitations, and future research directions. This work represents an initial investigation into continuous intermediate representations for quantum compilation and is intended as a foundation for further research in adaptive and data-driven compiler design.
Compiling quantum programs for fault-tolerant execution requires transforming high-level operations through multiple abstraction layers: from logical gates to error-corrected encodings to hardware-native instructions. A key challenge is that quantum error correction turns purely quantum programs into hybrid quantum-classical programs, where classical feedback from syndrome measurements drives quantum corrections at runtime. Existing compilation frameworks handle these quantum and classical components separately, requiring manual adaptation of classical logic at each compilation stage, all while preserving program semantics. We present qstack, a compiler framework built around a purely quantum intermediate representation in which classical logic is accessed only through opaque callbacks, written in any classical language. The framework's central mechanism, callback wrapping, enables compositional compilation: each compiler pass automatically adapts both quantum operations and their associated classical callbacks, and any kernel dynamically generated by a callback is compiled through the full pipeline. This allows ISA translation and quantum error correction to be expressed as composable compiler passes, including concatenation of error-correcting codes, without manual intervention. We demonstrate end-to-end compilation from a high-level gate set through Clifford gates to trapped-ion native operations, with bit-flip and phase-flip repetition codes, the Steane code, and the Shor code obtained by composing two repetition passes.
Emerging quantum applications such as error mitigation, system characterization, and hybrid protocols often require running large families of related quantum circuits. Existing intermediate representations (IRs) and frameworks such as Qiskit, QIR, MitiQ, and OpenQASM do not provide primitives to concisely express such workloads. These tools instead rely on explicit enumeration of the unique circuits within each workload. We introduce Ensemble-IR, an intermediate representation designed to concisely express these ensemble workloads. Rather than enumerating each circuit separately, Ensemble-IR encodes an entire workload through a rich, shared unified program. This program specifies common circuit structure along with symbolic operations to express points of variation - such as gate types, gate placement, parameter values, or qubit configurations. Ensemble-IR enables quantum systems to load an entire family of circuits onto a device as a single concise file, allowing contained circuits to instead be recreated on-the-fly at runtime. We demonstrate Ensemble-IR across 18 real-world workloads from prior literature, highlighting its widespread utility for scalable quantum system development.