QuaFL: a typed DSL for quantum programming

  • Authors:
  • Andrei Lapets;Marcus P. da Silva;Mike Thome;Aaron Adler;Jacob Beal;Martin Roetteler

  • Affiliations:
  • Raytheon BBN Technologies, Boston, MA, USA;Raytheon BBN Technologies, Boston, MA, USA;Raytheon BBN Technologies, Boston, MA, USA;Raytheon BBN Technologies, Boston, MA, USA;Raytheon BBN Technologies, Boston, MA, USA;NEC Laboratories America, Princeton, NJ, USA

  • Venue:
  • Proceedings of the 1st annual workshop on Functional programming concepts in domain-specific languages
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Quantum computers represent a novel kind of programmable hardware with properties and restrictions that are distinct from those of classical computers. We investigate how some existing abstractions and programming language features developed within the programming languages community can be adapted to expose the unique capabilities of quantum computers to programmers while at the same time allowing them to manage the new and unfamiliar constraints of programming a quantum device. We introduce QuaFL, a statically typed domain-specific programming language for writing high-level definitions of algorithms that can be compiled into logical quantum circuits. The primary purpose of QuaFL is to support programmers in defining high-level yet physically realizable quantum algorithms and in helping them make informed decisions about implementation trade-offs. QuaFL allows programmers to use high-level data structures including integers, fixed point reals, and arrays within quantum algorithms, and to explicitly define superpositions and unitary transformations on data. The QuaFL type system allows programmers to distinguish between classical and quantum portions of a program, uses a variant of linear types and an orthogonality checking algorithm to ensure the quantum portions are physically realizable, and provides type size annotations that can facilitate automated computation of the quantities of quantum resources that will be necessary to run the compiled program (i.e., a logical quantum circuit).