# Quantum Bayesian Networks

## January 6, 2017

### Pythonic Qubiter now has a quantum compiler. The Death Star doesn’t have one yet.

Filed under: Uncategorized — rrtucci @ 12:33 am

As I’ve mentioned many times before in this blog, Henning Dekant (in Toronto) and I (in Boston) founded about a year ago a quantum computer software company called Artiste-qb.net. Our two main products so far are the open source Python programs Quantum Fog and Qubiter. Both programs were originally written in C++, but now they have been rewritten in Python and improved in many ways. This blog post is to announce that the Pythonic version of Qubiter now has a quantum compiler. Hurray for the Rebel Alliance!

Quantum compilers have long been an interest of mine. As far as I know, I was the first one to use the term “quantum compiler” in a paper in the field of quantum computing. I did so in the following 1999 paper

https://arxiv.org/abs/quant-ph/9902062

By a quantum compiler I mean a software program that takes an ARBITRARY unitary matrix as input and decomposes it into a sequence of qubit rotations and CNOTs. In my opinion, quantum compilers that fit this description are useful, even necessary, if one wants to use quantum computers to do artificial intelligence. Because, whereas for most physics applications one can assume unitaries of the form $U = e^{-itH}$ where $H$, the Hamiltonian, has a very special structure, in AI, the unitaries can have an ARBITRARY structure (not known a priori) that doesn’t come from a Hamiltonian with an a priori known structure.

That 1999 paper was the first one to propose using the CS decomposition of Linear Algebra to do quantum compiling. The C++ program Qubiter, which was first released open source simultaneously with the 1999 paper, was the first computer program that used the CS decomposition to do quantum compiling.

Since that 1999 paper, many papers have been written using the same CS decomposition algorithm as my paper, but not citing my work, because, truth be told, dishonesty is rampant among academic researchers.

Other papers have copied the term “quantum compiling” to refer to a task that is related but much less general than what I call quantum compiling, namely, the task of decomposing a single qubit rotation into a sequence of operations from a finite set of gates. The latter task is necessary for fault tolerant quantum computing and was first tackled by Solovay and Kitaev, but they did not refer to it as “quantum compiling”. Nobody did prior to my 1999 paper.

This blog, which is now 8-9 years old, has featured several posts about quantum compilers. These are my favorites:

And now, the latest gossip about quantum compilers.

Up to now, Microsoft’s main and only quantum computer program was Liqui|>, a heavily patented, closed source computer program written in an unpopular language called F#. For many years now, the main writers of Liqui|>, Dave Wecker and Krysta Svore, have been promising to be THE FIRST to provide a quantum compiler, and of course, never mentioning my work. In some papers, KS uses the term quantum compiler to mean the same thing as me, in other papers she uses it to mean software that does the Solovay-Kitaev decomposition. But I can state unequivocally that Liqui|> has no CS decomposition quantum compiler at the present time. So Qubiter is way ahead of them there.

But the plot thickens. Matthias Troyer is a professor at ETH Zurich that works part time, for big bucks, for Microsoft. He has written papers about Liqui|> with Dave Wecker and Krysta Snore. Hence many people were extremely surprised that on Dec. 23, 2016, Matthias and two of his students at ETH Zurich, Minion A and Minion B, released a computer program called ProjectQ that duplicates most of what Liqui|> does and is therefore in direct competition with it. However, ProjectQ is open source, written in Python, and under the Apache License. The suspense is unbearable. Does this mean that Liqui|> will be laid to rest, R.I.P., meaning Dave Wecker’s and Krysta Svore’s work for the last 5 years will be completely ditched? Stay tuned. Microsoft will be holding QIP 2017 on Jan 14-20. That QIP is going to be Microsoft’s 1936 Nazi Olympics, where they intended to dazzle the world with their superiority in quantum computing. Maybe then we will find out, by watching carefully the placement of the people on the main dais during the weapons parade, who is up and who is down.

Henning and I welcome all open source code, even if it is in competition with Qubiter.

IMHO, Qubiter is currently much better than ProjectQ. For one thing, they claim they have a quantum compiler, but they don’t, at least not currently. Not in the sense that I defined it at the beginning of this post. What they do seem to have and call a quantum compiler are some subroutines that expand a single qubit gate with multiple controls attached into a sequence of single qubit rotations and CNOTs. But Qubiter has that already too. Look at its CktExpander.py file.