{ "metadata": { "name": "", "signature": "sha256:61de601790f8adebee6290aae41aa61d9ff5a764e220db0239d767a9a6829385" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "I was not able to get the sympy circuit drawing code to work well enough,\n", "so what I'm currently doing is running \"qasm2circ\" by hand to create png\n", "files. This is still not ideal, as I can't really annotate the circuits\n", "the way I want to. Also, the bottoms sometimes get cut off, and the don't\n", "seem to \"refresh\" properly!\n", "
\n",
"It might be just as well to plot them by hand with matplotlib, or look\n",
"into using one of these other techniques."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"%autosave 0\n",
"%matplotlib inline\n",
"from IPython.display import Image"
],
"language": "python",
"metadata": {},
"outputs": [
{
"javascript": [
"IPython.notebook.set_autosave_interval(0)"
],
"metadata": {},
"output_type": "display_data"
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Autosave disabled\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"It's not clear whether it's better to display them with \"Image\""
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"Image(url='circuits/Deutsch_f0.png', width=500)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
""
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 60,
"text": [
" \n",
"Or whether just to do it in a markdown cell ...\n",
"\n",
"Circuit for \"set to zero\" operation:\n",
" \n",
"\n",
" \n",
"Circuit for \"set to one\" operation:\n",
" \n",
"\n",
" \n",
"Circuit for Identity operation:\n",
" \n",
"\n",
" \n",
"Circuit for NOT operation:\n",
" \n",
"\n",
" "
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
\n",
"