Search papers, labs, and topics across Lattice.
This paper introduces a novel Intermediate Representation (IR) that treats quantum gates as first-class values, allowing for their dynamic creation and control in hybrid quantum-classical applications. By enabling classical computations to influence quantum behavior, the IR supports advanced techniques such as stochastic gate selection and adaptive error correction. Evaluations demonstrate that this approach not only compactly represents complex programs but also enhances optimization capabilities beyond traditional circuit models.
Elevating quantum gates to first-class values transforms how hybrid quantum-classical programs are represented and optimized.
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.