Quantum Bayesian Networks

May 28, 2016

Don’t tell Microsoft. Qubiter, an open source platform, can now do quantum chemistry too

Filed under: Uncategorized — rrtucci @ 8:10 pm

I’ve uploaded to


a small collection of classes called `my-chemistry’ that allow one to construct a gate model quantum circuit for calculating the ground state of molecules using Kitaev’s Phase Estimation Algorithm.

Notice that I am releasing the first version of my-chemistry under my name only. Although this is an add-on to the artiste-qb.net Qubiter project, the Artiste company is free of any legal liability, as I have not merged it with the main code branch, and the company is not deriving any use of it at this time.

The docstrings of each class describe in detail how they work. All my classes have a main method at the end with examples and tests of the class. In addition, I have written a pdf document describing the more technical details of the quantum circuit involved. The pdf document is part of the my-chemistry distribution.

Here is an excerpt from the Introduction section of that pdf document:

This paper describes the particular circuit used by a Python software package called “my-chemistry”, written by R.R.Tucci, and available at GitHub, Ref.[1]. The software can be used in conjunction with “Qubiter”, another Python software package available at GitHub, Ref.[2].

A quantum circuit that is very similar to the one presented in this paper has previously been implemented FIRST in Ref.[4] and more recently and exhaustively in the closed source software package called Liqui|\rangle produced by Microsoft, with Dave Wecker as main author.

Here is a super brief, by no means exhaustive review of some of the highlights in the history of this quantum computing approach to chemistry.

The person deserving the lion share of the credit for this method is A. Kitaev, who in 1995, Ref.[3], was the first to propose the PEA. Also very deserving are Trotter for his expansion, and Jordan/Wigner for their transformation.

The first paper to present an actual computer program for calculating the ground state energy of an $H_2$ molecule using PEA appears to be Ref.[4], by Whitfield, Biamonte and Aspuru-Guzik.

Researcher working for Microsoft applied the method to more complicated molecules and found some very clever optimization methods, such as using the identity (CNOT)^2 = 1. Here is their epiphany paper Ref.[5], and here is their most recent paper Ref.[6]. The latter is recommended for what appears to be a very fair and exhaustive list of references of this approach.

Finally, one should mention that Microsoft has several patents on this method, so it is possible that Microsoft will claim in the future that the software described in this paper infringes on one of their patents. Going to the USPTO website and using the query IN/wecker AND AN/Microsoft, I located 4 patents Refs.[7][8][9][10] on Liqui|\rangle. There might be more pending.

Patents alluded to

Quantum gate optimizations

Optimizing quantum simulations by intelligent permutation

Language integration via function redirection

Quantum annealing simulator

April 8, 2016

Moral Corruption of Krysta Svore and Her Accomplices

Filed under: Uncategorized — rrtucci @ 3:09 am

Check out the following paper by Krysta Svore from Microsoft and her accomplices:

A Software Methodology for Compiling Quantum Programs, by Thomas Häner(1), Damian S. Steiger(1), Krysta Svore(2), Matthias Troyer(1,2,3)

  1. Theoretische Physik, ETH Zurich, 8093 Zurich, Switzerland
  2. Quantum Architectures and Computation Group, Microsoft Research, Redmond, WA (USA)
  3. Microsoft Research Station Q, Santa Barbara, CA (USA)

excerpt from paper:

Related Work.
One of the earliest proposals for a scalable software methodology for quantum compiling dates back a decade [12] and presents significant steps of any quantum computing design flow. Our work expands upon this work, extending the stack elements by showing how to integrate, e.g., tuned quantum libraries of arithmetic, subroutines, and quantum gates, and providing concrete details of the compilers and optimizers in the stack

[12] Krysta M Svore, Alfred V Aho, Andrew W Cross, Isaac Chuang, and Igor L Markov, “A layered software architecture for quantum computing design tools,” Computer, 74-83 (2006).

Now look at this

Krysta is such an unethical, despicable liar, she should be running for president of the United States or president of FIFA. Her new paper has 33 references but she doesn’t mention my quantum compiler papers and Qubiter software, even though they have the words Quantum Compiler explicitly in the title and they started in 1999, seven years before her clumsy, copy-cat efforts. (Note that her 2006 paper doesn’t mention my 1999 paper and software either. She has been lying for 10 years.)

Don’t trust anything Krysta SNORE tells you. Some call her Quantum Carly Fiorina, some compare her to a female praying mantis or a snake. Microsoft’s quantum software is closed source which is anti-thetical to academic work. Join quantum open source today.


March 31, 2016

MIT Stunned by Scalable Quantum Computer

Filed under: Uncategorized — rrtucci @ 11:16 pm

Okay, I don’t expect any of my readers to believe me, but I have a Martian WiFi wormhole connection which allows me to access the Internet in the future. Today, I came upon this article that will be published exactly 15 years in the future.


MIT Stunned by Scalable Quantum Computer
April 1, 2031. MIT Tech Review

A team of scientists from MIT led by Prof. (also Dean of MIT Physics Dept., and chief editor of Physical Review) Isaac Chuang has just published a paper in Physical Review that describes how they used a 5 qubit quantum computer built of superconductive Niobium rings called SQUIDs to show that 15 =3×5.

Those of us who are old enough to remember may recall that MIT was the first to show in 2001 that 15=3×5 with an NMR quantum computer.

Then, MIT scientists stunned themselves with their brilliance once again when 15 years later, in 2016, they were the first to show 15=3×5 with an ion trap quantum computer.

And now, 15 years later, in 2031, MIT scientists were stunned once again, as if by a lightning out of the blue, when they managed against all odds to show that 15=3×5 with a superconductive quantum computer.

All 3 times that MIT has shown that 15=3×5, they have claimed that their device is scalable. We are beginning to believe them, but then again, on 2031, we are now so old that some days we can’t readily recall the current US president’s name.

Back in 2016, when Prof. Chuang was asked why he wasn’t comparing his ion-trap device to those of David Wineland’s team (at NIST, Colorado), and Chris Monroe’s team (at U. Of Maryland), Prof. Chuang pointed out that those people’s devices were so different to his that he was totally unaware of their existence. According to Prof. Chuang, his device was placed in a lab-room with green colored walls, whereas Wineland and Monroe had used beige colored walls. According to a powerful theorem by Prof. John Preskill of Caltech, the boundary conditions (in this case the color of the lab-room walls) affects so much the evolution of the bulk (in this case the device), that quantum devices placed in lab-rooms with green and beige colored walls behave so differently that they are incomparable. Or so Chuang claims.

Today, April 1, 2031, Prof. Chuang was asked why he isn’t comparing his 5 qubit superconductive device to the 100 qubit superconductive devices built by Google and IBM last year. Once again, Prof. Chuang defers to Preskill’s Theorem which proves those devices are incomparable to his.

Prof. Chuang delivers Commencement speech at MIT

Prof. Chuang delivers Commencement speech at MIT

Coed hen at MIT 2031 graduation ceremonies very impressed by Prof. Chuang's piercing pronouncments

Coed hen at MIT 2031 graduation ceremonies very impressed by Prof. Chuang’s pronouncements

March 29, 2016

Qubiter on the brink of doing Quantum Chemistry

Filed under: Uncategorized — rrtucci @ 6:35 pm

On behalf of the artiste-qb.net company, I am pleased to announce that Qubiter now has a new class called PhaseEstSEO_writer.py that endows it with the superpower of being able to generate and simulate quantum circuits for quantum phase estimation.

The quantum Phase Estimation circuit (PEC) was invented in 1995 by Kitaev. Since then, it has found many applications in quantum computing. Microsoft Liqui|>, the main competitor of Qubiter, uses PEC to find the ground state of molecules.

In fact, Liqui|> can generate many other circuits besides PEC, but most of them are not very commercially viable. For example, Liqui|> can generate quantum error correction circuits, but error correction will most likely be done by the hardware manufacturers, so QC programmers won’t need to implement it via Liqui|> in their circuits. Liqui|> also does Shor’s algo, but I don’t think Shor’s algo will be a big money maker, because it requires thousands of qubits, so it will be one of the last applications to be implemented on a QC. By the time it is implemented, post quantum crypto, which is impervious to it, will have been in general use for many years.

So most of the circuits that Liqui|> can generate & simulate will never be commercially viable, but those for doing quantum chemistry probably will be.

The Liqui|> team claims to have used experimentation with Liqui|> to reduce by a factor of a thousand the size of their QC circuit for finding the ground state of molecules with PEC. They claim that their new, optimized circuit will give an answer in an hour of running on a gate model QC, once those beasts arrive. Such calculations would take billions of years for a classical computer to perform, they claim.

The Liqui|> authors like Krysta Svore seem well aware that Quantum Chemistry is one of the most commercially viable and potentially lucrative applications of Liqui|>. You can almost see the dollar signs in their beady eyes when they speak about quantum chemistry.

But Qubiter is throwing a spanner into their nefarious plans.

Microsoft Liqui|> is closed source and heavily patented. Also, it is written in a very unpopular language F#. Qubiter, on the other hand, is open source and written in the super popular language Python.

And now Qubiter allows everyone, not just Microsoft egg heads, to do QC quantum chemistry too.

March 22, 2016

First version of Qubiter (a quantum computer simulator) is out. It says: “Welcome, my navigator. Where do you want me to take you next?”

Filed under: Uncategorized — rrtucci @ 4:44 pm

artiste-qb.net has just uploaded at GitHub its first version of Qubiter, a quantum computer simulator, under the BSD license and written in Python.

It’s saying to you: “Welcome, Navigator. Where do you want me to take you next?”



Over the last 20 years, dozens of quantum computer simulators (for gate model, aka quantum circuit QC) have been released. Here is a partial list. So what makes this one special?

Let me compare Qubiter with Microsoft’s very famous quantum simulator called Liqui|>.

  • Liqui|> is closed source (and heavily patented), Qubiter is open source under BSD license
  • Liqui|> is written in F#, Qubiter is written in Python. User base of Python is ~ 100 times bigger than that of F#. And believe me, programmers are very savvy consumers of programming languages.
  • Dave Wecker (rhymes with wrecker), chief architect of Liqui|> , has been quoted as saying that he estimates Liqui|> has about 30,000 lines of code. Qubiter currently has less than a 1000, and does all the basics and much more. So tell me, what would you prefer to have to grok, 30,000 or 1,000 lines of code?

I hope you enjoy it. Or as my grandma used to say,

Stai zitto e mangia!!

February 26, 2016

Quantum Fog gets Prefab Nodes (prefab but of high quality, I assure you)

Filed under: Uncategorized — rrtucci @ 7:02 am

Prefabricated or modular homes have a long history in the US and Europe. In the case of Quantum Fog, prefabricated Nodes also have a history. They were available in the Legacy QFog, and now, through the miracle of hard work, are available in the Pythonic QFog as well. I rewrote/translated the old C++ code responsible for the prefab nodes into Python.

So if you look at https://github.com/artiste-qb-net/quantum-fog, you will find a recently added folder entitled “prefabicated_nodes”. Inside that folder, you will find 7 new files, each containing a single class. The files are

  1. BeamSplitter.py
  2. CNot.py
  3. Marginalizer.py
  4. PhaseShifter.py
  5. PolarizationRot.py
  6. Polarizer.py
  7. QubitRot.py

Each of the above files has a long docstring describing its class. In my usual fashion, I also provided a “main” method at the end of the class with examples of how to use the methods of the class.

The motivation behind prefab nodes is simple to explain. A Bayesian Network, whether classical or quantum, assigns a transition matrix to each node. You can enter the components of that transition matrix by hand, but that gets tedious very quickly. In many cases, the matrix is a function of certain parameter and one wants to be able to enter those parameters and have the matrix generated automatically. For instance, for a qubit rotation, the matrix is a 2 by 2 unitary matrix determined by 4 real angles. One wants to be able to enter those 4 angles and have the matrix generated automatically. Similarly, for a CNot, the matrix is a 4 by 4 matrix with 4 entries equal to 1 and all others equal to 0. One wants to be able to enter the value of 2 boolean parameters and have the matrix generated automatically.

I think Donald Trump is a punishment meted out to us by God for the sins of Academics and other greedy, dishonest people. I’m mulling over this theory and may write a novel about it, or at least a comic book. That is, if we are all still alive a year from now.

February 17, 2016

Our baby (Quantum Fog) can now read, write and draw

Filed under: Uncategorized — rrtucci @ 12:06 am

In a special Feb. 2 , 2016, ground hog day blog post, I announced the first large release by our company, artiste-logoartiste-qb.net, of Pythonic open-source Quantum Fog. As you may or may not know, Quantum Fog was originally (almost 20 years ago) a Mac-only application written in C++. The GitHub page for Quantum Fog contains the legacy C++ code of yee ole Quantum Fog, plus the shining new Python code which will attempt to reproduce all the functionality of the old application plus much more. So are we there yet, you ask. Not quite, but making steady progress.

These are some of the things the new QFog can do so far:

  • It can do inference with evidence using 3 methods: Join Tree, MCMC (Monte Carlo) and brute force (enumeration of all Feynman paths).
  • It can do inference by those 3 methods for BOTH, quantum Bayesian networks (QBnets) and classical Bayesian networks (CBnets).
  • It can read and write CBnets and QBnets in two formats .dot and .bif (bif stands for Bayesian Interchange Format).
  • It can draw the CBnet and QBnet graphs using only matplotlib and networkx, included in the usual Python installation. This is fine for most purposes, but if you want a super high quality plot of your graph, you should use the .dot file that Quantum Fog generates and fine-tune that with GraphViz.

QFog integrates CBnets and QBnets seamlessly. You can use all subroutines for either classical or quantum analysis simply by changing a Boolean input parameter called is_quantum


  • .dot and .bif files are both just .txt files. The .dot format is used by a really wonderful, free software called GraphViz. There are several very helpful Bayesian network repositories that store Bnets in the .bif format. The .dot and .bif formats are complementary. The .dot format is good for storing visual layout info, not good for storing the numerical tables associated with each node. The .bif format is good in the opposite way.

  • The “join tree” (or junction tree, or clique tree or belief) propagation method is an exact method (Other methods, like MCMC, are approximate). The Join Tree method caused a mini revolution in the Bayesian networks field starting from 1990 or so. Before then, people had been discouraged by a proof that calculating probabilities from a Bnet by brute force is NP hard. But the Join Tree method takes advantage of the graph structure. If I understand it correctly, its complexity is exp(k) whereas brute force is exp(n), where n is the total number of nodes and k is the number of nodes in the fattest clique (k is called the width of the join tree). The Join Tree algorithm still has exponential complexity, but is much better than the brute force algo. The join tree algo used by the new Qfog is the one described in the following very detailed and clear, cookbook paper:

    Inference in Belief Networks, A Procedural Guide, by C. Huang and A. Darwiche (1996)

I end by waxing poetic in a nerdy way. Here are 3 things that remind me of quantum fog:

Fog Machines, very cool. An essential prop in the shooting of moody films, in rock concerts, in serious Halloween home decorations and in nerd experiments. They work by either (1) pushing a mixture of water and (glycol or glycerin or mineral oil) over a heated surface, or (2) dropping dry ice, i.e., solid CO2, into water heated near boiling point. Some use solid N2 or O2 instead to get a different kind of fog.

Aerogels, very cool too.

They are very good thermal insulators. You can put your hand on one side and a Bunsen Burner flame on the other side of a ½ inch thick layer of aerogel and not feel the heat.

The ones that are almost transparent and ethereal looking are the silica aerogels. They are kind of expensive though, like $50 for a 1 x 1 x 0.5 in. specimen.

Wikipedia quotes:
“Aerogel was first created by Samuel Stephens Kistler in 1931, as a result of a bet with Charles Learned over who could replace the liquid in “jellies” with gas without causing shrinkage.”

“The first aerogels were produced from silica gels. Kistler’s later work involved aerogels based on alumina, chromia and tin dioxide. Carbon aerogels were first developed in the late 1980s.”

And of course, the Golden Gate Bridge shrouded in fog.

February 6, 2016

Quantum Open Source 2016

Filed under: Uncategorized — rrtucci @ 7:31 am


Big Brother is saying: Microsoft’s “Liqui|> is closed source for your own good. Quantum open source is EVIL. Using it will harm you!”

Quantum Carly Fiorina

Quantum Carly Fiorina

Big Brother is saying: Vote for Quantum Carly Fiorina, my handpicked leader

Big Brother is saying: Vote for Quantum Carly Fiorina, my handpicked leader



On 2016, the quantum open source community will finally prevail, and you will see why future quantum computer software won’t be like “1984”

February 2, 2016

First Major Commit to Quantum Fog in Python

Filed under: Uncategorized — rrtucci @ 4:56 pm

Today is Groundhog day, Feb. 2, 2016. This holiday holds special significance in Quantum Computing History. Indeed, on another Groundhog day in the distant past, in the year 2015, a watershed historic quantum event occurred, namely Jimmy the Groundhog bit Seth Lloyd’s ear.

Other quantum watershed events have occurred since them, like, for example, Caltech held its “One Entangled Evening” and Alex Winter screened his NSF funded 10 minute mini-movie “Anyone can Quantum”. But those events are California/Hollywood glitzy, whereas groundhog day is a more folksy affair (old white men with funny top hats bugging a chubby rodent who just wants to go back to sleep).

artiste-logo Since we here at artiste-qb.net are more folksy than glitzy, we decided to celebrate this holiday by releasing today our first version of Quantum Fog in Python (QFog is open sourced under the BSD license, and it is available at GitHub)

Basically, what I did was to refurbish an old open-source program called PBNT by Elliot Cohen. PBNT does classical Bayesian Networks using 3 inference algorithms: Enumeration (brute force), MCMC and Join Tree (aka Junction Tree). Our new QFog release does BOTH, classical and quantum Bnets using the same 3 algos. One of our eventual goals is to write a quantum computer programming language based on quantum Bnets.

January 1, 2016

Happy New Year 2016

Filed under: Uncategorized — rrtucci @ 3:16 am

A new quantum computing star is born a few minutes shy of 2016.


(Image comes from Google search page for New Year’s eve 2016, from frame 203 of animated gif with 272 frames. What Google’s punchline is going to be tomorrow, I do not know, but I beat them to the punch by 2 hours in east coast time) Happy quantum computing New Year 2016!

December 22, 2015

The Battle of the Century For Quantum Supremacy: Alibaba Versus Google

Filed under: Uncategorized — rrtucci @ 6:33 pm

Have you read some of the recent quantum computing headlines in the Chinese news media? No…, well it so happens that I am a fluent Mandarin Chinese speaker* , so let me translate a few of those headlines for you.(* with the help of Google translator)

  • China Planning to Unveil Soon Their Own Quantum Computer. Pundits Expect It To Be Much More Popular Than Google’s.
    chinese-dwaver (click to expand)

  • The Computer Fight of the Century: Alibaba versus Google
  • Alibaba Says: “Damn You Google. We Will Beat You At Quantum Computing”

Keep in mind that China is about to finalize its next 5 year plan at the end of March 2016, and that it might choose in that plan either a $10B, 100 TeV particle accelerator, OR 50 quantum computers (at $200M apiece) , BUT NOT BOTH

Previous blog posts of mine about this topic:

December 15, 2015

Artiste-qb.net Makes Dec 8 watershed Quantum Computing announcement on Dec 15

Filed under: Uncategorized — rrtucci @ 10:11 pm

There is no denying. Google and NASA are publicity geniuses. Geniuses I tell you!

On Nov 20, Google and NASA announced in dramatic and coy Apple fashion, that they would hold a press conference on Dec. 8 to announce a major QC breakthrough. At the Dec 8 conference and subsequent blog post and arXiv paper, Hartmut Neven announced that Google is now “faster than the universe” (Steve Jurvetson expression), having achieved a 10^8 speedup compared to classical computers. According to TMZ, Hartmut Neven was wearing a black turtle neck and jeans to the event(citation needed).

Quite predictably, on Dec 9, just one day later, Scott Aaronson posted in his blog a voluminous refutation of Google’s claims, but most of the general public showed itself quite disinterested in his opinion on the matter. If only his blog were more succinct. Someone who wishes to remain anonymous once tweeted: “Thank God Scott Aaronson is too wordy for Twitter”.

Since Dec.8, our company artiste-qb.net’s publicity department, 50 persons strong, has been struggling to come up with our own “watershed announcement” to match Google’s. We decided to send Mark Zuckerberg a book for his baby girl and Jack Ma a baseball cap. We also sent a TMZ spy to capture in a photo the precise moment when Mark and Jack were trying these items on for fit, just before they decided to discard them. Here is what we came up with.



December 6, 2015

The Canadian Starship and the Dutch Campervan

Filed under: Uncategorized — rrtucci @ 9:19 pm

On Dec. 3, 2015, three mayor Dutch universities opened a new institute called QuSoft that, according to the press release, will be dedicated exclusively to writing quantum computing software. QuSoft is being billed as the first academic institute to be dedicated in that manner, and I tend to agree. As far as I know, no other nation has a similar institute.

It seems clear that QuSoft and its partner Dutch institute, QuTech, which does hardware instead of software, have intentions of eventually converting into private corporations after government funding has made them profitable. I reported earlier on QuTech in my previous blog post entitled “The Dutch Stallion and the Canadian Donkey”. Thus, it appears that the QuSoft-QuTech-Intel-Microsoft juggernaut will become more industrial and less academic as time goes on.

Meanwhile, IQC of the Univ. of Waterloo, Canada, founded 13 years ago (2002), has spent more than $150M to become the world’s leading powerhouse in NMR quantum computing and quantum cryptography, both known to be dead end streets since day one. They have also produced a computer game called QuantumCats, a knockoff of Angry Birds. Playing QuantumCats for 100 hours teaches less quantum mechanics than reading Wikipedia articles about QM for 15 minutes. Also, a Canadian Univ. (Dalhousie) used American defense funding (from IARPA) to write a QC programming environment called Quipper. The only problem is that Quipper is written in Haskell, a programming language so cryptic that almost nobody uses it in industry.

But despair not, Justin Bieber compatriots. I live in the US, but the company that I work for, artiste-qb.net, is incorporated in Canada. Oh Canada, we salute thee!

small-dragonflyartiste-qb.net is a software company led by scientist programmers with close ties to industry, not by academics that program in Haskell. Our “Quantum Fog on GitHub” project is open-source under the BSD license and coded in Python. We also have 12 QC software patents (6 granted and 6 pending). QuSoft starts off with zero patents.

Time will tell, but right now, QuSoft is looking pretty frumpy compared to my company. QuSoft reminds me of a Dutch campervan, of the type that plagues French, German and Spanish camping sites every summer. If you are not familiar with this natural phenomenon, comparable to a Monarch butterfly migration, here is a description from the National Geographic (sort of). On the other hand, artiste-qb.net reminds me of a starship, an analogy which I made before in my previous blog post entitled: “Houston, Tranquility Base here, the Dragonfly has landed”. artiste-qb.net will reach for the stars, and QuSoft will reach for the cows.

The TonkePR4, deluxe Dutch campervan. Now all my Dutch readers will want to own one.

The TonkePR4, deluxe Dutch campervan. Now all my Dutch readers will want to own one.

Houston, Tranquility Base here, the Dragonfly has landed. (image based on NASA photo from here)

Houston, Tranquility Base here, the Dragonfly has landed.
(image based on NASA photo from here)

November 30, 2015

Quantum Fog Comes Out of the Closet

Filed under: Uncategorized — rrtucci @ 4:06 am

Quantum Fog, my old Mac application for doing calculations with quantum Bayesian networks, is now open-source (it’s finally out of the closet). Check it out at GitHub.

Quantum Fog was originally written in C++, but we plan to rewrite most of it in Python

By the way, I highly recommend the GitHub website if you need to collaborate with a group of people on the writing of a computer app or a website or an arXiv paper, or many other possibilities. I use GitHub in conjunction with a Windows app called TortoiseGit, which I also love and highly recommend.

November 16, 2015

I just want to MOOC them All

Filed under: Uncategorized — rrtucci @ 2:50 am

mooc-them-all ( I conceived this poster in response to a friendly argument with CapitalistImperialistPig (that’s his nom de plume). You are a better pig than I am Gunga Din)

Next Page »

The Rubric Theme. Create a free website or blog at WordPress.com.


Get every new post delivered to your Inbox.

Join 1,180 other followers

%d bloggers like this: