Qimaera: Type-safe (Variational) Quantum Programming in Idris

11/21/2021
by   Liliane-Joy Dandy, et al.
0

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.

READ FULL TEXT
research
05/17/2020

A tutorial introduction to quantum circuit programming in dependently typed Proto-Quipper

We introduce dependently typed Proto-Quipper, or Proto-Quipper-D for sho...
research
07/28/2021

Semantics for Variational Quantum Programming

We consider a programming language that can manipulate both classical an...
research
05/20/2022

Tower: Data Structures in Quantum Superposition

Emerging quantum algorithms for problems such as element distinctness, s...
research
10/21/2019

Quantum Programming with Inductive Datatypes: Causality and Affine Type Theory

Inductive datatypes in programming languages allow users to define usefu...
research
04/03/2018

From Symmetric Pattern-Matching to Quantum Control (Extended Version)

One perspective on quantum algorithms is that they are classical algorit...
research
08/28/2023

Quantum Computing for Solid Mechanics and Structural Engineering – a Demonstration with Variational Quantum Eigensolver

Variational quantum algorithms exploit the features of superposition and...
research
06/02/2023

Type-based Qubit Allocation for a First-Order Quantum Programming Language

Qubit allocation is a process to assign physical qubits to logical qubit...

Please sign up or login with your details

Forgot password? Click here to reset