Quantum Bayesian Networks

June 30, 2019

A Cool, Highly Effective Combination: parametric quantum circuit + Jupyter notebook with widgets + Qubiter

Filed under: Uncategorized — rrtucci @ 3:08 am

Check out my new Jupyter notebook for Qubiter.

https://nbviewer.jupyter.org/github/artiste-qb-net/qubiter/blob/master/qubiter/jupyter_notebooks/widget_adjustable_parametric_circuit.ipynb

Here is a jpeg of the widgets that this notebook presents to the user.

gui-qubiter-sim

Suppose that you are interested in printing out the state vector of a quantum circuit at various times (points) in its evolution, as well as at the end of the circuit. Qubiter can do that.

Furthermore, suppose that the circuit is a parametric one, and you want to vary its parameters using sliders on a gui (graphical user interface). Qubiter can do that too, via a jupyter notebook with widgets. This notebook is one such notebook.

A jupyter notebook with widgets gives you the best of both worlds, the gui world and the notebooks world.

Gui’s excel at reducing the possibility of user errors, increasing the ease of use for the user, and reducing the amount of understanding of the code that is demanded from the user in order for him or her to use the code correctly.

Notebooks excel at providing a robust, flexible, ready made, familiar method of documenting and saving your work for multiple use cases. They are also great for explaining your work to others with great detail and precision.

June 29, 2019

Xanadu AI, Canadian Quantum Computing Ponzi scheme, gets an extra CAN$32 Million

Filed under: Uncategorized — rrtucci @ 12:38 pm

In a previous blog post, I commented about Xanadu AI:

Xanadu.ai, a quantum computing Theranos, will never make a profit

The latest news about the Xanadu Ponzi scheme is that they just got an extra CAN$32 Million (This raises their total funding so far to CAN$41M, according to TechCruch). This company has practically zero chance of succeeding. Their quantum computing technology, using squeezed light, is **far inferior** to the ones (ion trap, squids, optical, anyons, quantum dots) being pursued by a crowded field of well funded startups (Rigetti, IonQ, PsiQ, and many others) and giant monopolies (IBM, Google, Microsoft, Intel, Alibaba, Huawei, …).

The latest 32 million was reported in the Globe and Mail:

Toronto startup Xanadu raises $32-million to help build ‘world’s most powerful computer’

Excerpts in boldface:

But Xanadu needs to take “three giant steps,” before it can fully commercialize its technology, said Massachusetts Institute of Technology mechanical engineering and physics professor Seth Lloyd, a leading expert in quantum computing who advises the startup:

“They need to improve the squeezing by a significant amount and show they can get many pulses of this squeezed light into their device, and then control these pulses … [then] show you can actually do something that’s useful to people with the device. Given what they’re trying to do, they’re on schedule. Any one of those things could fail, which is the nature of science and life and being a startup.”

Only that, just a cake walk away. Right on schedule?? Squeezed light was invented by H. P. Yuen in 1976, 43 years ago. Brilliant experimentalists like Bernard Yurke and Jeffrey Kimble soon hit a brick wall in the amount of possible squeezing attainable. I hardly think that the CEO of Xanadu, Elizabeth Holmes or whatever his name is, can improve much on what they did. Nowadays, squeezing is used mainly by the LIGO people. I believe it might reduce their noise by a factor of 10 or so, but is that enough for Xanadu’s speculative analog quantum computer to perform calculations better than a cell phone? Highly doubtful.

The only thing that is on schedule here is Seth Lloyd’s Ponzi scheme.

Xanadu is looking to generate revenue in the short term with proof-of-concept projects for a few customers including Bank of Montreal, and by offering cloud-based software that customers can use to test out not only its quantum technology, but that of its competitors. Lawrence Wan, chief architect and head of enterprise platforms with BMO, said Xanadu’s approach “looks to be more commercially viable and scalable” than others.

Obvious BS. Why would the competitors with qc machines allow Xanadu to poach their clients? Besides, Xanadu’s underperforming or nonexistent squeezed light “quantum computer” is very different from a gate model machine so Xanadu is not especially qualified to advise others about gate model machines. Dozens of companies are already offering qc consulting services. Consulting won’t generate enough near-term revenue for Xanadu in the next 5-10 years of toy qc machines to cover the cost of the very expensive hardware R&D effort that they are “promising” to undertake.

Let’s face it, the real revenue maker for Xanadu is their Ponzi scheme.

June 27, 2019

Comments on quant-ph arXiv:1906.10726, “Quantum Causal Models”, by Jonathan Barrett, Robin Lorenz, Ognyan Oreshkov

Filed under: Uncategorized — rrtucci @ 6:59 am

The paper

“Quantum Causal Models”, by Jonathan Barrett, Robin Lorenz, Ognyan Oreshkov, https://arxiv.org/abs/1906.10726

was published by BLO tonight. This is my initial response to it.

It’s been just a few hours since BLO published this paper in arxiv, so I haven’t had a chance to read it in its entirety, yet. I have never communicated with BLO, so this is the first time the authors will hear about my response to it. However, much of the material covered in the BLO paper is familiar territory to me, having worked on QB Nets (Quantum Bayesian Networks) since my first paper on them in 1995

Excellent job! And it mentions my work. Thank you!

Here is how BLO explain the relevance of my work to theirs:


Many works are explicitly concerned with causal structure, but not to the end of a quantum generalization of causal models. These include, for example, Refs. [19, 22, 45, 64–69], and are not discussed here any further. Early work by Tucci [6, 7] aims at a quantum generalization of classical Bayesian (rather than causal) networks, obtained by associating probability amplitudes with nodes. More closely related to our work is that of Leifer and Poulin [9], which presents (amongst other things) an approach to quantum Bayesian networks, wherein a quantum state is associated with a DAG, and must satisfy independence relationships formalised by the quantum mutual information, given by the structure of the DAG. The results of Ref. [9] have at various times been used in our proofs. Leifer and Spekkens [11] adapt the ideas of Ref. [9] to quantum causal models, using a particular definition of a quantum conditional state. Our approach differs from that of Ref. [11] in taking influence in unitary transformations as defining of causal relations, in its use of the process operator formalism, and in the fact that we don’t use quantum conditional states.

Under Refs. 6, 7 they list

[6] R. R. Tucci, “Quantum bayesian nets,” International Journal of Modern Physics B 9 no. 03, (1995) 295–337.
[7] R. R. Tucci, “Factorization of quantum density matrices according to bayesian and markov networks,” arXiv:quant-ph/0701201.

I do disagree with their characterization of my work. My early work Ref.6 in 1995 was on QB nets for pure states, but then I published Ref.7 in 2007 which explains how QB nets can also be used to describe density matrices that are not pure states. In 2012, I published the following introductory review and reprise of the use of QB nets to describe general density matrices

“An Introduction to Quantum Bayesian Networks for Mixed States”, by Robert R. Tucci, https://arxiv.org/abs/1204.1550

I contend that what the BLO paper proposes is **exactly** QB nets for density matrices. They just call them by a different name. A rose by any other name would smell as sweet.

I have also published in this blog the following article describing the connection of QB Nets to “Tensor Networks”. This is an obvious connection that a lot of people have asked me about, and which is not addressed anywhere in the BLO paper. (I searched the BLO paper in vain for the phrase “tensor network”).

Tensor Networks versus Quantum Bayesian Networks: And the winner is…

As an aside, I think that BLO’s Ref.9 by Leifer and Poulin is patently incorrect because it is based on a new definition of conditional density matrices which imposes major constraints on standard Quantum Mechanics. So, if the work of Leifer and Poulin applies to the real world at all, it does so only within the context of a severely maimed Quantum Mechanics.

QB nets, which are exactly what BLO call “Quantum Causal Models”, do not assume any axioms beyond those of standard Quantum Mechanics. QB nets are simply a graphical way of displaying (any, all) quantum density matrices, the same way that classical Bayesian networks are simply a graphical way of displaying (any, all) joint probability distributions. In the same way that classical Bayesian networks arise from the chain rule for joint probability distributions, QB nets arise from a chain rule for quantum **probability amplitudes**. That is the gist of Ref.7, cited by the BLO paper.

I would also like to point out that the BLO paper does not mention that I too have addressed Judea Pearl’s d-separation and do-calculus as it pertains to the quantum realm. In the 2013 paper:

“An Information Theoretic Measure of Judea Pearl’s Identifiability and Causal Influence”, by Robert R. Tucci, https://arxiv.org/abs/1307.5837

I address the do-calculus for **classical** Bayesian networks, but I do so in terms of entropy. I explicitly mention in the introduction to that paper, that I intentionally use only entropy concepts to define things, with the intention that these concepts be generalized to Quantum Mechanics, using the simple rule of replacing H(P) by S(\rho) (i.e., by replacing entropies of classical probability distributions by entropies of quantum density matrices). This “minimal substitution” was invented by Cerf and Adami, and has been proven to be a powerful guiding principle in Quantum Information Theory. For instance, it led me to the discovery of the definition of Squashed Entanglement, as documented in its Wikipedia article.

Added later:
I also reported on this in Reddit

June 25, 2019

Two Days Wasted and not Wasted, to get glorious class graph for Qubiter

Filed under: Uncategorized — rrtucci @ 9:57 pm

3 days ago, I first posted some automatically generated documentation for Qubiter at the readthedocs.org website. My first readthedocs…like having sex for the first time, not. I’ve now improved that documentation by adding a glorious, automatically generated class graph for Qubiter (a diagram showing all of Qubiter’s classes with arrows pointing from parent to children classes).

To accomplish this, I wrote in the last 2 days a python script called `classgraph.py` (which can now be found at the Qubiter repo at github) that generates this class graph by first scanning the Qubiter code to gather the necessary info, and then using the graphviz software to process that info. Writing that script was, in a sense, a waste of time, because a class graph, even though it looks gorgeous, is of marginal utility to the users. It helps them navigate the code slightly better, I guess. In my defense, I would like to say that 2 days is a short time, and I learned a lot in those 2 days. I learned some stuff (coding skills) that will no doubt be useful to me at a later date (like, for example, stuff about graphviz, the readthedocs website, and restructured text)

June 22, 2019

Qubiter Now On ReadTheDocs, like all the big boys

Filed under: Uncategorized — rrtucci @ 7:59 pm

Five days ago, I and my friend Dr. Tao Yin fixed and greatly improved pip installation of Qubiter. Today, I am happy to announce that I’ve further enhanced the Qubiter experience by adding its Sphinx generated documentation to the ReadTheDocs website. Check it out.

https://qubiter.readthedocs.io/en/latest/

In technical jargon, the Sphinx software (with the Napoleon extension) can be made to produce beautiful documentation of your Python code, automatically, if the code’s docstrings are in the numpy format, as are Qubiter’s. Sphinx has various themes (skins). Among them is the one provided by the ReadTheDocs people. The ReadTheDocs people will host your documentation, free of charge, except for some ads on the left side bar. Most of the big boys in the qc languages field (for example, Rigetti Pyquil/Forest, Google Cirq, Google OpenFermion, Xanadu PennyLane) already have their documentation on ReadTheDocs. So, the bottom line is, I succumbed to peer pressure and followed the big boys.

June 19, 2019

The Next Man Who Fell To Earth

Filed under: Uncategorized — rrtucci @ 5:02 am

‘The Man Who Fell To Earth’ is an old British sci-fi novel and film about an extraterrestial space traveller who lands on Earth. He looks human but dresses funny. He founds a new company with the goal of building a spaceship that uses super-advanced inventions of his (including quantum computers, surely). The patents to those inventions, capable of curing world hunger and climate change on Earth, he shares freely with the world. Of course, intelligence agencies eventually find out about his extraterrestial origins and … In an upcoming movie with a similar plot, Hartmut Neven, head of Google Quantum AI, plays brilliantly the role of the extraterrestial
This photo comes from a recent article in Quanta Magazine. The article credits the photo to Hartmut Neven himself. His bathroom selfie?

More blog posts on Hartmut Neven here.

June 17, 2019

Pip Qubiter, Pip Qubiter, Hurray!

Filed under: Uncategorized — rrtucci @ 3:34 am

The purpose of this brief blog post is to announce that the Qubiter team (me and my friend Dr. Tao Yin) are finally getting serious about pip installation of Qubiter. Previously, Tao had uploaded what is, by now, a very old version (0.0.0) of Qubiter, onto the PyPi servers that provide the pip installation service. But as of today, you can pip install the latest version 1.0.1 of Qubiter. Just type

pip install qubiter --user

in your shell command line. This new version (unlike 0.0.0) has the canonical, pip compliant folder structure at its github repository


folder1
....setup.py
....folder2
........app.py

V 1.0.1 of Qubiter also includes a myriad of small improvements over the version of just a few weeks ago. Qubiter changes at a very fast pace! Last time I blogged about Qubiter improvements, I touted its new native Tensorflow backend, and its new implementation of a novel multi-threaded algorithm for computing gradients of quantum cost functions.

Since then, I have added to Qubiter two simple yet very useful tools for doing Continuous Integration (CI). Usually, for CI, what the big boys like Rigetti PyQuil, Google Cirq and IBM Qiskit do, is to write a matching pytest (or unittest) module for each app module and run all those pytest modules in batch via a service like travis. What I do for CI of Qubiter is not as industrial strength as the pytest/travis route, but it is much less onerous to the programmer and almost as effective at catching bugs.

Most Qubiter py files have a main() method at the end that tests the methods defined in that file. Qubiter also has a large library of Jupyter notebooks that put Qubiter through its paces. The new version 1.0.1 of Qubiter includes two py scripts,

`run_all_nb.py`
`run_all_py.py`.

The first script batch runs all the Jupyter notebooks, and the second script batch runs all those py files with a main() method at the end. These 2 py scripts together constitute a homemade tool for doing rudimentary (but pretty effective!) CI.

Blog at WordPress.com.