
Förderjahr 2024 / Stipendium Call #19 / ProjektID: 7413 / Projekt: Optimizing Hybrid Workflows for Cloud-Based Quantum Computation
A workflow model for quantum program execution
As shown in Figure 1, the overall process of executing a quantum program on a quantum computer can be modeled as a workflow consisting of several steps. First, we select a suitable algorithm to solve the problem at hand. Next, a hardware-independent circuit optimization is performed, followed by a hardware selection step. After selecting a device for execution, the physical constraints of its quantum processing unit (QPU) are known. Then device-specific quantum circuit compilation (QCC) can proceed. During this phase, the circuit undergoes a series of transformations that translate and optimize it into a format suitable for execution on the selected hardware platform. Finally, the target quantum computing (QC) device receives the compiled circuit, deploys it, executes it, and returns the result.
The compilation process is a major bottleneck
Just like with classical programs, every quantum program must be compiled - i.e., translated into a format compatible with the target hardware - to execute successfully. This compilation process consists of a series of individual tasks, known as compiler passes, and involves many computationally intensive steps. We can classify the passes into three distinct categories:
- Gate Synthesis: Converts high-level program instructions into low-level hardware operations.
- Qubit Mapping: Matches logical qubits from an abstract circuit design to their actual physical implementation on the device.
- Circuit Optimization: Involves specific routines to reduce the complexity of the circuit.
As mentioned in our previous blog post, however, quantum programs also necessitate recompilation and transmission to quantum computers for each execution, in contrast to classical software, which is compiled once and hosted on servers for on-demand usage. This difference stems from the contrasting paradigms of classical and quantum computing. Consequently, quantum programs are typically compiled at runtime. This results in substantial runtime overhead due to compilation, especially as programs grow in size and complexity.
Possible solutions
Several solutions that use precompilation methods have been proposed to address this issue. These methods compile part of the source code before deployment and save it for later reuse. This shifts the compilation overhead from runtime to compile time. However, these approaches may store excessive amounts of data and require frequent recompilation after hardware recalibrations. A more nuanced approach that targets individual compiler passes could facilitate the adoption of effective reuse methods while maintaining high-quality solutions.
Approaching compilation overhead on the individual pass level
The question of which compiler passes and parameters contribute to the required compilation time and to what extent has not yet been addressed. Existing studies lack a granular analysis of how individual compiler passes respond to specific circuit properties. Rather than addressing quantum compilation at the circuit or pulse level, we are developing novel methods to reduce compilation overhead at the level of compiler passes - the individual tasks that comprise the compilation process. We started by taking an empirical approach to identify existing bottlenecks in the quantum compilation process.
A preliminary analysis of the quantum circuit compilation process in Qiskit
We examined the cumulative runtime of individual compilation passes and identified the ones that most strongly impact the overall runtime. This preliminary analysis is the starting point for our further research. Using Qiskit v.1.3.2, we found that compiling a quantum Fourier transform (QFT) takes about 82% of the total runtime, while preparing a Greenberger–Horne–Zeilinger (GHZ) state takes about 95%. These observations are based on 100-qubit circuits and are thus representative of current workloads.
A more thorough examination of the contributions of each compiler pass revealed that distinct passes accounted for most of the compilation time for both circuits. We also discovered that the time spent on compilation, both as a percentage of the total runtime and in actual seconds, was higher for the GHZ circuit, even though it had fewer gates than the QFT circuit. These findings imply that compilation time depends not only on gate count or qubit number but also on multifaceted relationships between circuit properties and individual compiler pass behavior.
We submitted our preliminary work as a contribution to the 2025 IEEE International Workshop on Quantum Computing: Circuits Systems Automation and Applications (QC-CSAA), which is being held in conjunction with the ISVLSI 2025 conference, and have been accepted for presentation as a full paper. You can find the preprint here: https://arxiv.org/abs/2504.15141