[Paper Review] QCOR: A Language Extension Specification for the Heterogeneous Quantum-Classical Model of Computation
QCOR is a C++-based language extension that enables seamless, single-source programming for heterogeneous quantum-classical computing, supporting variational, iterative, and feed-forward quantum algorithms through library calls and directives. It provides a hardware-agnostic, high-level abstraction for near-term noisy intermediate-scale quantum (NISQ) devices, with built-in support for automated error mitigation and integration with high-performance computing (HPC) workflows.
Quantum computing is an emerging computational paradigm that leverages the laws of quantum mechanics to perform elementary logic operations. Existing programming models for quantum computing were designed with fault-tolerant hardware in mind, envisioning standalone applications. However, near-term quantum computers are susceptible to noise which limits their standalone utility. To better leverage limited computational strengths of noisy quantum devices, hybrid algorithms have been suggested whereby quantum computers are used in tandem with their classical counterparts in a heterogeneous fashion. This {\it modus operandi} calls out for a programming model and a high-level programming language that natively and seamlessly supports heterogeneous quantum-classical hardware architectures in a single-source-code paradigm. Motivated by the lack of such a model, we introduce a language extension specification, called QCOR, that enables single-source quantum-classical programming. Programs written using the QCOR library and directives based language extensions can be compiled to produce functional hybrid binary executables. After defining the QCOR's programming model, memory model, and execution model, we discuss how QCOR enables variational, iterative, and feed forward quantum computing. QCOR approaches quantum-classical computation in a hardware-agnostic heterogeneous fashion and strives to build on best practices of high performance computing (HPC). The high level of abstraction in the developed language is intended to accelerate the adoption of quantum computing by researchers familiar with classical HPC.
Motivation & Objective
- To address the lack of a unified, high-level programming model for heterogeneous quantum-classical systems in the NISQ era.
- To enable efficient, portable, and scalable quantum-classical application development using familiar C++ idioms and HPC best practices.
- To support iterative and variational quantum algorithms essential for near-term quantum hardware with noise and limited qubit coherence.
- To provide a mechanism for automated error mitigation through composable ObjectiveFunction decorators in quantum programming.
- To establish a foundation for future fault-tolerant quantum computing via extensible compiler and execution models.
Proposed method
- Introduces QCOR as a library and directives-based extension to C++ for expressing quantum kernels and classical control flow in a single source code.
- Defines a programming model that supports asynchronous execution of quantum kernels within classical C++ applications.
- Establishes a memory model where quantum states and observables are managed via high-level abstractions, enabling efficient state transfer and measurement.
- Employs a hardware-agnostic execution model that allows quantum kernels to be compiled and executed on diverse quantum co-processors via a unified interface.
- Uses ObjectiveFunction abstractions to represent cost functions in variational algorithms, with support for composition and decoration to enable layered error mitigation strategies.
- Leverages existing HPC practices such as memory management, type safety, and performance portability to ensure efficiency and interoperability.
Experimental results
Research questions
- RQ1How can a high-level programming model be designed to natively support heterogeneous quantum-classical execution in a single-source paradigm?
- RQ2What abstractions are necessary to enable efficient implementation of variational and iterative quantum algorithms on noisy intermediate-scale quantum (NISQ) devices?
- RQ3How can error mitigation be systematically composed and integrated into quantum programming workflows without sacrificing performance or portability?
- RQ4To what extent can quantum-classical programming be made interoperable with classical HPC languages like C++ and frameworks?
- RQ5What is the role of compiler and runtime support in enabling scalable, portable, and efficient execution of hybrid quantum-classical applications?
Key findings
- QCOR enables the expression of hybrid quantum-classical applications using a single C++ source file, with quantum kernels embedded via library calls and directives.
- The language supports variational quantum algorithms through a first-class ObjectiveFunction abstraction that computes expectation values of observables.
- Error mitigation strategies can be composed via decorator-style ObjectiveFunction composition, enabling layered mitigation without modifying core quantum logic.
- The QCOR model is hardware-agnostic and designed to interoperate with existing HPC systems, ensuring portability across diverse quantum co-processor architectures.
- The specification supports asynchronous execution and efficient memory management, aligning with high-performance computing standards for scalability.
- The approach enables efficient compilation to functional hybrid binaries, demonstrating feasibility for large-scale, production-grade quantum-classical workloads.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.