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
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.