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

ACM Symposium on Applied Computing

Quantum Circuit Synthesis from C via Multi-Level Intermediate Representation

Giacomo Lancellotti, Francesco Rosnati, Leonardo Ignazio Pagliochini, Giovanni Agosta

Published Mar 23, 2026• 1 citation
Publisher

Abstract

Programming quantum computers is a complex endeavor that requires highly specialized knowledge. Given the growing momentum of quantum computing, high-level synthesis of quantum circuits from well-known classical languages could significantly benefit the ecosystem, allowing specialists to focus on the parts of an application where quantum computing offers the greatest advantage, while letting the compiler handle the boilerplate code. To bridge this gap, we present a high-level synthesis framework that translates C programs into quantum circuits through a sequence of modular and structured Multi-Level Intermediate Representation (MLIR) dialects. These dialects expose classical control and data flow in a form compatible with quantum constraints, enabling reversible and unitary circuit generation. Our framework maps conditionals, loops, and arithmetic operations, supports configurable bitwidths, and allows retargetability to different quantum backends. Furthermore, we demonstrate a correlation between classical program metrics—such as instruction count and cyclomatic complexity—and the performance characteristics of the resulting quantum circuits. To validate our methodology, we quantify compilation resource usage, showing a linear scaling of memory footprint and a quadratic scaling of CPU time as a function of quantum circuit complexity. Our tool generates circuits in OpenQASM format, facilitating integration with current quantum programming frameworks.

DOI
10.1145/3748522.3779947

Related papers

Quantum Oracle Synthesis from HDL Designs via Multi Level Intermediate Representation

Giacomo Lancellotti, Filippo Buda, Giacomo Carugati +4 more

Quantum computing is increasingly recognized as a promising approach for tackling computationally intractable problems. However, achieving the scalability necessary for real-world applications requires substantial advancements in the quantum software stack. In this work, we introduce a compiler toolchain based on a Multi-Level Intermediate Representation (MLIR) that automatically synthesizes quantum circuits from Hardware Description Language (HDL) specifications of classical functions into quantum assembly languages. Many quantum algorithms rely on combinatorial circuits as subroutines, which traditionally require extensive resources in terms of quantum gates and qubits and are often manually optimized. Our toolchain integrates a sequence of optimization passes that combine classical compiler techniques with quantum-specific improvements, resulting in an average qubit reduction of 30% and an average gate-count reduction of 20% in widely adopted benchmark circuits, including those used in cryptographic applications.

Asia and South Pacific Design Automation Conference (ASP-DAC)•Jan 19, 2026•1 citation

Quantum Circuit Transformations with a Multi-Level Intermediate Representation Compiler

Thien Nguyen, Dmitry I. Lyakh, Raphael C. Pooser +3 more

Quantum computing promises remarkable approaches for processing information, but new tools are needed to compile program representations into the physical instructions required by a quantum computer. Here we present a novel adaptation of the multi-level intermediate representation (MLIR) integrated into a quantum compiler that may be used for checking program execution. We first present how MLIR enables quantum circuit transformations for efficient execution on quantum computing devices and then give an example of compiler transformations based on so-called mirror circuits. We demonstrate that mirror circuits inserted during compilation may test hardware performance by assessing quantum circuit accuracy on several superconducting and ion trap hardware platforms. Our results validate MLIR as an efficient and effective method for collecting hardware-dependent diagnostics through automated transformations of quantum circuits.

arXiv:2112.10677•Dec 20, 2021•0 citations

Towards High-Level Synthesis of Quantum Circuits

Chao Lu, Christian Pilato, Kanad Basu

In recent years, there has been a proliferation of quantum algorithms, primarily due to their exponential speedup over their classical counterparts. Quantum algorithms find applications in various domains, including machine learning, molecular simulation, and cryptography. However, extensive knowledge of linear algebra and quantum mechanics are required to program a quantum computer, which might not be feasible for traditional software programmers. Moreover, current quantum programming paradigm is difficult to scale and integrate quantum circuits to achieve complex functionality. To this end, in this paper, we introduce QHLS, a quantum high-level synthesis (HLS) framework. To the best of our knowledge, this is the first HLS framework for quantum circuits. The proposed QHLS allows quantum programmers to start with high-level behavioral descriptions (e.g., C, C++) and automatically generate the corresponding quantum circuit; thus, reducing the complexity of programming a quantum computer. Our experimental results demonstrate the success of QHLS in translating high-level behavioral software programs containing arithmetic, logical, and conditional statements.

Design, Automation, and Test in Europe•Apr 1, 2023•1 citation

QHLS: An HLS Framework to Convert High-Level Descriptions to Quantum Circuits

Chao Lu, Christian Pilato, Kanad Basu

Quantum computing has been shown to provide exponential performance improvements in several tasks, such as cryptography, healthcare, etc. This article presents a new framework for quantum high-level synthesis, called QHLS, that aims to facilitate programmers using quantum computers. Currently, quantum-computer programmers need extensive linear algebra and quantum mechanics knowledge, which can be challenging for traditional software programmers. Additionally, the current quantum programming paradigm is not scalable, and it can be difficult to combine quantum circuits to create a more complex functionality. QHLS addresses these issues by enabling the automatic generation of quantum circuit descriptions directly from high-level behavioral specifications (using languages like C or C++). This simplifies the programming of a quantum computer, making it more accessible to a wider range of programmers. Our experiments show that QHLS can successfully translate high-level software programs containing various types of statements (such as arithmetic, logical, and conditional operations) into functionally equivalent quantum circuits.

IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems•Apr 19, 2024•4 citations

A MLIR Dialect for Quantum Assembly Languages

Alexander McCaskey, Thien Nguyen

We demonstrate the utility of the Multi-Level Intermediate Representation (MLIR) for quantum computing. Specifically, we extend MLIR with a new quantum dialect that enables the expression and compilation of common quantum assembly languages. The true utility of this dialect is in its ability to be lowered to the LLVM intermediate representation (IR) in a manner that is adherent to the quantum intermediate representation (QIR) specification recently proposed by Microsoft. We leverage a qcor-enabled implementation of the QIR quantum runtime API to enable a retargetable (quantum hardware agnostic) compiler workflow mapping quantum languages to hybrid quantum-classical binary executables and object code. We evaluate and demonstrate this novel compiler workflow with quantum programs written in OpenQASM 2.0. We provide concrete examples detailing the generation of MLIR from OpenQASM source files, the lowering process from MLIR to LLVM IR, and ultimately the generation of executable binaries targeting available quantum processors.

arXiv:2101.11365•IEEE International Conference on Quantum Computing and Engineering (QCE)•Oct 1, 2021•43 citations

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

Lukas Burgholzer, Daniel Haag, Yannick Stade +3 more

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.

quant-pharXiv:2604.08674•Design, Automation, and Test in Europe•Apr 13, 2026•2 citations
Programming quantum computers is a complex endeavor that requires highly specialized knowledge. Given the growing momentum of quantum computing, high-level synthesis of quantum circuits from well-known classical languages could significantly benefit the ecosystem, allowing specialists to focus on the parts of an application where quantum computing offers the greatest advantage, while letting the compiler handle the boilerplate code. To bridge this gap, we present a high-level synthesis framework that translates C programs into quantum circuits through a sequence of modular and structured Multi-Level Intermediate Representation (MLIR) dialects. These dialects expose classical control and data flow in a form compatible with quantum constraints, enabling reversible and unitary circuit generation. Our framework maps conditionals, loops, and arithmetic operations, supports configurable bitwidths, and allows retargetability to different quantum backends. Furthermore, we demonstrate a correlation between classical program metrics—such as instruction count and cyclomatic complexity—and the performance characteristics of the resulting quantum circuits. To validate our methodology, we quantify compilation resource usage, showing a linear scaling of memory footprint and a quadratic scaling of CPU time as a function of quantum circuit complexity. Our tool generates circuits in OpenQASM format, facilitating integration with current quantum programming frameworks.
Quantum computing is increasingly recognized as a promising approach for tackling computationally intractable problems. However, achieving the scalability necessary for real-world applications requires substantial advancements in the quantum software stack. In this work, we introduce a compiler toolchain based on a Multi-Level Intermediate Representation (MLIR) that automatically synthesizes quantum circuits from Hardware Description Language (HDL) specifications of classical functions into quantum assembly languages. Many quantum algorithms rely on combinatorial circuits as subroutines, which traditionally require extensive resources in terms of quantum gates and qubits and are often manually optimized. Our toolchain integrates a sequence of optimization passes that combine classical compiler techniques with quantum-specific improvements, resulting in an average qubit reduction of 30% and an average gate-count reduction of 20% in widely adopted benchmark circuits, including those used in cryptographic applications.
Quantum computing promises remarkable approaches for processing information, but new tools are needed to compile program representations into the physical instructions required by a quantum computer. Here we present a novel adaptation of the multi-level intermediate representation (MLIR) integrated into a quantum compiler that may be used for checking program execution. We first present how MLIR enables quantum circuit transformations for efficient execution on quantum computing devices and then give an example of compiler transformations based on so-called mirror circuits. We demonstrate that mirror circuits inserted during compilation may test hardware performance by assessing quantum circuit accuracy on several superconducting and ion trap hardware platforms. Our results validate MLIR as an efficient and effective method for collecting hardware-dependent diagnostics through automated transformations of quantum circuits.
In recent years, there has been a proliferation of quantum algorithms, primarily due to their exponential speedup over their classical counterparts. Quantum algorithms find applications in various domains, including machine learning, molecular simulation, and cryptography. However, extensive knowledge of linear algebra and quantum mechanics are required to program a quantum computer, which might not be feasible for traditional software programmers. Moreover, current quantum programming paradigm is difficult to scale and integrate quantum circuits to achieve complex functionality. To this end, in this paper, we introduce QHLS, a quantum high-level synthesis (HLS) framework. To the best of our knowledge, this is the first HLS framework for quantum circuits. The proposed QHLS allows quantum programmers to start with high-level behavioral descriptions (e.g., C, C++) and automatically generate the corresponding quantum circuit; thus, reducing the complexity of programming a quantum computer. Our experimental results demonstrate the success of QHLS in translating high-level behavioral software programs containing arithmetic, logical, and conditional statements.
Quantum computing has been shown to provide exponential performance improvements in several tasks, such as cryptography, healthcare, etc. This article presents a new framework for quantum high-level synthesis, called QHLS, that aims to facilitate programmers using quantum computers. Currently, quantum-computer programmers need extensive linear algebra and quantum mechanics knowledge, which can be challenging for traditional software programmers. Additionally, the current quantum programming paradigm is not scalable, and it can be difficult to combine quantum circuits to create a more complex functionality. QHLS addresses these issues by enabling the automatic generation of quantum circuit descriptions directly from high-level behavioral specifications (using languages like C or C++). This simplifies the programming of a quantum computer, making it more accessible to a wider range of programmers. Our experiments show that QHLS can successfully translate high-level software programs containing various types of statements (such as arithmetic, logical, and conditional operations) into functionally equivalent quantum circuits.
We demonstrate the utility of the Multi-Level Intermediate Representation (MLIR) for quantum computing. Specifically, we extend MLIR with a new quantum dialect that enables the expression and compilation of common quantum assembly languages. The true utility of this dialect is in its ability to be lowered to the LLVM intermediate representation (IR) in a manner that is adherent to the quantum intermediate representation (QIR) specification recently proposed by Microsoft. We leverage a qcor-enabled implementation of the QIR quantum runtime API to enable a retargetable (quantum hardware agnostic) compiler workflow mapping quantum languages to hybrid quantum-classical binary executables and object code. We evaluate and demonstrate this novel compiler workflow with quantum programs written in OpenQASM 2.0. We provide concrete examples detailing the generation of MLIR from OpenQASM source files, the lowering process from MLIR to LLVM IR, and ultimately the generation of executable binaries targeting available quantum processors.
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.