Staged Hybrid Quantum-Classical Programming
Chuta Sano, Peng Fu, Ryan Kavanagh, Jennifer Paykin, Brigitte Pientka
Abstract
Hybrid quantum-classical computing systems consist of a classical control system that sends quantum circuits and receives measurement results from a quantum co-processor. Such systems allow us to model algorithms that require the classical control system to generate quantum circuits on the fly, potentially based on prior measurement results. This is challenging, as the classical control system must generate quantum circuits that manipulate live quantum states. In this setting, the classical control system is generating further quantum circuits while the quantum co-processor is internally maintaining the state of the live qubits; this is not ideal, since this not only is costly but also introduces additional sources of noise to the live qubits. Thus, we want to minimize the latency between receiving measurement results and sending the next quantum circuit to be executed by pre-computing quantum circuits. We introduce HyQ (pronounced haiku), a multi-modal language based on adjoint logic that pre-generates quantum circuits before executing a hybrid quantum-classical program. We achieve this by separating our semantics into two distinct stages: 1) compile-time generation of quantum circuits and classical runtime code and 2) execution of the classical runtime code that instruments the quantum co-processor. This separation between stages allows us to formally guarantee that all circuit-generation logic occurs before the instrumentation logic, i.e., the actual runtime, and minimizes the idling of the quantum co-processor at runtime. We give a type system, a circuit-normalization semantics for the compile-time stage, which eagerly performs all circuit-generation logic, and a runtime semantics for HyQ that corresponds to the second stage. We prove type preservation and progress for both semantics.
Create a lesson
Related papers
A Dynamic Intermediate Representation for Hybrid Quantum-Classical Programs
Shared title terminology · Alex Rice, Chris Heunen, Tobias Grosser
Irene: Equivalence Checking of Hybrid Quantum Programs via Structure-Preserving Symbolic Reduction
Shared title terminology · Jingyu Ke, Jingyang Li, Guoqiang Li
Simulating Quantum Computation Using Probabilistic Programming
Shared title terminology · Yafei Yang, Chung-chieh Shan
A Complete Calculus for Hamiltonian Quantum Programming
Shared title terminology · Jacques Carette, Chris Heunen, Robin Kaarsgaard et al.
Decompiling Quantum Assembly into Structured Programs
Shared title terminology · Pingchuan Ma, Zhantong Xue, Zongjie Li et al.
pfoqcompiler: Efficient Compilation of Quantum Control in Recursive First-Order Quantum Programs
Shared title terminology · Mário Silva, Alexandre Guernut, Marco Lewis