48
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – DanielSank Apr 4 '18 at 14:12
  • 1
    $\begingroup$ @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. $\endgroup$ – Pro Q Apr 4 '18 at 15:59
  • 1
    $\begingroup$ @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. $\endgroup$ – Rob Apr 26 '18 at 17:39
  • $\begingroup$ There is also Yao (Extensible, Efficient Quantum Algorithm Design for Humans), written in Julia, github.com/QuantumBFS/Yao.jl discourse.julialang.org/t/… And here you find a comparison: qid.ethz.ch/wp-content/uploads/2018/09/cheatsheet.pdf arxiv.org/abs/1807.02500 $\endgroup$ – skan Dec 10 '18 at 1:39
30
$\begingroup$

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).


Updates:

Google's Cirq and OpenFermion-Cirq: "Google's AI Blog - Announcing Cirq: An Open Source Framework for NISQ Algorithms".

D-Wave's Leap and Ocean SDK allows access to a D-Wave 2000Q™ System in a cloud environment with access to a 2000+ qubit quantun annealing machine to test and run workloads for free, assuming the core algorithms used go into the open source pool. Apply to login at D-Wave's Leap In webpage.

Rigetti Computing's Quantum Cloud Service (QCS) offers a Quantum Machine Image, a virtualized programming and execution environment that is pre-configured with Forest 2.0, to access up to 16 qubits of a 128 qubit computer.

Stay tuned for information on Fujitsu's Digital Annealer, an architecture capable of performing computations some 10,000 times faster than a conventional computer. If they eventually provide a development environment that is cross compatible with true quantum computers these two paragraphs will remain in this answer, otherwise I will remove them.

While their silicon chip is not quantum in nature Fujitsu has partnered with 1Qbit to develop what is described as a "Quantum Inspired AI Cloud Service", whether their Digital Annealer quacks like a duck (anneals like a D-Wave, and uses compatible code) remains to be seen. Visit here to access the Fujitsu Digital Annealer Technical Service.

University of Pennsylvania's QWIRE (choir) is a quantum circuit language and formal verification tool, it has a GitHub webpage.

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

$\endgroup$
  • $\begingroup$ You can add recently released Google's Cirq to the list $\endgroup$ – artha Aug 5 '18 at 10:52
  • $\begingroup$ Thanks @artha, I'll add Cirq on my next edit. Info on the alpha release of Cirq: Google's AI Blog - Announcing Cirq: An Open Source Framework for NISQ Algorithms. $\endgroup$ – Rob Aug 5 '18 at 12:57
  • $\begingroup$ Which one would you suggest for someone starting with quantum computing (but already with knowledge of electronics and quantum phyisics)? Something powerful and with future. $\endgroup$ – skan Nov 18 '18 at 13:14
  • $\begingroup$ If your response is more up-to-date than the Wikipedia page, why not help edit the Wikipedia page to bring it up to date? $\endgroup$ – Luke Hutchison Apr 17 at 1:10
  • 1
    $\begingroup$ @LukeHutchison I do make edits on Wikipedia, the last was a few days ago, but not on that page. Here relevant questions pertain to Stack Exchange only. I'll be updating this answer shortly, I do it infrequently to avoid bumping the answer. --- You can edit all the pages there and suggest people look here for all their answers. $\endgroup$ – Rob Apr 17 at 1:59
26
$\begingroup$

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.

$\endgroup$
  • 3
    $\begingroup$ projectq.ch also deserves a mention. $\endgroup$ – James Wootton Mar 30 '18 at 10:06
  • 1
    $\begingroup$ I like this answer because it explains what languages can actually run against existing hardware. $\endgroup$ – DanielSank Apr 4 '18 at 14:13
5
$\begingroup$

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.

$\endgroup$
3
$\begingroup$

I would include IBM's Composer. It doesn't feel like programming because you don't get all the bugs and errors and funtionality, but it clearly converts your instructions on gates into QASM and runs it on a real IBM simulator, or a real IBM quantum computer (the choice is the user's).

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
  • 2
    $\begingroup$ This looks like a wonderful resource. Thank you! I wonder if there's another similar list of projects that aren't just open-source. $\endgroup$ – Pro Q Jul 23 '18 at 18:34
  • 1
    $\begingroup$ @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. $\endgroup$ – Mark Fingerhuth Jul 27 '18 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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