Manuscript Offprint

arXiv:2610.18056

OpenMQPI: An MLIR-based Pipeline to Offload Quantum Circuits via OpenMP

Ercüment Kaya, Ekin Devim Şahinkaya, Minh Chung, Martin Schulz

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

The emerging field of quantum computing requires specialized software stacks and programming interfaces. However, these tools are often tightly coupled to specific software ecosystems and hardware backends, limiting interoperability and software reuse. For High-Performance Computing-Quantum Computing (HPCQC) application developers, this complicates the integration of quantum accelerators into existing applications.

Existing quantum programming frameworks expose circuit representations and compilation pipelines that are tightly coupled to their execution ecosystems, making it difficult to integrate quantum compilation with established heterogeneous compiler infrastructures. To address this issue, we propose OpenMQPI, a Multi-Level Intermediate Representation (MLIR)-based OpenMP extension for quantum programming. OpenMQPI leverages OpenMP's standardized target-offloading infrastructure to provide a reusable approach for integrating quantum resources into High Performance Computing (HPC) applications. To enable quantum offloading with OpenMQPI, we create QPIR, a lightweight MLIR dialect for representing quantum circuits inside the OpenMP target regions, together with a compiler pipeline that performs quantum-specific optimizations and lowers the resulting representation into an executable compatible with the OpenMP offloading model. At runtime, the generated executable leverages the OpenMP target offloading model via a MQSS plugin within OpenMQPI to offload quantum circuits to the quantum hardware.

We evaluate OpenMQPI using the Variational Quantum Eigensolver (VQE), the Quantum Fourier Transform (QFT), and the Deutsch-Jozsa algorithm with 5, 10, 15, and 20 qubits, and compare its runtime performance against Qiskit and CUDA Quantum. The results show that OpenMQPI achieves the lowest average execution time for VQE across all evaluated qubit configurations. At 20 qubits, OpenMQPI requires 5.18 s, compared with 5.83 s for Qiskit and 7.39 s for CUDA Quantum. For QFT and Deutsch-Jozsa, OpenMQPI remains close to Qiskit while achieving lower execution times than CUDA Quantum.

Ekin Devim Şahinkaya*

ekin.sahinkaya@tum.de

Leibniz Supercomputing Centre

Technical University of Munich

Garhing near Munich, Germany

Martin Schulz

schulzm@in.tum.de

Technical University of Munich

Leibniz Supercomputing Centre

Garhing near Munich, Germany

1 Introduction

Quantum computing has the potential to address computational problems that are believed to be unsolvable for classical computers [37]. In practice, however, many quantum applications also rely on classical computation to support and coordinate quantum execution [8, 10, 38]. This has motivated growing interest in integrating quantum computing resources into HPC environments, where classical and quantum resources can work together within hybrid applications [3].

Conspicuous progress has been made in the development of quantum computing hardware [29, 31]. However, to achieve the full potential of Quantum Computing (QC), this hardware requires compatible programming languages, interfaces, and compilation infrastructure that can coordinate classical and quantum resources within a common execution environment.

A variety of programming interfaces, including Qiskit[13], PennyLane[4], and CUDA Quantum[18], provide tools for developing and executing quantum applications. However, these frameworks rely on different programming models, compiler infrastructures, and execution environments. As a result, integrating quantum resources into existing HPC applications often requires developers to work with framework-specific software stacks and interfaces. This framework-specific approach limits the portability and reusability of software components across different HPCQC environments.

A key challenge is that traditional HPC offloading and quantum execution expose different compilation and execution models. OpenMP target offloading is designed around launching compiled device code on a target device, whereas a quantum resource executes a circuit or quantum job rather than conventional device instructions.

Therefore, the quantum circuit must remain available as an explicit representation beyond the device-code lowering stage. Directly treating a quantum resource as another OpenMP target device does not provide a natural mechanism to preserve and optimize the circuit while still using the OpenMP compilation and runtime infrastructure.

This observation motivates a different approach: treating quantum circuits as first-class target payloads rather than as machine code. OpenMQPI preserves the circuit at the compiler level, applies

∗^{*}Both authors contributed equally to this research.

quantum-specific transformations in MLIR, and then transports the resulting circuit through the OpenMP target-offloading path to a quantum-specific runtime plugin.

In this paper, we introduce OpenMQPI, an MLIR-based compilation infrastructure that integrates quantum circuit compilation and execution into the OpenMP target-offloading model. Rather than introducing another framework-specific programming interface, OpenMQPI builds on the existing OpenMP infrastructure, allowing quantum resources to be integrated as target devices within the programming model already widely used in HPC.

OpenMQPI preserves the quantum circuit as an Intermediate Representation (IR) during the compilation rather than lowering it to target device instructions. The MLIR-based representation enables quantum-specific optimizations before the circuits are lowered for execution. The resulting circuit is then carried through the OpenMP offloading pipeline and delivered to a quantum-specific libomptarget plugin, which submits the circuit to the selected quantum resource.

The implementation leverages the OpenMP runtime and MQSS Client interface [15] to submit quantum circuits to the selected quantum device. The approach is considered a custom libomptarget plugin, referred to as the MQSS plugin. We evaluate OpenMQPI using the VQE, the QFT, and the Deutsch-Jozsa algorithm across different qubit configurations. Our evaluation validates the complete compilation-and-execution pipeline and demonstrates that OpenMQPI maintains competitive runtime performance compared with existing quantum programming approaches.

This paper makes the following contributions:

• An MLIR-based representation for quantum circuits: We introduce Quantum Programming Intermediate Representation (QPIR), a lightweight MLIR dialect for representing and optimizing quantum circuits.

• Circuit-preserving integration with OpenMP target offloading: We extend the OpenMP target-offloading infrastructure to represent quantum circuits as target payloads, preserve them through compilation, and deliver them to the MQSS plugin for execution.

• A compiler and runtime pipeline for quantum execution: We implement qpir_cc, qpir_opt, and qpir_link together with an MQSS plugin to generate, optimize, lower, and execute quantum circuits through the OpenMP offloading infrastructure.

• An experimental evaluation of OpenMQPI: We evaluate the proposed infrastructure and its runtime performance across different quantum applications.

The remainder of this paper is organized as follows: Section 2 covers background. In Section 3, we introduce the OpenMQPI, discuss its architecture and components. In Section 4, we present the experiments and performance evaluation. Section 5 reviews the related literature. Finally, we conclude the paper and discuss future work in Section 6.

References (16)