Quantum Bayesian Networks

July 11, 2017

Quantum Meetup Supremacy

Filed under: Uncategorized — rrtucci @ 6:54 pm

Google, under the direction of Neven and Martinis, has promised a quantum computing device with 49= 7×7 physical superconductive qubits by the end of this year and to use this device to achieve Quantum Supremacy (what I like to call achieving quantum escape velocity). By this they mean that they will report on an experiment that uses their 49 qubit device to calculate in less than a second, an output that would take conventional classical computers years to calculate. I’ve even heard that Neven has a banner somewhere in the Google-plex rallying his storm-troopers to achieve Quantum Supremacy before anyone else. When Martinis first joined Google circa Sept. 2014, he told the media that Neven had convinced him to build a quantum annealer à la DWave but with error correction. But this 49 qubit device appears to be purely a gate model superconductive device similar to the current 16 qubit IBM device and 8 qubit Rigetti device. Since 49 is much larger than 16 or 8, this threatens to cause a massive migration of users from the IBM and Rigetti projects to the Google one.

Okay, Google, it’s likely that you will soon achieve Quantum Supremacy, and even Quantum Popularity Supremacy, but at least for now, the Toronto Quantum Computing Meetup has a firm hold on Quantum Meetup Supremacy, and there is nothing you can do about it. Indeed, according to this page, our club has more members than any other dedicated quantum computing meetup club in the world (current number of members: Toronto-634, Austin-597, San Francisco-583, etc.)


June 23, 2017

Quantum Computing and the Blockchain-Toronto QC Meetup

Filed under: Uncategorized — rrtucci @ 4:16 pm

I am very pleased to announce that the Toronto quantum computing Meetup will have their next meeting on July 5 on the subject of the connections between quantum computing and blockchain technologies (this includes crypto-currencies such as Bitcoin and Ethereum but has many other uses). Henning Dekant (CEO of artiste-qb.net) will be hosting the meeting at the Rotman Business School (part of Univ. of Toronto). Toronto has a vibrant community of brilliant programmers interested in blockchain, including some friends of Henning that will be attending. And, as you probably already know, investors large and small from all over the world have already poured billions of dollars into blockchain.

Toronto Quantum Computing Meetup doesn’t disappoint

May 7, 2017

Enter The Dragon Into The QC Race

Filed under: Uncategorized — rrtucci @ 3:13 pm

Chinese quantum computing has been prominently in the news recently. Two news items about it that have come to my attention are:

First, an article in the conservative journal National Review
warning about the dangers of America falling behind China in the quantum computing “arms race”. I see America’s race with China to build a QC more as a commercial race to achieve supremacy in a new market than as an arms race. The article doesn’t mention Russia or India, probably because those two players have not invested as much money and seem far less committed than USA and China to this race. The article fails to mention that there are some types of crypto that are unbreakable by a QC, so, as long as the world starts migrating to those types of crypto a few years before QCs are available, the world’s secrets will remain safe. Maybe some old docs, encrypted in the QC vulnerable encryptions, will fall in the wrong hands, but I don’t see that as a very serious problem. Secrets usually have a short expiration date anyway. The National Review article does make a point that I consider very true and important:

“Yet with China graduating 4.7 million of its students per year with STEM degrees while the U.S. graduates a little over half a million, how long can the U.S. maintain its lead?

Second, a Boson Sampler experiment. Scott Aaronson is one of the fathers of BS, so let me just quote his BS explanation, as posted in his BS blog, Shtetl Optimized:

… a group in Shanghai, led by Chaoyang Lu and Jianwei Pan, has reported in Nature Photonics that they can do BosonSampling with a coincidence rate that’s higher than in previous experiments by a factor of several thousand. This, in particular, lets them do BosonSampling with 5 photons. Now, 5 might not sound like that much, especially since the group in Bristol previously did 6-photon BosonSampling. But to make their experiment work, the Bristol group needed to start its photons in the initial state |3,3\rangle that is, two modes with 3 photons each. This gives rise to matrices with repeated rows, whose permanents are much easier to calculate than the permanents of arbitrary matrices. By contrast, the Shanghai group starts its photons in the “true BosonSampling initial state” |1,1,1,1,1\rangle that is, five modes with 1 photon each. That’s the kind of initial state we ultimately want.

To me, quantum computers are mostly a commercial product, just like PCs, the Cloud and HPC. Most of the best progress in quantum computing in America is being done by commercial companies (IBM, Google, Microsoft, DWave, etc.), not by academia or aerospace. China with its 1.4 billion inhabitants compared to America’s 300 million, is certainly an enticing market to any company.

Our company Artiste-qb.net already has a small toe-hold in China. Our CTO and part owner, Dr. Tao Yin, lives in Shenzhen, China, where he represents us. Our BayesForge.com product is currently only on the Amazon cloud (AWS), but we are currently working to translate it to a Docker image. Once we do so, we may also make it available on the Alibaba Cloud.

April 30, 2017

I don’t use plates to eat Bayesian networks

Filed under: Uncategorized — rrtucci @ 2:02 am

I am referring here to the “plates” used by some to draw Bayesian networks. Here is why I don’t like them. Consider this diagram given as an example by the Wikipedia article on plate notation. In this diagram, I would replace
\theta by \theta^{M}, z by z^{NM}, and w by w^{NM}. F*** (forget) the plates.

This aversion of mine to plates is related to the following idiosyncratic notation of mine.

In computer code, I like to use x\_ for a random variable x and vx for a vector of N observations x. (In a latex document I might use \underline{x} for a random variable and \underline{x}^N for the N observations.)

A vector of x measurements vx is like a primitive version of the random variable x\_. In fact, from vx one can get an empirical distribution P_{emp}(x) which approximates the true distribution P(x) which defines the random variable x\_. That’s why when I see a statement like x\_ \sim P(x), I think of this as an ordinary equivalence relation. In fact,

x\_ \sim vx \sim P_{emp}(x) \sim  P(x)

are all equivalent in the limit of a large number of observations.

April 29, 2017

Miss Quantum Computing, may I introduce to you Miss Bayesian Hierarchical Models and Miss MCMC?

Filed under: Uncategorized — rrtucci @ 5:49 pm

Warning: Intense talk about computer software ahead. If you are a theoretical computer scientist, you better stop reading this now. Your weak constitution probably can’t take it.

When you enter the nerd paradise and secret garden that is Bayesforge.com (a free service on the Amazon cloud), you will see one folder named “Classical” and another named “Quantum”. Here is a screenshot of this taken from Henning Dekant’s excellent post in Linkedin

The “Quantum” folder contains some major open source quantum computing programs: Quantum Fog, Qubiter, IBM-QisKit (aka kiss-kit), QuTip, DWave, ProjectQ, Rigetti

The “Classical” folder contains some major Bayesian analysis open source programs: Marco Scutari’s bnlearn (R), Kevin Murphy’s BNT (Octave/matlab), OpenPNL (C++/matlab), PyMC, PyStan.

The idea is to promote cross fertilization between “Quantum” and “Classical” Bayesian statisticians.

Today I want to talk mostly about PyMC and PyStan. PyMC and PyStan deal with “Hierarchical Models” (Hmods). The other programs in the “Classical” folder deal with “Bayesian Networks”(Bnets).

Bnets and Hmods are almost the same thing. The community of people working on Bnets has Judea Pearl as one of its distinguished leaders. The community of people working on Hmods has Andrew Gelman as one of its distinguished leaders. You might know Gelman (Prof. at Columbia U.) from his great blog “Statistical Modeling, Causal Inference, and Social Science” or from one of his many books

Both PyStan and PyMC do MCMC (Markov Chain Monte Carlo) for Hmods. They are sort of competitors but also complementary.

PyStan (its GitHub repo here) is a Python wrapper of a computer program written in C++ called Stan. According to Wikipedia, “Stan is named in honour of Stanislaw Ulam, pioneer of the Monte Carlo method.” Prof. Gelman is one of the fathers of Stan (I mean the program, of course).

PyMC comes in 2 incompatible versions: 2.X and 3.X. Version 3 is more advanced and intends to replace Ver 2. PyMC2’s best sampler is a Metropolis-Hastings (MH) sampler. PyMC3 contains an MH sampler, but it also contains the “No U turns” or “NUTS” sampler that is supposed to be much faster than MH for large networks. Currently, Bayesforge contains only PyMC2, but the next version will contain both PyMC2 and PyMC3. As an added bonus, PyMC3 comes with Theano, one of the leading deep neural networks frameworks.

Check out this really cool course:

Sta-663 “Statistical Programming” , available at GitHub, taught at Duke U. by Prof. Chi Wei Cliburn Chan.

This wonderful course has some nice jupyter notebooks illustrating the use of PyMC2, PyMC3 and PyStan. Plus it contains discussions of many other statistical programmimg topics. I love it. It has a similar philosophy to BayesForge, namely to do statistical programming with jupyter notebooks because they are great for communicating your ideas to others and allow you to combine seamlessly various languages like Python, R, Octave, etc

April 21, 2017

Real Artistes Ship!

Filed under: Uncategorized — rrtucci @ 7:33 pm

Today we finally unveiled to the public our http://www.BayesForge.com home page which contains instructions on how to sign up to our free service on the Amazon cloud. In the immortal words of Steve Jobs, “Real Artists Ship”. We ain’t called artiste-qb.net for nothing 🙂

The exploding-reassembling Vitruvian-Metropolis Firefly Robot

April 8, 2017

Welcome to BayesForge, a free service on the Amazon cloud

Filed under: Uncategorized — rrtucci @ 7:08 am

Our company artiste-qb.net is proud to announce BayesForge.com (BF), our new service on AWS (Amazon Web Services). BayesForge is not yet open for business but will open in a week or less. The purpose of this blog post is to give an overview and teaser of what is coming.

Henning Dekant will give a tour of BF to those who attend the meeting on April 21 of the Toronto Quantum Computing Meetup.

Why AWS?

The Amazon cloud is one of the largest and Amazon offers an incredible deal to all its customers. Anybody with a credit card can get an AWS Free Tier account. An AWS Free Tier account gives you one full year of free cloud use (there are some upper bounds on usage but very generous ones). Furthermore, you can open a separate AWS Free Tier account in the name of your spouse and each of your children. Amazon doesn’t seem to care!! Only Jeff Bezos could be so crazy generous. Once you have an AWS Free Tier account, you can use it to play with BayesForge for a whole year, free of charge. You don’t have to be a student to do this.

What can you do with BayesForge?

BF allows you to write Jupyter notebooks on your web browser in a wide variety of languages and run/store those notebooks on the cloud. (Besides the web browser, no additional software needs to be installed on your computer). We have installed Jupyter kernels for Python-3, Python-2, R, Octave (clone of matlab) and bash. This means you can write/run a notebook in which you use one of those languages exclusively. We have also installed Rmagic and Octavemagic which allows you to write a notebook in Python but dip temporarily into R or Octave.

What software packages does BayesForge include?

BF comes with 2 folders called “Classical” and “Quantum”. The “Quantum” folder contains a large selection of open source quantum computing software, including our own Quantum Fog and Qubiter, and also open source qc software from DWave, IBM, Rigetti, etc. The “Classical” folder contains a large selection of open source software for doing classical bayesian statistical analysis.

This is the logo of BayesForge (graphics by our inhouse artiste and Gimp wizard, Henning Dekant. BayesForge name suggested by Gavin Dekant)

“True gold is not afraid of fire.”
(Chinese Proverb)

“Incus robust malleum non timet”
“A strong anvil need not fear the hammer.”
(Latin Proverb)

April 6, 2017

Reaching Quantum Escape Velocity

Filed under: Uncategorized — rrtucci @ 5:42 pm

The term “Reaching Quantum Supremarcy”, coined by John Preskill, is usually used to refer to the first time a quantum computer can perform in minutes a calculation that would take the best classical computers centuries to perform. I prefer to call that “Reaching Quantum Escape Velocity”.

I love the term “Quantum Supremacy” too, but I like to use it differently, as in “Google, IBM and Microsoft are vying for Quantum Supremacy”, viz., to dominate the qc market. This second meaning is the one being used in my upcoming movie entitled “Quantum Supremacy”.

I prepared the following poster to promote the concept of reaching quantum escape velocity. It recycles some art from a previous blog post of mine.

April 5, 2017

Tao Yin teleports (the old fashioned way) 2 entangled cats from Germany to China

Filed under: Uncategorized — rrtucci @ 5:11 pm

In this photo you can see Tao Yin at the Frankfurt airport, before boarding an airplane to China, transporting cat #1. Cat #2 was teleported by his wife on same flight. One small pet per passenger allowed. Cats 1 and 2 are friends that were entangled at a distance during the flight.

Dr. Tao Yin obtained a Ph.D. in Physics at the end of last year from
The Goethe University in Frankfurt. He started at artiste-qb.net as a long-distance intern last summer, but he is now CTO and part owner of artiste-qb.net . He has quickly become an important part of our company. He has just moved from Frankfurt-Germany to Shenzhen-China, where he will continue to represent us. Shenzhen, population ~ 11 million, is one of the 5 largest cities in China, a technology power house located immediately north of Hong Kong.

Tao brings to artiste-qb.net excellent computer skills and knowledge of physics. We are also relying on him to translate to Mandarin Chinese some of our software docs. For example, he translated the Jupyter notebooks quantum_compiler_intro.ipynb to quantum_compiler_intro_CN.ipynb. These jupyter notebooks explain how to use the quantum compiler in our open source software Qubiter. Qubiter has had a fully-functional quantum compiler since the first week of Jan of 2017. Currently, Qubiter is the only software to offer a quantum compiler of this kind.

April 1, 2017

April the Giraffe has Baby

Filed under: Uncategorized — rrtucci @ 6:32 pm

Today, April the Giraffe had a baby boy calf after 15 months of taxing pregnancy, the progress of which has been anxiously followed via webcam by millions of animal lovers throughout the world. April lives at the Animal Adventure Park near Binghamton, NY, although conservative rumor mills claim that her real birth certificate is from Kenya.

To congratulate April and hubby Oliver on the new addition to their family, we have sent them a baby bib (size=”giraffe”), a baby bottle and a copy of our latest book “Quantum Computer Programming for Giraffes” printed on paper made from tasty Acacia tree leaves that were made-in-America.

We here at artiste-qb.net are passionate animal lovers and have a long tradition of sending gifts to giraffes and other mammals, including the least noble ones. For example, on a previous occasion, we sent to Jack Ma (founder of Alibaba) one of our stylish baseball caps, and to the new baby of Mark Zuckerberg a copy of our book “How to program the Facebook quantum computer with QuPy”. (You too can have a copy of these items for a very reasonable price. They are especially popular with people who want to make an impression at Silicon Valley cocktail parties).

March 30, 2017

Betting the farm on Rigetti Spaghetti

Filed under: Uncategorized — rrtucci @ 7:40 pm

#ElvisSighting #SteveJobsSighting

Steve Jobs and/or his Reality Distortion Field is still alive!!!

Rigetti is a quantum computer company that started about 3 years ago with an initial seed funding of $2.5M. Two days ago, the press revealed that an additional whopping $64M has been invested in the company. The company is named Trump Rigetti after its founder Chad Rigetti. Sorry but rigetti is not a new kind of macaroni. “il rigetti” actually means “he discards” or “he pukes” in Italian.

Unlike our company artiste-qb.net which does only qc software (and also quantum ready classical software), Rigetti does mostly qc hardware (gate model, superconducting qubits). They intend to offer access to their machine via the cloud, something that DWave and IBM already do, but which slow-poke Google doesn’t do yet, although they are probably months away from doing it to keep up with the Joneses.

Although a $64M investment in qc is good news for artiste-qb.net because a rising tide raises all boats, I advise you not to invest your pension on this one. I consider it a very risky investment for the following reasons.

As far as I know, team Rigetti has yet to publish performance results for their hardware and thus subject their machine to scientific scrutiny the way Martinis at Google has amply done. (Team Rigetti did publish one paper https://arxiv.org/abs/1703.04613 on Mar 15, two weeks ago, but that paper is only about a single qubit and getting 2 qubits to interact in an ideal way is much more difficult).

Alibaba, Google, IBM, Intel, and Microsoft (alphabetical order) , not to mention the govs. of Australia, Canada, China, EU, Holland, UK and USA are each spending tens of millions of dollars per year to achieve the same goal as Rigetti, to build an elusive gate model quantum computer.

Silicon Valley is like a Republican echo chamber: a small, outlier perturbation can snowball in a hurry. Furthermore, the master-minds at Silicon Valley often try to grow their companies in a hurry hoping that these quickly become near monopolies that are too big to fail. That might work for a service company like Uber, but it might not work in the case of a company racing against some of the biggest nations and companies of the world, trying to build/invent a very NOVEL device. In this case, the company is strictly accountable to Mother Nature, and she might not favor it.

March 20, 2017

BNT and PNL, two masterpieces of Bayesian Networks retro-art

Filed under: Uncategorized — rrtucci @ 8:58 pm

An update on the latest adventures of our company artiste-qb.net.

In previous blog posts, I waxed poetic about Marco Scutari’s open source software called bnlearn for learning the structure of bnets (Bayesian networks) from data. bnlearn is written in the language R whereas Quantum Fog is written in Python. But by using Jupyter notebooks with Rmagic installed, we have been able to write some notebooks running both QFog and bnlearn side by side in the same notebook for the same bnets, and to compare outputs of both programs. That is a good bench-marking exercise for the bnet learning side of QFog, but what about it’s bnet inference side?

Two open source programs that are very good at doing bnet inference (and many other things too) are BNT (Bayes Net Toolbox, by Kevin Murphy et al) and OpenPNL (PNL = Probabilistic Networks Library, written by Intel. I like to call it PaNeL to remember the letters quickly).

So our next adventure is to learn how to use BNT and PNL and to compare them to QFog.

BNT is written in Matlab. PNL is written in C++ but it includes Matlab wrappers for most of its functions. Both BNT and PNL are very mature and comprehensive programs. Since its core is written in C++ rather than Matlab, we expect PNL to be much faster than BNT for large networks.

As you already know if you’ve ever checked Matlab’s pricing, the software is very costly for everyone except students. However, this is one case when the open source gods have listened to our prayers. Octave is a free, open source program that can run 99% of a Matlab program and the few differences between Matlab and Octave (mostly in the plotting packages) are well documented. Furthermore, one can run Octave in a Jupyter notebook, either on an Octave kernel or on a Python kernel with octavemagic (oct2py) installed.

So in order to compare QFog to bnlearn, we’ve had to start using Jupyter notebooks on R kernel  or on Python kernel with Rmagic. And in order to compare QFog with BNT&PNL, we’ve had to start using Jupyter notebooks on Octave kernel or on Python kernel with octavemagic. We have seen the light and we are now believers in a holy trinity of computer languages (diversity and open source is our strength, Mr Trump):

Python, R, Octave
(our polyglot notebooks)

Curiously, Duke Univ. offers a course called “Computational Statistics in Python” that also advocates the use of Jupyter notebooks, and the languages Python, R and Matlab intermixed to do statistics. So when two cultures independently come up with the same idea, it’s probably a good one, don’t you think?

Since BNT is written in Matlab, running it does not require any compilation. PNL, on the other hand, is written in C++, so it does. Compiling PNL has proven a difficult task because the software is ten years old, but, after a lot of sweat and tears, our wiz Henning Dekant has managed to compile it (a few issues remain).

BNT was last changed in a bigly way circa 2007 (or even earlier) and PBL on 2006. (bnlearn, by comparison, is still very active). BNT and PNL belong to what I like to call the first bnet revolution (inference by junction tree) whereas bnlearn belongs to the second revolution (structure learning from Markov blankets). Even though PNL belongs to the first, not second, revolution, it is a major mystery to me why Intel abandoned it. PNL is a very impressive, large and mature piece of software. A lot of work, love and passion seems to have gone into it. Then sometime in mid 2006, it seems to have been abandoned in a hurry, and now it looks like a ghost town, or the deserted island in the video game Myst. I already know how the game Myst ends. If anyone knows why Intel stopped PNL development circa 2006, I would appreciate it if you would tell me, either in public in this blog or in private by email. Luckily, Intel had the wisdom to make PNL open source. PNL will go on, because 💍OPEN SOURCE IS FOREVER💍.

Sorry for the length of this blog post (almost as long as a Scott Aaronson blog post or a never ending New Yorker article).


February 22, 2017

Quantum Fog’s weight in bnlearn units

Filed under: Uncategorized — rrtucci @ 2:42 am

In a recent blog post entitled “R are Us. We are all R now”, I expressed my great admiration for the R statistical computer language, and I announced the addition to the Quantum Fog (QFog) GitHub repository of a Jupyter notebook called “Rmagic for dummies” which explains how something called Rmagic allows one to run both Python and R in the same Jupyter notebook.

In 2 other earlier blog posts, I also expressed great admiration for something else, bnlearn, an open source computer program written in R by Marco Scutari for learning classical Bayesian networks (cbnets) from data. I consider bnlearn the gold standard of bnet learning software.

The main purpose of this blog post is to announce that the QFog GitHub repo now has a folder of Jupyter notebooks comparing QFog to bnlearn. This is a perfect application of Rmagic to comparing two applications that can do some of the same things but one app is written in R while the other is written in Python. Pitting QFog against bnlearn is highly beneficial to us developers of QFog because it shows us what needs to be improved and suggests new features that would be worthwhile to add.

QFog can do certain things that bnlearn can’t (most notably, QFog can do both classical and quantum bnets, whereas bnlearn can only do classical bnets), and vice versa (for instance, bnlearn can do bnets with continuous (Gaussian) node probability distributions, whereas QFog can only handle discrete PDs), but there is much overlap between the 2 software packages in the area of structure and parameter learning of classical bnets from data.

A cool feature of the folder of Jupyter notebooks comparing bnlearn and QFog is that most notebooks in that folder can be spawned and run from a single “master” notebook. This amazing ability of the “master” notebook to create and direct a zombie horde of other notebooks is achieved thanks to an open source Python module called “nbrun” (notebook run).


February 18, 2017

Quantum-Ready Software

Filed under: Uncategorized — rrtucci @ 12:26 am

Quantum Fog is “quantum-ready” software: it has a parameter “is_quantum” in many of its functions which allows you to switch between Classical Bayesian Networks (is_quantum=False) and Quantum Bayesian Networks (is_quantum=True)

(footnote) I am not the first to use the term “quantum-ready”. I first heard it used by Henning Dekant. A Google search conducted before writing this blog post led me to discover that the company 1Qbit has also used this term in the past in its promotional literature

February 11, 2017

R are us. We are all R now.

Filed under: Uncategorized — rrtucci @ 5:08 pm

I have long been an enthusiastic proponent of R, a computer language designed for doing statistical analysis. In fact, 7 years ago I wrote a post in this blog entitled “Addicted to R”.

Our company (artiste-qb.net) has been publishing software written mostly in Python. The Python ecosystem includes a very nice statistical package called Pandas, whose authors profess much love for R and unabashedly admit that they were trying to copy the best of R’s statistical functionality and bring it to Python users. This is fine and good, but is not enough, is it?

R has been around for a long time (since 1993 according to Wikipedia), and during that time it has managed to accumulate a formidable number of highly useful extension packages and a very large and passionately committed community of fans. As good as Pandas is, it would be a pity and outright foolish if our company and others in the same boat ignored R’s rich libraries and numerous users.

So I was elated when Tao Yin, a member of our company, introduced our company members to rpy2 and its extension Rmagic. Rmagic allows one to invoke R functions inside a Jupyter notebook running with a Python kernel. So in a single Jupyter notebook, you can call both Python functions and R functions in the same cell, or have some cells running just R and others running just Python. And of course, variables can be exchanged easily between R and Python within that notebook. So we are all R now. And Python too.

I’ve only known about Rmagic for about a week so I’m a newbie at it. Fortunately, even though rpy2/Rmagic is very sophisticated software under the hood, it’s API (Application Programming Interface) is quite simple and intuitive. I wrote a Jupyter notebook called “Rmagic for dummies” that I hope will convince you that Rmagic is very powerful yet easy to use.

« Previous PageNext Page »

Blog at WordPress.com.

%d bloggers like this: