Quantum Bayesian Networks

October 3, 2017

A Microsoft Quantum Computing language by any other name would smell as badly

Filed under: Uncategorized — rrtucci @ 3:31 am

On September 25-29, 2017, Microsoft held its IGNITE conference at Orlando, FL. Arstechnica reported about IGNITE here. They usually publish quantum computing articles that are more balanced and well informed than the average sci-tech popular journal. This time though, I think Arstechnica dropped the ball badly. This article sounds to me like a glorified infomercial for MS. However, I did learn a few curious facts from it.

The article reports that MS intends to release by the end of this year a “quantum programming language—as yet unnamed” for programming quantum computers. The language will be distributed with Visual Studio and available on Azure, the MS cloud service. Let me henceforth call it language Q?#. The article gives the following snapshot of a quantum teleportation circuit written in this marvelous new language. A Rube Goldberg machine language if I ever saw one. Also, sounds like this ugly baby is going to be CLOSED SOURCE, just like LiquiD. (Click image to enlarge)

Mysteriously, no mention is made of Liqui|>, MS’s previous “quantum programming language”. Since Q?# comes a short time after Liqui|> and Dave Wecker is the main author of both, it is safe to assume that Q?# is just a new wrapper with Liqui|> under the hood. (Some have gone so far as to suggest that the new language should be called LiquidShit#).

But friends, Romans, countrymen, lend me your ears. I have come here to bury Q?#, not to praise it. Next, I will show the code for the same quantum Teleportation 3 qubit circuit, but written instead in IBM’s qasm language and in Qubiter’s language.

IBM’s github repository called qiskit-tutorial has a Jupyter notebook for this same teleportation circuit. Here is a snapshot taken from the notebook showing IBM qasm for the teleportation circuit.

The Qubiter repo at github also has a Jupyter notebook for the same teleportation circuit. Here is a snapshot taken from the notebook showing Qubiter’s English and Picture files for the teleportation circuit.

And now, let me indicate a few reasons why I think Qubiter (which I wrote) is nicer than the other two.

  • Qubiter allows one to write controlled gates with any number of controls, and the controls can be of two types T or F. (T controls are usually represented in latex pictures of quantum circuits by a solid dot, F controls by a hollow dot). Qubiter also has subroutines that allow one to expand each gate with multiple controls into a sequence of gates with only one or zero controls, because those simpler gates are the only type of gates that most hardware devices can perform physically. IBM’s qasm so far only allows one or two controls of type T only. They have CNOT and CCNOT and that’s it.
  • Qubiter automatically generates an ASCII picture of the circuit at the same time that it generates its English qasm-like file. IBM’s q-software and LiquiD do not write a picture of the circuit automatically. If they draw a circuit, it requires a separate run to generate it and the picture is in Latex. Also, their circuit pictures have time running from left to right instead of downwards. Qubiter’s English and Picture files, on the other hand, have the highly desirable properties–especially desirable for long circuits–that (1) time runs downward in both English and Picture files, and (2) line number n in the English file corresponds to line number n in the Picture file.
  • IBM qasm and LiquiD distinguish between quantum and classical registers. Qubiter only has quantum registers. Classical registers are an unnecessary, ugly complication because the information stored in them can be stored in the memory of your pc.

Two other languages, Rigetti’s PyQuil and ProjectQ, are similar to IBM qasm and suffer from some of the same architectural design flaws mentioned above.

UPDATE: Microsoft released their Rube Goldberg “quantum language” with much fanfare on Dec. 11, 2017. They called it, after so much suspense, simply Q#. MS is not known for their creativity in naming things.



  1. The motivation for classical registers in PyQuil, according to Rigetti’s Will Zeng, is because they want to bring those as close as possible to the quantum chip, i.e. you’d essentially program a hybrid quantum/classical “chip”.

    Comment by Quax — October 3, 2017 @ 4:55 am

  2. If you think about it, Will Zeng’s explanation makes no sense whatsoever. It’s as nonsensically as saying that Trump’s tax plan will not benefit the rich.

    The real reason why Will distinguishes between quantum and classical registers is that he was copying what other people have done before, pure and simple. He was copying IBM qasm, which was copying ProjectQ, which was copying probably Omer’s QCL or whatever.

    Comment by rrtucci — October 3, 2017 @ 5:18 am

  3. Hello.
    As of yet, what’s the most advanced or complete quantum programming framework or simulation tool?

    Microsoft Quantum Development Kit, Microsoft LIQUi>, IBM Quantum Experience, Qiskit, Quantum Computing Playground (Google), other open project?
    How do they compare?
    Does anyone have any experience with them? I would like to practice with one of them to implement algorithms and simulate things. I have already studied quantum mechanics and other related subjects at the university but I have almost no idea about Quantum computing.

    Comment by juan — March 5, 2018 @ 8:47 pm

  4. Juanito, the above blog post, even though it is 5 months old, is still true today and does not need updating. For the reasons given there, I believe Qubiter is still much better than the 3 most popular languages, IBM qasm, ProjectQ, and Rigetti PyQuil. Try all 4 yourself and make up your own mind

    Comment by rrtucci — March 5, 2018 @ 9:29 pm

  5. Hello.
    What about Cirq and Yao.jl?

    Comment by juanito — November 18, 2018 @ 5:11 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: