Breaking Down Quantum Compilation: Profiling and Identifying Costly Passes
Felix Zilk, Alessandro Tundo, Vincenzo De Maio, Ivona Brandic · 2025
Read Breaking Down Quantum Compilation: Profiling and Identifying Costly Passes by Felix Zilk, Alessandro Tundo, Vincenzo De Maio, Ivona Brandic (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-15141.txt.
Introduction
Felix Zilk, Alessandro Tundo, Vincenzo De Maio, and Ivona Brandic wrote this 2025 study on where time goes when quantum programs are compiled. Compiling eats a large share of each run, and precompiling tricks need to know which steps cost most. The team timed each pass inside a widely used quantum toolkit across two test circuits.
As the optimization level rose, circuit tuning and gate building passes took over the Fourier transform circuit, with single passes eating up to eighty-seven percent of the time. For a circuit that builds an entangled state, placing gates on real hardware took more than ninety-nine percent. The authors say such maps should steer the field's push for faster toolchains.
Catalog record
| CREATOR | Felix Zilk, Alessandro Tundo, Vincenzo De Maio, Ivona Brandic |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 20 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2504-15141
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Breaking Down Quantum Compilation: Profiling and Identifying Costly Passes Felix Zilk, Alessandro Tundo, Vincenzo De Maio, Ivona Brandic Abstract With the increasing capabilities of quantum systems, the efficient, practical execution of quantum programs is becoming more critical. Each execution includes compilation time, which accounts for substantial overhead of the overall program runtime. To address this challenge, proposals that leverage precompilation techniques have emerged, whereby entire circuits or select components are precompiled to mitigate the compilation time spent during execution. Considering the impact of compilation time on quantum program execution, identifying the contribution of each individual compilation task to the execution time is necessary in directing the community’s research efforts towards the development of an efficient compilation and execution pipeline. In this work, we perform a preliminary analysis of the quantum circuit compilation process in Qiskit, examining the cumulative runtime of each individual compilation task and identifying the tasks that most strongly impact the overall compilation time. Our results indicate that, as the desired level of optimization increases, circuit optimization and gate synthesis passes become the dominant tasks in compiling a Quantum Fourier Transform, with individual passes consuming up to 87% of the total compilation time. Mapping passes require the most compilation time for a GHZ state preparation circuit, accounting for over 99% of total compilation time. I Introduction Quantum computing (QC) has gained particular interest in both academia and industry due to its promise to significantly speed up certain computational tasks [ 1 , 2 ] . Potential applications include the simulation of physical systems in materials science and chemistry [ 3 ] , optimization problems [ 4 ] , and machine learning [ 5 ] . Over the last decade, QC has become particularly popular due to significant advances that brought early prototype in-lab demonstrations [ 6 , 7 ] to production-grade systems available as cloud-based services [ 8 , 9 ] or integrated into high-performance computing (HPC) facilities [ 10 , 11 ] . To date, researchers have used these state-of-the-art quantum systems to run computational workloads involving more than 100 qubits [ 12 , 13 ] and demonstrate computational advantage for specific problems using different physical platforms [ 14 , 15 ] . Dedicated software development kits (SDKs), such as Qiskit [ 16 ] , are used for developing quantum algorithms and programming quantum devices. Their current workflow for the development and execution of quantum programs includes several steps, including high-level optimization, compilation, execution on hardware, and post-processing tasks [ 17 , 18 ] . The compilation step, that is, the transformation of abstract quantum programs into instructions that can be executed on a quantum computer, involves numerous computationally expensive tasks, such as mapping logical qubits from an abstract circuit definition to a physical implementation on the quantum device and converting high-level circuit operations into native hardware instructions [ 17 , 18 ] . By default, quantum programs are entirely compiled at each execution. Consequently, the time spent on compilation has a significant contribution to the overall runtime of the whole program [ 9 , 19 ] , which leads to a significant runtime overhead, especially as both the size and complexity of the original circuit scale [ 19 ] . Recently, a number of solutions have been proposed to address this challenge through the use of precompilation methods, including [ 20 , 19 , 9 , 21 , 22 , 23 ] , which involve the compilation of a portion of the source code to be executed prior to deployment and stored in advance, rather than being compiled at runtime. These approaches concentrate on precompiling specific gates [ 23 ] , the logical circuit level [ 19 ] , or the pulse level [ 22 , 21 ] . However, the question of which individual tasks, so-called passes, and which parameters (e.g., circuit structure, optimization level, etc.) contribute to compilation time — and to what extent — has not been addressed. In this work, we perform a preliminary analysis of Qiskit’s built-in compiler toolchain to identify which of its passes affect the compilation time for a given circuit with varying optimization levels. Consequently, we aim to help researchers and developers identify potential bottlenecks in the compilation process and to effectively use precompilation techniques. In particular, we comprehensively profile Qiskit’s preset compiler pipelines, focusing on the cumulative CPU time required for individual passes and identifying the top 10 most expensive passes for a Quantum Fourier Transform (QFT) [ 24 ] and a Greenberger-Horne-Zeilinger (GHZ) state [ 25 ] preparation circuit with 100 qubits each. Our results show that while the contributions of synthesis passes among the top 10 reveal a comparable trend for both circuits and all optimization levels, especially for higher optimization levels, the impact of qubit mapping and circuit optimization passes varies significantly between the two circuits. For instance, a single mapping pass accounts for over 99% of the total compilation time when compiling GHZ with optimization levels 2 and 3. Similarly, for optimization level 3 and QFT, a single circuit optimization pass accounts for \approx 87% of the overall compilation time. II Background II-A Quantum Program Execution Model The execution of a quantum program on a quantum computer can be modeled in a workflow consisting of several steps, as outlined in [ 18 ] and illustrated in Fig. 1 . First, a suitable algorithm is selected to solve the problem at hand. Next, a hardware-independent circuit optimization step is applied, followed by a hardware selection step [ 17 ] . Once a device has been selected and the physical constraints of the targeted quantum processing unit (QPU) are known, device-specific quantum circuit compilation can proceed [ 17 ] . In this phase, the circuit is compiled and optimized for the selected hardware platform on which it is to be executed. Finally, the compiled circuit is sent to a quantum computing device for deployment and execution, which returns the result [ 18 ] . Fig. 1 : The depicted workflow for quantum program execution is based on the model in [ 18 ] and adapted with a more nuanced view of quantum circuit compilation, as presented in [ 17 ] . Quantum circuit compilation (QCC) — i.e., the transformation of abstract, hardware-agnostic quantum circuits into a version optimized for the target hardware — is a non-trivial procedure involving numerous time- and resource-intensive tasks. Specifically, the abstract quantum circuit must be translated into a sequence of instructions that can be executed natively on the target QPU; a task known as gate synthesis [ 17 ] . In addition, the hardware-agnostic qubit layout of the abstract quantum circuit has to match the specific topology of the physical device; a process termed qubit mapping, a known NP-complete problem [ 26 ] . Both processes change the composition of the circuit, leading to further possibilities for circuit optimization (see Fig. 1 ). II-B Quantum Circuit Compilation in Qiskit Qiskit performs QCC by executing a sequence of compilation tasks, referred to as passes. These passes are typically executed through a PassManager , which arranges and performs a series of circuit inspections and transformations [ 27 ] . Specifically, Qiskit offers four built-in compiler pipelines, each designed to cater to distinct