The Quipper Language


Description

Quipper is an embedded, scalable functional programming language for quantum computing. It provides, among other things:
  • A high-level circuit description language. This includes gate-by-gate descriptions of circuit fragments, as well as powerful operators for assembling and manipulating circuits.
  • A syntax that allows a mixture of procedural and declarative programming styles.
  • Built-in facilities for automatic synthesis of reversible quantum circuits, including from classical code.
  • Support for hierarchical circuits.
  • Extensible quantum data types.
  • Programmable circuit transformers.
  • Support for three execution phases: compile time, circuit generation time, and circuit execution time. A dynamic lifting operation to allow circuit generation to be parametric on values generated at circuit execution time.
  • Extensive libraries of quantum functions, including: libraries for quantum integer and fixed-point arithmetic; the Quantum Fourier transform; an efficient Qram implementation; libraries for simulation of pseudo-classical circuits, Stabilizer circuits, and arbitrary circuits; libraries for exact and approximate decomposition of circuits into specific gate sets.
The Quipper distribution also includes implementations of seven non-trivial quantum algorithms from the literature:

Documentation


Quipper on the August 2015 cover of CACM

Quipper in the news

Other articles on Quipper


"Programming the Quantum Future", CACM promotional video

Release notes

See the file NEWS for more details.

Dec 29, 2019: Release 0.9.0.0. This is the first version of Quipper that is released as a set of Cabal packages. It can now be installed with "cabal install quipper". See README for more detailed installation instructions. The module structure was re-designed, so that all parts of Quipper are now contained in the "Quipper" namespace. This requires many Quipper programs to be updated. Here is how the namespaces were changed:

   Old:                New:
   ====                ====

   Quipper.XYZ         Quipper.Internal.XYZ
   QuipperLib.XYZ      Quipper.Libraries.XYZ
   Libraries.XYZ       Quipper.Utils.XYZ
   Algorithms.XYZ      Quipper.Algorithms.XYZ
   tests               Quipper.Demos
   Programs            Quipper.Programs
In addition, there were many compatibility updates to make Quipper compatible with recent versions of GHC and the Haskell libraries.

July 27, 2016: Release 0.8. Compatibility with GHC 8.0. Note: GHC 7.10 is too broken and will not be supported by Quipper.

Oct 14, 2014: Release 0.7. Compatibility with GHC 7.8.

Jan 16, 2014: Release 0.6. This is mostly a maintenance release to stay in sync with relevant Haskell libraries. Minor edits and documentation updates. Added alternate version of synthesis algorithm for determinant 1 generators. Synthesis and rendering libraries are now external packages.

Sept 2, 2013: Release 0.5. Portability improvements for GHC 7.6. Portability improvements for Windows. Added quipperi script, analogous to ghci. New libraries for classical circuit optimization, unboxing and approximation of multi-qubit gates. Additional gate decompositions. Added decomposition into a "standard" gate set. Updated ASCII output format; improved circuit parser efficiency. Miscellaneous bug fixes, refactoring, and documentation updates.

June 19, 2013: Release 0.4. This is the first public release of Quipper. It is a beta release.

Downloading and installing (Cabal)

Starting from Quipper 0.9, the recommended way to install Quipper is using Cabal. In a nutshell, the commands
   cabal update
   cabal install quipper
 
install all of the required components of Quipper (the Quipper language, the Quipper standard library, and the Quipper tools). In addition, the command "cabal install quipper-all" also installs the Quipper algorithms and demos. For more detailed instructions, see README.

Downloading and installing (legacy method)

The recommended way to install Quipper is using Cabal, see "Downloading and installing (Cabal)" above.

For backward compatibility, the old way of compiling Quipper also still works. Quipper can be downloaded here:

If you would like to ensure the accuracy of the downloaded files, you can double-check their SHA1 sums. Previous releases are available here.

Legacy installation instructions for Linux, Macintosh, and other Unix-like systems:

Legacy installation instructions for Windows:

Please note: Quipper does not work with GHC 7.10 or 8.10. The versions currently supported are GHC 8.0, 8.2, 8.4, 8.6, and 8.8.

Version

0.9.0.0

Contributors

Contributors are listed here, in alphabetical order by last name. Unless otherwise noted, the copyright for his or her contributions rests with each individual author. For contributions by authors whose name is marked (ACS), the copyright rests with Applied Communication Sciences.

Copyright (C) 2011-2019. All rights reserved.
Copyright (C) 2012-2013 Applied Communication Sciences. All rights reserved.

Richard Eisenberg
Alexander S. Green
Peter LeFanu Lumsdaine
Keith Kim (ACS)
Siun-Chuon Mau (ACS)
Baranidharan Mohan
Won Ng (ACS)
Joel Ravelomanantsoa-Ratsimihah
Neil J. Ross
Artur Scherer (ACS)
Peter Selinger
Benoît Valiron
Alexandr Virodov (ACS)
Stephan A. Zdancewic

This research was supported by the Intelligence Advanced Research Projects Activity (IARPA) via Department of Interior National Business Center contract numbers D11PC20168 and D12PC00527. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon. Disclaimer: The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of IARPA, DoI/NBC, or the U.S. Government.

License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. The name of the authors and copyright holders may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Last modified by Peter Selinger on Dec 29, 2019