From this question, I gathered that the main quantum computing programming languages are Q# and QISKit.

What other programming languages are available for programming quantum computers? Are there certain benefits to choosing particular ones?

EDIT: I am looking for programming languages, not emulators. Emulators simulate things. Programming languages are a method of writing instructions (either for real objects or for emulators). There may be a single language that works for multiple emulators and vice versa.

  • I would like to point out that essentially none of the languages listed in the accepted answer here can actually run against an existing quantum computer. It might make more sense to either 1) edit the question to make it clear that you're asking for languages that cannot be compiled to run against existing hardware, or 2) accept a different answer. – DanielSank Apr 4 at 14:12
  • @DanielSank I accepted the Wikipedia list one because I assumed that that list will be updated to include languages that actually do run on hardware; it will serve as the best response assuming that Wikipedia continues to have that page. – Pro Q Apr 4 at 15:59
  • @ProQ - There is a minor update to my answer. In addition, I have clairified that my answer is not cut/paste but has verified links. I've fixed a broken link. I've added an important contributor's website. -- I will come back from time to time to ensure that this answer is "approximately great". Details on answering and maintaining have been addressed. Some of the languages in my answer do run on hardware available for purchase and are being used regularly. Thanks for your faith ProQ. – Rob Apr 26 at 17:39
up vote 23 down vote accepted

Wikipedia list of Quantum Computer programming languages

(This answer is not a copy of that webpage, it's more updated and with verified links. In some cases the author's paper or website link is added.)

The website Quantum Computing Report has a Tools webpage listing over a dozen links, some new and some repeating the above list.

See also QuanTiki's webpage: "List of QC simulators", for a huge list of simulators and programming languages based on: C/C++, CaML, OCaml, F#, along with GUI based, Java, JavaScript, Julia, Maple, Mathematica, Maxima, Matlab/Octave, .NET, Perl/PHP, Python, Scheme/Haskell/LISP/ML and other online services providing calculators, compilers, simulators, and toolkits, etc.

Are there certain benefits to choosing particular ones?

If you plan on using a particular quantum computer then one would hope that the programming language developed by the manufacturer is both best suited for that particular machine and well supported.

Choosing a language with a larger following means that there are more Forums available and hopefully more bug fixes and support.

Unfortunately that leaves some great niche products to struggle to gain a user base. Trying to find one language that is both powerful/expressive and supported across various platforms is the trick, the answer is an opinion ATM.

An evaluation of four software platforms: Forest (pyQuil), QISKit, ProjectQ, and the Quantum Developer Kit is offered by Ryan LaRose in "Overview and Comparison of Gate Level Quantum Software Platforms" (6 Jul 2018).

I will return to this answer from time to time to make updates, without excessive bumping.

Gate model hardware vendors have built out their own low level languages:

These have higher level python sdk's available:

Rigetti is also wrapping their language in a higher level library for calling pre-built applications called Grove.

Microsoft has developed Q# to run against their existing simulator, and eventually their physical hardware.

Since the languages above are vendor specific the main benefit is that you can run quantum programs on their computers.

Outside of the vendor specific languages is Scaffold which is being developed by Princeton researchers. This language is interesting as it includes a toolchain for analyzing the programs to determine costs, performance potential, and scalability potential.

Edit: Project Q is another framework that allows you to develop programs utilizing Python which can run on an included simulator.

Oak Ridge National Labs has started work on a project called XACC which is intended to abstract vendor specific code to allow users access to the various hardware platforms without duplicating code in each vendor specific language.

Or even look at Quipper, a functional Quantum programming language. With monadic semantics, built in functionality for reversible quantum computation, hierarchical circuit support, and more! Used in actual practice too – for an algorithm to compute the solution of the Dirac equation by LaFlamme.

Unfortunately, the list on Quantiki is pretty old and not well maintained. Even listing all quantum programming languages in a single reply to this question isn't sustainable since the quantum landscape is constantly evolving. For example, Google has just released Cirq, a new quantum programming framework for Noisy Intermediate Scale Quantum (NISQ) computers which isn't featured in any of the above replies since it was announced only a couple of days ago.

To address this problem and as a response to another question on QC StackExchange I started a curated list of open-source software projects on GitHub which also includes a comprehensive overview of actively developed quantum programming languages and frameworks. The list is actively maintained by the community and we constantly add new projects.

  • This looks like a wonderful resource. Thank you! I wonder if there's another similar list of projects that aren't just open-source. – Pro Q Jul 23 at 18:34
  • @ProQ to be honest I think that the open-source list covers >95% of the quantum software space. There are barely any closed-source packages with public access and you wouldn't care about quantum software that is used internally within some company without public access anyway. – Mark Fingerhuth Jul 27 at 16:59

IMHO, Qubiter. (Disclaimer: I wrote the code for Qubiter.)

Some features that Qubiter has that others don't:

  • Automatically creates 2 files for the quantum circuit, a Qubiter qasm file and an ASCII picture file. This makes debugging easier (can also draw fancy LaTex picture of circuit but that is slower so only optional) The ascii file and qasm file correspond line by line, so line 5 in each gives 2 representations, ascii and qasm, of the same gate.

  • Only uses quantum bits instead of quantum and classical registers. Classical register are unnecessary and bothersome complication. For example, If you continue developing the classical register operations of PyQuil, you will eventually end up reinventing Python inside PyQuil, which is itself inside PyQuil. That would be the logical conclusion of PyQuil's classical registers, wouldn't it?

  • Translates Qubiter qasm to IBM qasm, Google's Cirq and Rigetti's PyQuil.
  • Only Qubiter has PRINT statement in its qasm that prints to screen the state vector at the position of the PRINT statement in the qasm
  • Expands arbitrary one qubit gates with any number of controls to a sequence of cnots and single qubit rotations
  • Includes quantum CSD compiler
  • Is written in Python (Q# is written in Q# and Quipper in Haskell)
  • Gates controlled by classical qubits are handled much more clearly
  • Can be easily used in conjunction with OpenFermion
  • Has nice library of Jupyter notebooks, not as large as IBM's qiskit's, but other languages besides IBM qiskit have almost no Jupyter notebooks

Your Answer

 

Not the answer you're looking for? Browse other questions tagged or ask your own question.