85
$\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$
4
  • $\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, 2018 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, 2018 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, 2018 at 17:39
  • 1
    $\begingroup$ There is also Yao (Extensible, Efficient Quantum Algorithm Design for Humans), written in Julia, github.com/QuantumBFS/Yao.jl. And here and here you'll find a comparison. $\endgroup$
    – skan
    Dec 10, 2018 at 1:39

6 Answers 6

55
$\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 quantum 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.

A review of: Cirq, Cliffords.jl, dimod, dwave-system, FermiLib, Forest (pyQuil & Grove), OpenFermion, ProjectQ, PyZX, QGL.jl, Qbsolv, Qiskit Terra and Aqua, Qiskit Tutorials, and Qiskit.js, Qrack, Quantum Fog, Quantum++, Qubiter, Quirk, reference-qvm, ScaffCC, Strawberry Fields, XACC, and finally XACC VQE is offered in the paper: "Open source software in quantum computing" (Dec 21 2018), by Mark Fingerhuth, Tomáš Babej, and Peter Wittek.

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

$\endgroup$
7
  • $\begingroup$ The QOSF has a list of open source quantum computing software. $\endgroup$
    – Rob
    Jul 7, 2019 at 18:03
  • $\begingroup$ Sort-of "programming" related news: IBM announces 53 Qubit computer available next month, for use by the public. $\endgroup$
    – Rob
    Sep 19, 2019 at 22:26
  • 1
    $\begingroup$ Amazon Web Services adds Amazon Braket. Using Python and the Amazon Braket SDK you can write hybrid code that runs on conventional CPUs and Quantum Computers (with a choice of Rigetti, IonQ or D-Wave, with more to come). Free Tier and more details at the AWS Braket site. --- Eventually this comment will be added to the answer along with additional information, this makes bumping this answer less frequent. $\endgroup$
    – Rob
    Dec 7, 2019 at 23:39
  • $\begingroup$ Q-CTRL offers open source Open Controls and announces free 30-day trial of Boulder Opal. Python based, it offers software integrations with Qiskit, pyquil, and CirQ, complements open-source packages like QuTiP. $\endgroup$
    – Rob
    Mar 1, 2020 at 21:10
  • 1
    $\begingroup$ It looks like Strangeworks may now also be a solution: stackoverflow.blog/2021/02/18/… $\endgroup$
    – Pro Q
    Feb 21, 2021 at 8:59
34
$\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$
2
  • 3
    $\begingroup$ projectq.ch also deserves a mention. $\endgroup$ Mar 30, 2018 at 10:06
  • 1
    $\begingroup$ I like this answer because it explains what languages can actually run against existing hardware. $\endgroup$
    – DanielSank
    Apr 4, 2018 at 14:13
6
$\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$

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
  • 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, 2018 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$ Jul 27, 2018 at 16:59
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$
3
$\begingroup$

Silq is new high level Quantum Computing language. As quoted on their site: "Silq is a new high-level programming language for quantum computing with a strong static type system, developed at ETH Zürich."

Silq

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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