A Dynamic Intermediate Representation for Hybrid Quantum-Classical Programs
Alex Rice, Chris Heunen, Tobias Grosser
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.
Create a lesson
Related papers
Causal Probabilistic Programming via Magmadic Do-Notation
Mario Román
Unifying Function- and Argument-First Bidirectional Type Systems
Takuma Yoshioka, Taro Sekiyama, Atsushi Igarashi
Synthesis of Compact and Expressive Quantum-Circuit Optimizations
Wei Qiang, Ronghui Gu
Support Local Variables
Maxwell Bernstein, Takashi Kokubun, Aaron Patterson et al.
Relational Task Generation Language: A Declarative Specification Framework for Relational Deep Learning
Oleksii Kolesnichenko, Jakub Peleška, Gustav Š\'ır
Griotte: Verified Compartmentalisation via Capabilities
June Rousseau, Aïna Linn Georges, Jean Pichon-Pharabod et al.