Quantum Bayesian Networks

December 31, 2010

In Love With XY-pic Software

Filed under: Uncategorized — rrtucci @ 5:25 pm

I’m currently trying to write a paper on quantum Bayesian networks, the structures which gave this blog its name, and which have interested me for a long time. My huge interest in QB nets drove me to write a Mac application called Quantum Fog that implements them. That was more than ten years ago, and since then, I’ve learned a lot more about QB nets, especially about their connection to quantum information theory, which is the reason why I’m trying to write a new paper about them.

Anyhow, I decided that writing such a paper would be much less laborious if I could draw figures of directed graphs directly in LaTex. (quantum as well as classical Bayesian networks are directed acyclic graphs). As usual, the LaTex gods have not disappointed me. It turns out that drawing directed graphs in LaTeX is very easy using XY-pic.

I just love XY-pic and that’s why I’m writing this blog post, to rave about it. XY-pic was written by Kristoffer H. Rose, Ross Moore and collaborators to draw figures of commutative diagrams in category theory. It has also been used very successfully to draw figures in “automata theory, algebra, neural networks, topology (knots and braids), database theory, chemistry, and genealogy”. The very useful and popular package Q-circuit for drawing quantum circuits in LaTex is implemented using XY-pic commands.

For those already familiar with LaTex (one of the most beautiful and useful and influential scientific softwares in the history of mankind, comparable in importance to the invention of the printing press), learning to do basic stuff with XY-pic can be done in a day. The tug (TeX users group) page for XY-pic will lead you to some nice tutorials with examples. You can also do a Google Image search for “xy-pic and latex”, and find examples that way.

If you too need a way of drawing directed graphs in LaTex, and you’ve never used xy-pic before, you may find it useful to see in this blog post a very simple example. Mind you, XY-pic can be used to draw much more sophisticated diagrams, but I hereby present as a simple example, the famous (among Bnet aficionados) Bayesian network called the “Chest Clinic”. The code in this file produced the following figure:



  1. cool. google docs drawing also recently implemented some features that make drawing graphs super easy, for anybody that is code averse 😉

    Comment by Joshua vogelstein — January 3, 2011 @ 2:15 pm

  2. Thanks for the recommendation

    Comment by rrtucci — January 3, 2011 @ 9:39 pm

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: