An Introduction to Quantum Programming in Quipper

  • Alexander S. Green
  • Peter LeFanu Lumsdaine
  • Neil J. Ross
  • Peter Selinger
  • Benoît Valiron
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7948)


Quipper is a recently developed programming language for expressing quantum computations. This paper gives a brief tutorial introduction to the language, through a demonstration of how to make use of some of its key features. We illustrate many of Quipper’s language features by developing a few well known examples of Quantum computation, including quantum teleportation, the quantum Fourier transform, and a quantum circuit for addition.


Quantum Computation Programming Languages Quipper 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aaronson, S., Gottesman, D.: Improved simulation of stabilizer circuits. Physical Review A 70(5), 052328 (2004), arXiv:quant-ph/0406196Google Scholar
  2. 2.
    Altenkirch, T., Green, A.S.: The Quantum IO Monad. In: Gay, S., Mackie, I. (eds.) Semantic Techniques in Quantum Computation, pp. 173–205. Cambridge University Press (2009)Google Scholar
  3. 3.
    Ambainis, A., Childs, A.M., Reichardt, B.W., Spalek, R., Zhang, S.: Any AND-OR formula of size n can be evaluated in time \(n^{\frac12+o(1)}\) on a quantum computer. SIAM J. Comput. 39, 2513–2530 (2010)MathSciNetzbMATHCrossRefGoogle Scholar
  4. 4.
    Bjesse, P., Claessen, K., Sheeran, M., Singh, S.: Lava: hardware design in Haskell. In: Proceedings of the Third ACM SIGPLAN International Conference on Functional Programming, ICFP 1998, pp. 174–184. ACM, New York (1998), doi:10.1145/289423.289440CrossRefGoogle Scholar
  5. 5.
    Childs, A.M., Cleve, R., Deotto, E., Farhi, E., Gutmann, S., Spielman, D.A.: Exponential algorithmic speedup by a quantum walk. In: Proceedings of the 35th Annual ACM Symposium on Theory of Computing, pp. 59–68 (2003)Google Scholar
  6. 6.
    Claessen, K.: Embedded Languages for Describing and Verifying Hardware. Ph.D. thesis, Chalmers University of Technology and Göteborg University (2001)Google Scholar
  7. 7.
    Draper, T.G.: Addition on a Quantum Computer (August 2000), arXiv:quant-ph/0008033Google Scholar
  8. 8.
    Gay, S.J.: Quantum programming languages: Survey and bibliography. Mathematical Structures in Computer Science 16(4) (2006),
  9. 9.
    Giles, B.: Programming with a Quantum Stack. Master’s thesis, Department of Computer Science, University of Calgary (April 2007),
  10. 10.
    Green, A.S., Lumsdaine, P.L., Ross, N.J., Selinger, P., Valiron, B.: Quipper: A scalable quantum programming language. To appear in PLDI 2013 (2013), arXiv:1304.3390Google Scholar
  11. 11.
    Hallgren, S.: Polynomial-time quantum algorithms for Pell’s equation and the principal ideal problem. J. ACM 54(1), 4:1–4:19 (2007), doi:10.1145/1206035.1206039Google Scholar
  12. 12.
    Harrow, A.W., Hassidim, A., Lloyd, S.: Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 103(15), 150502 (2009)MathSciNetCrossRefGoogle Scholar
  13. 13.
    IARPA Quantum Computer Science Program: Broad Agency Announcement IARPA-BAA-10-02 (April 2010),
  14. 14.
    Magniez, F., Santha, M., Szegedy, M.: Quantum algorithms for the triangle problem (November 2003), arXiv:quant-ph/0310134Google Scholar
  15. 15.
    Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press (2002)Google Scholar
  16. 16.
    Ömer, B.: A Procedural Formalism for Quantum Computing. Master’s thesis, Dept. of Theoretical Physics, Tech. Univ. Vienna (July 1998),
  17. 17.
    Regev, O.: Quantum computation and lattice problems. SIAM J. Comput. 33(3), 738–760 (2004)MathSciNetzbMATHCrossRefGoogle Scholar
  18. 18.
    Whitfield, J.D., Biamonte, J., Aspuru-Guzik, A.: Simulation of electronic structure hamiltonians using quantum computers. Molecular Physics 109(5), 735–750 (2011)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Alexander S. Green
    • 1
  • Peter LeFanu Lumsdaine
    • 2
  • Neil J. Ross
    • 1
  • Peter Selinger
    • 1
  • Benoît Valiron
    • 3
  1. 1.Dalhousie UniversityHalifaxCanada
  2. 2.Institute of Advanced StudiesPrincetonU.S.A.
  3. 3.University of PennsylvaniaPhiladelphiaU.S.A.

Personalised recommendations