Towards HPC-Friendly Quantum Programming Models Mateusz Meller Supervisors: Dr. Oliver Thomson Brown1, Dr. Joseph Lee1, Vendel Szeremi2 1. EPCC, University of Edinburgh 2. Hartree Centre, STFC, UKRI Introduction Even though quantum computing promises advantage on some of the applications, such as quantum hamiltonian simulation, current devices are prone to errors and have short coherence times. Most research focuses on circuit-oriented programming model. While this model provides universal computation, it is inefﬁcient. On the other hand, analog quantum computers, can solve some of the problems by leveraging native hardware controls, providing shorter time-to-solution, thus enabling us to study larger problems. However, this is an under-explored territory, especially from the point of view of HPC. No satisfactory tools exist for the integration of classical HPC with analog QC. The goal of this project is to develop such tools. Figure 1. There are two general schemes for implementing Quantum Simulation on a quantum computer. In a circuit-oriented scheme we apply sequence of unitaries, known as gates. In Hamiltonian-oriented scheme we synthesise Hamiltonian terms which evolve in time. Figures taken from [1]. Analog Quantum Simulation On-machine instructions Programming Model Figure 2. Gate-based quantum circuit code written using CUDA Quantum [2]. User speciﬁes the quantum kernel as a sequence of gates applied to the quantum register. Figure 3. Hamiltonian-oriented code written using SimuQ - framework for programming quantum simulation on analog devices [1]. Figure 6. Resulting pulse schedule generated by the circuit-based Qiskit compiler [3]. Figure taken from [1]. Figure 7. Resulting pulse schedule generated by SimuQ compiler targeting analog machines. Figure taken from [1]. Figure 8. General outline of the project. Having stated the problem, the project will consist of 4 phases: Setup, Prototyping, Development and Validation. Project goals Problem: Design HPC friendly programming model for analog quantum computing Port Quake MLIR Dialect to XDSL Develop dialect for analog QC in XDSL Explore mappings between dialects and underlying constructs Understand target ISA by collaborating with Strathclyde Develop hardware-aware QIR lowering, with optimal instruction selection Validate solutions on QC simulator (Tensor Networks / Statevector) Identify higher-level abstractions mapping well to Dialects Benchmark on a real quantum device Setup Prototyping Validation Develop DSL which leverages ﬁndings Development Results Compilation process C++ Clang AST to LLVM MLIR Quake Dialect QIR (quantum extended LLVM IR) Device code registration Link-time override (CUDAQ func to MLIR func) Link Opt Exe Figure 4. Compilation process for the CUDA Quantum framework. CUDAQ kernel constructs are mapped to Quake MLIR dialect, which is further lowered to Quantum Intermediete Representation (QIR). Figure 5. Compilation process for the SimuQ Quantum Analog framework. The steps involved focus on the correct resource and instruction scheduling. py Instruction Schedule Conﬂict Resolver Hamiltonian Synthesizer Block Schedule Scheduler Signal Line Schedule Pulse Translator Pulse Schedule Exe References [1] Peng, Yuxiang, Jacob Young, Pengyu Liu, and Xiaodi Wu. ‘SimuQ: A Framework for Programming Quantum Hamiltonian Simulation with Analog Compilation’. Proceedings of the ACM on Programming Languages 8, no. POPL (5 January 2024): 2425–55. [2] Kim, Jin-Sung, Alex McCaskey, Bettina Heim, Manish Modani, Sam Stanwyck, and Timothy Costa. ‘CUDA Quantum: The Platform for Integrated Quantum- Classical Computing’. In 2023 60th ACM/IEEE Design Automation Conference (DAC), 1–4, 2023. [3] Aleksandrowicz, Gadi, Thomas Alexander, Panagiotis Barkoutsos, Luciano Bello, Yael Ben-Haim, David Bucher, Francisco Jose Cabrera-Hernández, et al. ‘Qiskit: An Open-Source Framework for Quantum Computing’. Zenodo, 23 January 2019. Quantum Circuit