Quantum Bayesian Networks

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.



  1. “Solve et Coagula” my friend…


    Mock on, mock on, Voltaire, Rousseau;
    Mock on, mock on; ’tis all in vain!
    You throw the sand against the wind,
    And the wind blows it back again.
    And every sand becomes a gem
    Reflected in the beams divine;
    Blown back they blind the mocking eye,
    But still in Israel’s paths they shine.

    The Atoms of Democritus
    And Newton’s Particles of Light
    Are sands upon the Red Sea shore,
    Where Israel’s tents do shine so bright.

    William Blake

    Comment by KUHULCAN — February 26, 2016 @ 10:47 pm

  2. I think it’s fair to say that Trump University was the ultimate insult to American academia.

    Comment by Quax — February 28, 2016 @ 1:51 am

  3. Quax, I think Trump realized universities are a ripoff and he wanted to get in on the racket.

    Maybe the popularity of Trump and Sanders means Americans are rebelling against greedy institutions with an unfair advantage like universities, banks, pharma and against a government that favors them. What I am trying to explain is the much higher that expected popularity of Trump and Sanders

    Comment by rrtucci — February 28, 2016 @ 3:33 am

  4. Another opportunity ahead


    Comment by KUHULCAN — March 11, 2016 @ 11:49 am

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: