I was not able to get the sympy circuit drawing code to work well enough, so what I'm currently doing is running "qasm2circ" by hand to create png files. This is still not ideal, as I can't really annotate the circuits the way I want to. Also, the bottoms sometimes get cut off, and the don't seem to "refresh" properly!
It might be just as well to plot them by hand with matplotlib, or look into using one of these other techniques.
%autosave 0
%matplotlib inline
from IPython.display import Image
Autosave disabled
It's not clear whether it's better to display them with "Image"
Image(url='circuits/Deutsch_f0.png', width=500)
Image(url='circuits/Deutsch_f1.png', width=500)
Image(url='circuits/Deutsch_f2.png', width=500)
Image(url='circuits/Deutsch_f3.png', width=500)
Or whether just to do it in a markdown cell ...
Circuit for "set to zero" operation:
Circuit for "set to one" operation:
Circuit for Identity operation:
Circuit for NOT operation: