Abstract Variational Quantum Algorithms are hybrid classical-quantum algorithms where classical and quantum computation work in tandem to solve computational problems. These algorithms create interesting challenges for the design of suitable programming languages. In this paper we introduce Qimaera, which is a set of libraries for the Idris 2 programming language that enable the programmer to implement hybrid classical-quantum algorithms where the full power of the elegant Idris language works in synchrony with quantum programming primitives. The two key ingredients of Idris that make this possible are (1) dependent types which allow us to implement unitary quantum operations; and (2) linearity which allows us to enforce fine-grained control over the execution of quantum operations so that we may detect and reject many physically inadmissible programs. We also show that Qimaera is suitable for variational quantum programming by providing implementations of two prominent variational quantum algorithms – QAOA and VQE.
Abstract Variational Quantum Algorithms are hybrid classical-quantum algorithms where classical and quantum computation work in tandem to solve computational problems. These algorithms create interesting challenges for the design of suitable programming languages. In this paper we introduce Qimaera, which is a set of libraries for the Idris 2 programming language that enable the programmer to implement hybrid classical-quantum algorithms where the full power of the elegant Idris language works in synchrony with quantum programming primitives. The two key ingredients of Idris that make this possible are (1) dependent types which allow us to implement unitary quantum operations; and (2) linearity which allows us to enforce fine-grained control over the execution of quantum operations so that we may detect and reject many physically inadmissible programs. We also show that Qimaera is suitable for variational quantum programming by providing implementations of two prominent variational quantum algorithms – QAOA and VQE.
Variational Quantum Algorithms are hybrid classical-quantum algorithms where classical and quantum computation work in tandem to solve computational problems. These algorithms create interesting challenges for the design of suitable programming languages. In this paper we introduce Qimaera, which is a set of libraries for the Idris 2 programming language that enable the programmer to implement (variational) quantum algorithms where the full power of the elegant Idris language works in synchrony with quantum programming primitives that we introduce. The two key ingredients of Idris that make this possible are (1) dependent types which allow us to implement unitary (i.e. reversible and controllable) quantum operations; and (2) linearity which allows us to enforce fine-grained control over the execution of quantum operations that ensures compliance with the laws of quantum mechanics. We demonstrate that Qimaera is suitable for variational quantum programming by providing implementations of the two most prominent variational quantum algorithms -- QAOA and VQE. To the best of our knowledge, this is the first implementation of these algorithms that has been achieved in a type-safe framework.
The rapid evolution of quantum computing has introduced groundbreaking approaches to solving complex optimization problems, traditionally limited by classical methods. This talk explores the principles and applications of quantum optimization, with a focus on Variational Quantum Algorithms (VQAs). These algorithms, including the Variational Quantum Eigensolver (VQE) and Quantum Approximate Optimization Algorithm (QAOA), leverage hybrid quantum-classical systems to address challenges in diverse fields such as combinatorial optimization, quantum chemistry, and material design. Attendees will gain insights into the theoretical foundations of quantum computing, the operational mechanics of quantum circuits, and the integration of quantum programming tools like Qiskit. Practical examples and demonstrations will highlight how VQAs outperform classical methods in specific scenarios, offering a transformative perspective on optimization in the quantum era.
As quantum computing hardware advances toward practical implementation, the design of high-level programming languages for quantum-classical hybrid systems remains a critical challenge. Current quantum programming approaches lack unified abstractions that seamlessly integrate classical and quantum computation. This paper proposes a foundational framework for a high-level quantum-classical hybrid programming language based on multi-modal type theory. Our approach formulates quantum-classical hybrid computation as staged computation, where classical computation generates and executes quantum programs. We adapt type systems and operational semantics from prior research in classical staged computation to this framework. This research provides a theoretical foundation for implementing interpreters and compilers that uniformly handle both classical and quantum computation.
Quantum computing (QC) is an emerging computational paradigm that leverages the laws of quantum mechanics to perform elementary logic operations. Existing programming models for QC were designed with fault-tolerant hardware in mind, envisioning stand-alone applications. However, the susceptibility of near-term quantum computers to noise limits their stand-alone 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 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 , which enables single-source quantum-classical programming. Programs written using the QCOR library–based language extensions can be compiled to produce functional hybrid binary executables. After defining QCOR’s programming model, memory model, and execution model, we discuss how QCOR enables variational, iterative, and feed-forward QC. QCOR approaches quantum-classical computation in a hardware-agnostic heterogeneous fashion and strives to build on best practices of high-performance computing. The high level of abstraction in the language extension is intended to accelerate the adoption of QC by researchers familiar with classical high-performance computing.
We report on two major hybrid applications of quantum computing, namely, the quantum approximate optimisation algorithm (QAOA) and the variational quantum eigensolver (VQE). Both are hybrid quantum classical algorithms as they require incremental communication between a classical central processing unit and a quantum processing unit to solve a problem. We find that the QAOA scales much better to larger problems than random guessing, but requires significant computational resources. In contrast, a coarsely discretised version of quantum annealing called approximate quantum annealing (AQA) can reach the same promising scaling behaviour using much less computational resources. For the VQE, we find reasonable results in approximating the ground state energy of the Heisenberg model when suitable choices of initial states and parameters are used. Our design and implementation of a general quasi-dynamical evolution further improves these results.
While classical computing science has developed a variety of methods and programming languages around the concept of the universal computer, the typical description of quantum algorithms still uses a purely mathematical, non‐constructive formalism which makes no difference between a hydrogen atom and a quantum computer. This paper investigates, how the concept of procedural programming languages, the most widely used classical formalism for describing and implementing algorithms, can be adopted to the field of quantum computing, and how non‐classical features like the reversibility of unitary transformations, the non‐observability of quantum states or the lack of copy and erase operations can be reflected semantically. It introduces the key concepts of procedural quantum programming (hybrid target architecture, operator hierarchy, quantum data types, memory management, etc.) and presents the experimental language QCL, which implements these principles.