Quantum Bayesian Networks

September 20, 2016

In Love With Jupyter Notebooks, Post-Processing Your Lab Notebook

Filed under: Uncategorized — rrtucci @ 6:16 pm

I am pleased to announce on behalf of http://www.artiste-qb.net artiste-logothat our open source BSD licensed programs Qubiter and Quantum Fog now have some Jupyter Notebooks (JN’s), the first of hopefully many JN’s to come in the future. So far, Qubiter has 2 notebooks explaining Teleportation and the IBM Quantum Experience, whereas Quantum Fog has a notebook testing some ideas on how best to plot a quantum density matrix.

The way I see it, JN’s represent a method of using software that seems better suited for scientific investigations than the older method of “GUI (graphical user interface) rich” software.

Typically, GUI rich programs allow you to save some files with the fruits of your labor, but there are often several of those files, perhaps written in different formats, some human readable text formats and some propietary non-human readable ones. A JN, on the other hand, merges all those files into a single one that is stored in an open, very common, multimedia, browser readable format called JSON. The JN also records the commands that led to each of the files that are being merged plus it allows you to insert rich text comments between those files. All this makes JN’s, in my opinion, a much more unified, clear and complete way of documenting your thought process, both for yourself, and for others who might be interested in following your work.

Consider the lab or work notebooks of famous scientists (DaVinci, Darwin, Newton, Feynman, …). I for one find those brain storming and data recording documents endlessly fascinating and hope they continue to be written on paper and by hand till the end of humanity, but even those historic documents would have benefitted from some post-processing using the full panoply of modern computer tools now available to us. Imagine a Leonardo or a Darwin or a Feynman notebook with simulations and some plots and statistical analysis. Raw data can be post-processed using statistical packages. Thorny equations can be post-processed too, with symbolic manipulation programs, numeric algorithms programs and plotting programs. Such post-processing is what JN’s allow us to do.

The idea of writing software for creating such notebooks is not new. Although probably not the first software to use them, Wolfram’s Mathematica did much to popularize them. Even if you have never heard of JN’s, you probably have encountered Mathematica notebooks by now, wonderful multimedia files that can contain and execute Mathematica code, plots, animations, text with Latex equations embedded in it, etc. JN apps do all of that too, but they are open source under BSD license. They are much more adaptable to other platforms. They also rely more on browser and internet software resources (HTML, JavaScript, MathJax for LaTeX rendering, JSON format…) so they are ideally suited for an application running on the cloud, although they can also be run autonomously on a single PC.

JN’s were originally built as an app that ran on top of IPython, a command shell for Python, but the app has been carefully written so that it can be easily assimilated by other computer languages. 30 to 40 computer languages already have JN’s, including many languages that are not interpreted languages. Interpreted languages are languages like Python and Mathematica that are designed to run one line at a time.

Home of project Jupyter:

The original programmer of IPython and JN is Fernando Perez. Here is blog post by him describing JN history.

Blog at WordPress.com.

%d bloggers like this: