Papers
Topics
Authors
Recent
Search
2000 character limit reached

The MQT Compiler Collection: A Blueprint for a Future-Proof Quantum-Classical Compilation Framework

Published 9 Apr 2026 in quant-ph | (2604.08674v1)

Abstract: As the capabilities of quantum computing hardware continue to rise, algorithms that exploit them are becoming increasingly complex. These developments increase the need for sophisticated compilation frameworks that translate high-level algorithms into executable code. In the past, most solutions were built with a quantum-first approach and handled mostly pure quantum programs without classical elements such as structured control flow. However, developments in quantum algorithms, error correction, and optimization, as well as the integration into high-performance computing (HPC) environments, depend on such classical elements. As quantum-first approaches increasingly struggle to handle these concepts, classical-first approaches are becoming a promising alternative. In this work, we present the MQT Compiler Collection, a blueprint for a future-proof quantum-classical compilation framework built on the Multi-Level Intermediate Representation (MLIR). After years of experience with the quantum-first approach and its shortcomings, we propose a framework that embraces core MLIR concepts to support the full compilation pipeline from high-level algorithms to hardware-specific instructions. The proposed architecture is designed from the ground up to support complex optimizations beyond, e.g., simple gate cancellation. It is publicly available at https://github.com/munich-quantum-toolkit/core.

Summary

  • The paper presents a novel modular quantum-classical compilation framework that integrates MLIR to support both high-level algorithm representation and hardware-specific mapping.
  • It introduces dual dialects (QC for imperative operations and QCO for functional optimizations) to enable comprehensive optimization and interoperability.
  • The framework demonstrates enhanced integration of classical control flow with quantum logic, paving the way for scalable and future-proof hybrid computational models.

The MQT Compiler Collection: Towards a Modular Quantum-Classical Compilation Blueprint

Introduction

The MQT Compiler Collection (mqt-cc) proposes a comprehensive quantum-classical compilation framework, decisively moving beyond the limitations of quantum-first compilation and firmly embedding quantum compilation into a classical-first, MLIR-based infrastructure. This architectural reorientation is motivated by the increasing integration of quantum computing into heterogeneous high-performance computing (HPC) environments and the growing complexity of quantum applications that interleave quantum and classical computation. By leveraging MLIR as its backbone, mqt-cc positions itself as both an implementation blueprint and a practical toolkit for modular, extensible, and future-proof quantum-classical program compilation. Figure 1

Figure 1: mqt-cc combines quantum and classical concepts to create a future-proof modular compilation framework.

Background: Compilation Paradigms and MLIR as Infrastructure

Historically, quantum compilation infrastructure has been dominated by quantum-first approaches, which either neglect or insufficiently support structured control flow and classical logic. Early IRs such as OpenQASM 2.0 failed to adequately represent mixed quantum-classical programs, while ad-hoc extensions and tooling resulted in a fragmented ecosystem limited in extensibility. Although more recent standards (e.g., OpenQASM 3.0) attempt to address these deficiencies, they are often hamstrung by legacy architectures and the need to maintain compatibility with existing toolchains.

Classical-first designs, viewing quantum processors as specialized accelerators akin to GPUs, exploit decades of progress in classical compilation research. LLVM's introduction of QIR marked a pivotal shift towards realistic hybrid program representations. MLIR extends this philosophy, enabling highly modular composition via custom dialects, shared optimizations, and seamless integration of quantum and classical compilation passes at multiple abstraction levels.

Core Principles and Architecture

The mqt-cc framework is underpinned by several design tenets:

  • Full-Stack Quantum-Classical Support: The architecture natively expresses and optimizes the entire spectrum from high-level algorithms to hardware-specific instructions, incorporating dynamic circuits, structured control flow, and adaptive quantum-classical workflows.
  • Dual Dialect Model: The QC (Quantum Circuit) dialect provides a reference-semantic, imperative interface that mirrors the established quantum programming paradigms and aligns with external toolchains. The QCO (Quantum Circuit Optimization) dialect provides a value-semantic, first-order functional abstraction, ideally suited for explicit dataflow analysis and fine-grained optimization.
  • Maximal MLIR Reuse: mqt-cc fully adopts MLIR infrastructure, from SCF dialects for classical control flow to built-in transformations, and remains compatible with recent QIR and OpenQASM standards.
  • Modularity and Extensibility: The architecture encourages extension with custom gates, back-end specific transformations, and integration with external frameworks through bidirectional conversion passes and plugin interfaces. Figure 2

    Figure 2: The mqt-cc compilation pipeline, illustrating flow from input languages through QC/QCO dialects to hardware-level targets.

Technical Details

QC Dialect: Imperative Entry Point and Hardware Mapping

The QC dialect reflects standard quantum languages by providing reference-based (imperative) semantics, supporting familiar constructs such as in-place qubit allocation, mutation, measurement, and resource management. All unitary operations implement a common UnitaryOpInterface, enabling introspection and manipulation at the IR level. Figure 3

Figure 3: Abbreviated TableGen definition for UnitaryOpInterface, the central interface for all QC dialect unitary operations.

This abstraction facilitates seamless import/export from/to languages like OpenQASM and Python-based frameworks (e.g., Qiskit), and supports non-unitary modifiers (controlled, inverse, power) as first-class primitives. The imperative nature is particularly advantageous for mapping to backend-specific instruction sets and hardware interaction, but by design complicates dataflow analysis and non-local optimization.

QCO Dialect: Functional Optimization Layer

Optimizations in mqt-cc are predominantly performed within the QCO dialect, which implements value semantics akin to linear type systems. Every operation consumes and produces explicit quantum state values, naturally constructing a dataflow graph suited for canonicalization, gate cancellation, and complex circuit transformations. Unlike custom DAG implementations in older toolchains, QCO directly leverages MLIR's use-def chains, streamlining both the analysis and execution of transformation passes.

This functional abstraction enables the direct encoding and application of advanced optimization techniques, including global reordering, qubit mapping algorithms such as QMAP, and integrating optimization across quantum and classical operations. Sophisticated passes, previously infeasible due to architectural limitations in quantum-first compilers, become tractable.

Pipeline and Bidirectional Conversion

The mqt-cc pipeline allows seamless conversion between QC and QCO dialects via robust, automated passes. Linearization (QC to QCO) uncovers explicit dependencies by tracking the latest quantum state values, enabling fine-grained dataflow optimizations. Bufferization (QCO to QC) reconstructs imperative operation sequences for hardware back-ends and interoperability. This modular bridging is critical for workflow composability and framework extensibility, ensuring that optimizations remain decoupled from language frontends and target platforms.

Structured Control and Hybrid Logic

By embedding the SCF dialect, the framework supports native structured classical control flow constructs (e.g., if-conditionals, loops), which can be interleaved with quantum instructions. Measurement-dependent branching and dynamic circuit structure are easily represented and optimized, with classical passes such as loop unrolling or conditional simplification applied directly within the hybrid IR. The extensibility of this model further enables future quantum hardware to support more interactive or adaptive programming paradigms with minimal modification to the compiler core.

Results and Implications

The modular infrastructure of mqt-cc demonstrates that quantum-classical programs can be represented, transformed, and lowered using unified classical compiler technologies. The adoption of MLIR dialects for both quantum and classical program fragments enables extensive optimization, tight integration with classical control logic, and future scalability as quantum hardware and algorithms become more sophisticated.

Significantly, the framework supports transparent extension and modification: new optimizations (e.g., error mitigation, hardware-specific placement), dialects for novel programming models (e.g., variational solvers, dynamic circuits), and interoperation with external tools (e.g., direct MLIR plugin for PennyLane) are naturally enabled. The public availability of the codebase accelerates research adoption, facilitates benchmarking and comparative studies, and serves as a template for industrial and academic compiler development.

Notably, mqt-cc makes the bold claim of effectively synthesizing the advantages of quantum-first domain expertise with classical-first compiler robustness, presenting a path towards both immediate utility and long-term maintainability for the quantum software stack.

Outlook and Future Directions

Looking forward, the integration of quantum and classical program compilation is poised to become essential as practical quantum computing transitions from prototyping to production and hybrid HPC workflows. The design choices inherent in mqt-ccโ€”MLIR-based modularity, dual-dialect optimization, and extensibilityโ€”provide a flexible substrate for the emergence of new quantum programming idioms, adaptive algorithms, and tight coupling with classical simulation or error correction.

Further development directions include:

  • Improved inter-dialect optimization: Cross-dialect analysis and transformation strategies facilitating optimizations that span classical and quantum boundaries.
  • Hardware-aware scheduling: Exploiting architectural descriptions and resource models to inform mapping, routing, and scheduling, directly within the extensible dialect framework.
  • Support for domain-specific dialects: Enabling specialized extensions for error correction codes, fault-tolerance strategies, or analog quantum computing models.
  • Integration with formal verification: Applying MLIR's infrastructure and explicit dataflows to facilitate equivalence checking, program validation, and certification of quantum-classical transformations.

Conclusion

The MQT Compiler Collection advances the state of quantum-classical compilation by architecting a modular, extensible framework that synthesizes established quantum-specific program analysis with the scalability and maintainability of mainstream compiler infrastructure. By leveraging MLIR, mqt-cc enables explicit, optimizable representations of both quantum and classical logic, supports the full compilation stack, and provides a public baseline for future development in hybrid quantum-classical programming. This architectural blueprint is well-positioned to accelerate both research and practical adoption in the coming generation of quantum software tooling.

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 0 likes about this paper.