Quipper

Alexander S. Green, Peter LeFanu Lumsdaine, Neil J. Ross, Peter Selinger, Benoît Valiron
2013 Proceedings of the 34th ACM SIGPLAN conference on Programming language design and implementation - PLDI '13  
The field of quantum algorithms is vibrant. Nevertheless, there is currently a lack of programming languages for describing quantum computation on a practical scale, i.e., not just at the level of toy problems. We address this issue by introducing Quipper, a scalable, expressive, functional, higher-order quantum programming language. Quipper has been used to program a diverse set of nontrivial quantum algorithms, and is able to generate quantum gate representations using trillions of gates. It
more » ... s geared towards a model of computation that uses a classical computer to control a quantum device, but is not dependent on any particular model of quantum hardware. Quipper has proven effective and easy to use, and opens the door towards using formal methods to analyze quantum algorithms. short description of paper 2013/2/11 Quipper, and the seven algorithm implementations, are freely available. 1 Related work. Many formalisms for programming quantum computers have been developed in the last few decades. Some of them, such as the quantum Turing machine [6] or the quantum lambda calculus of van Tonder [23], are mainly theoretical tools for exploring particular aspects of quantum computation, and are not designed with practical quantum programming in mind. There are many recent proposals for quantum programming languages [7] . Of these, we pinpoint three languages that represent important milestones and can be regarded as predecessors of Quipper. In the realm of imperative programming languages, arguably the oldest "concrete" quantum programming language isÖmer's QCL [17] . Defined as a C-style language, QCL comes with many interesting features, collectively dubbed structured quantum programming. This provides a relatively natural way of writing simple quantum algorithms. One of QCL's innovations was the separation of functions into separate syntactic classes, based on their operational behavior; thus, QCL distinguishes classical procedures, which are unconstrained; "quantum functions", which are restricted to define unitary operations; and "pseudo-classical" operators, which are intended to implement oracles, featuring "quantum tests" and automatic uncomputation of ancillas. QCL lacks high-level quantum data types, and does not have a well-defined semantics, complicating the analysis of programs. Finally, since the language was designed with simulation in mind, many of its useful programming features incur a strong computational overhead. In spite of these drawbacks, QCL is a milestone in the development of quantum programming languages. We include a very brief comparison between circuits generated by Quipper and QCL in Section 6. More recently, there have been two proposals for functional quantum programming languages that can be regarded as precursors of Quipper. Selinger and Valiron's quantum lambda calculus is an ML-style language with strong static type checking [19, 20] . It is designed to run on Knill's QRAM model [13], but lacks high-level facilities for circuit construction and manipulation. The quantum IO Monad of Green and Altenkirch [1] is, like Quipper, embedded in Haskell, provides extensible quantum data types, and comes with a consistent operational semantics. However, it uses a much simpler circuit model and lacks many of Quipper's advanced programming features.
doi:10.1145/2491956.2462177 dblp:conf/pldi/GreenLRSV13 fatcat:yu7oilhv2rgklelmg6wvsfrs74