{ "info": { "author": "Sandy Kutin, Thomas Draper", "author_email": "kutin@idaccr.org, draper@idaccr.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "####################################\n\u27e8q\\|pic\u27e9: Quantum circuits made easy\n####################################\n\n.. image:: docs/images/qpic.png\n\n**************************************************************\nA compiler from quantum circuits to graphical representations.\n**************************************************************\n\n.. image:: https://img.shields.io/pypi/v/qpic.svg\n :target: https://pypi.python.org/pypi/qpic\n\n.. image:: https://img.shields.io/travis/qpic/qpic.svg\n :target: https://travis-ci.org/qpic/qpic\n\n.. TODO: Publish badge after porting to ReadTheDocs\n .. image:: https://readthedocs.org/projects/qpic/badge/?version=latest\n :target: https://readthedocs.org/projects/qpic/?badge=latest\n :alt: Documentation Status\n\n- Free software: GNU GPLv3 license\n- Documentation: `\u27e8q\\|pic\u27e9 manual `_\n\nFeatures\n========\n\nThe \u27e8q\\|pic\u27e9 language provides a concise, readable, ASCII format for\ndescribing quantum circuits. ``qpic`` converts \u27e8q\\|pic\u27e9 files to the\nscientific paper standard of LaTeX using TikZ graphic commands.\n\n- Automatic placement of circuit components.\n- Human readable.\n- Input \u27e8q\\|pic\u27e9 syntax can be produced by other scripts.\n- Can be included in LaTeX documents in TikZ or PDF form.\n\n\u27e8q\\|pic\u27e9 produces high quality graphics quickly. The following graphic\nillustrating part of a ripple carry adder \n\n.. image:: docs/images/Adder_CDKM_MAJ.png\n\nis compiled from the \u27e8q\\|pic\u27e9 code\n\n::\n\n a W a a\\oplus{c}\n b W b b\\oplus{c}\n c W c \\mbox{MAJ}(a,b,c)\n\n a b c G \\rotatebox{90}{MAJ}\n =\n +b c\n +a c\n a b +c\n\nExamples\n========\n\nBasic quantum teleportation circuit\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. image:: docs/images/BasicTeleportation.png\n\nThis classic diagram derives from the following code:\n\n::\n\n a W |\\psi\\rangle\n b c W |\\beta_{00}\\rangle<\n c W |\\psi\\rangle\n a +b\n a H\n a b M\n c X b:owire\n c Z a:owire\n\nDecorated quantum teleportation circuit\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\u27e8q\\|pic\u27e9 has additional features for commenting or highlighting parts of\na circuit.\n\n.. image:: docs/images/QuantumTeleportation.png\n\nThis diagram derives from the following:\n\n::\n\n PREAMBLE \\providecommand{\\K}[1]{\\left|#1\\right\\rangle} # Define ket command\n a W \\K{\\phi} [x]\n x1 W type=o # Empty wire used for positioning\n x0 W style=dashed # Dividing line\n x2 W type=o # Empty wire used for positioning\n b0 W \\K{0} [y]\n b1 W \\K{0} \\K{\\phi}\n\n VERTICAL 0\n b1 H % $\\K{\\phi}\\K{0}(\\K{0}{+}\\K{1})$\n +b0 b1 % $(\\alpha\\K{0}{+}\\beta\\K{1})(\\K{00}{+}\\K{11})$\n b0 x1 PERMUTE\n +b0 a %$\\scriptstyle\\alpha\\K{0}(\\K{00}{+}\\K{11}){+}\\beta\\K{1}(\\K{10}{+}\\K{01})$\n a H % $\\sum_{x,y}\\K{xy}(\\alpha\\K{y}{+}(-1)^x\\beta\\K{\\bar{y}})$\n a b0 M % $[xy](\\alpha\\K{y}{+}(-1)^x\\beta\\K{\\bar{y}})$\n x1 x2 a b0 PERMUTE\n +b1 b0 % $[xy](\\alpha\\K{0}{+}(-1)^x\\beta\\K{1})$\n b1 a % $[xy](\\alpha\\K{0}{+}\\beta\\K{1})$\n\n # Colored boxes\n b0 b1 x1 x2 @ 0 2 fill=green style=rounded_corners %% $[qq]$ Quantum entanglement\n a b0 x2 x1 @ 6 6 fill=blue style=rounded_corners %% \\hspace{.5cm}$2[c\\rightarrow c]$ Classical channel\n\nFor an explanation of ``qpic`` commands and more examples, see the\n`official documentation `_.\n\nInstallation\n~~~~~~~~~~~~\n\nRecommended installation method is\n`pip `_. Current\nversions of Python 2 and 3 include pip. For older versions, use `pip\ninstallation instructions `_.\n\n``pip install qpic``\n\nIf you do not have permission to install or wish to install ``qpic`` as\na single user, add ``$HOME/.local/bin`` to your ``$PATH`` and install\nusing\n\n``pip install --user qpic``\n\nUninstall\n~~~~~~~~~\n\nTo uninstall ``qpic`` simply type\n\n``pip uninstall qpic``\n\nStand alone script\n~~~~~~~~~~~~~~~~~~\n\nTo try out the basic script without installation:\n\n1. Download the file ``qpic.py``. (located in the ``qpic`` directory)\n2. Run ``python qpic.py your_file.qpic > your_file.tex``.\n\nRunning \u27e8q\\|pic\u27e9\n~~~~~~~~~~~~~~~~\n\n``qpic`` generates TikZ code by default. ``qpic`` can also generate pdf\nfiles using ``pdflatex`` and png files using ``convert`` (from\nImageMagic).\n\nCreate TikZ file ``diagram.tikz``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``qpic -f tikz diagram.qpic``\n\nCreate PDF file ``diagram.pdf``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``qpic -f pdf diagram.qpic``\n\nCreate PNG file ``diagram.png``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``qpic -f png diagram.qpic``\n\nUsing \u27e8q\\|pic\u27e9 with LaTeX\n-------------------------\n\nIncluding graphics in LaTeX documents\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere are two main methods for including \u27e8q\\|pic\u27e9 in LaTeX documents.\nEach has its advantage in certain areas. They are:\n\n- Include TikZ code directly\n- Include as a PDF graphic\n\nTikZ\n~~~~\n\n``qpic my_graphic.qpic`` produces a TikZ file named ``my_graphic.tikz``,\nwhich can be directly included into a normal LaTeX document. You will\nneed to add\n\n::\n\n \\usepackage{tikz}\n\nto the preamble of your paper. Graphics can then be included with the\ncommand:\n\n::\n\n \\input{filename.tikz}\n\nIn some cases, additional TeX commands may be required in the preamble.\n(These will be in the ``.tikz`` file preceded by ``%!``.) See the full\n\u27e8q\\|pic\u27e9 documentation for when additional packages are required.\n\nPDF\n~~~\n\n``qpic -f pdf my_graphic.qpic`` will produce a PDF file named\n``my_graphic.pdf``. This graphic can be viewed directly with a PDF\nviewer. To insert the graphic into a LaTeX document, add the following\nline to the preamble:\n\n::\n\n \\usepackage{graphicx}\n\nand include the file using the command:\n\n::\n\n \\includegraphics{my_graphic.pdf}\n\nThis method requires the document to be processed with pdfLaTeX. For\nfurther information see the full `\u27e8q\\|pic\u27e9 documentation `_.\n\n\n=======\nHistory\n=======\n\n1.0.2 (2016-04-20)\n------------------\n\n* Fix Python3 unicode bug.\n\n1.0.1 (2016-03-18)\n------------------\n\n* Convert README to ReStructuredText for PyPi.\n\n1.0.0 (2016-03-09)\n------------------\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/KutinS/qpic", "keywords": "qpic", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "qpic", "package_url": "https://pypi.org/project/qpic/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/qpic/", "project_urls": { "Homepage": "https://github.com/KutinS/qpic" }, "release_url": "https://pypi.org/project/qpic/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "Creating quantum circuit diagrams in TikZ", "version": "1.0.2" }, "last_serial": 2075426, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "0f34580adbc2962303fd48316648842f", "sha256": "5a4403d17babf907ae5566a8e385dd11ee77d75eef6eaab1b8616bb3080b6b8c" }, "downloads": -1, "filename": "qpic-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0f34580adbc2962303fd48316648842f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 37621, "upload_time": "2016-03-09T17:32:41", "url": "https://files.pythonhosted.org/packages/a5/3c/a0bb2a42b80f5f3ce2c31655980a6028eaac28e9d02918c2f1710074b9bd/qpic-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a8925c1e6e99372967ef067910ce1632", "sha256": "70e1e0d63e73907e8ebe9ef8d851caf05e735c0282f0d9fe024f515efe6afd9e" }, "downloads": -1, "filename": "qpic-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a8925c1e6e99372967ef067910ce1632", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2495912, "upload_time": "2016-03-09T17:27:50", "url": "https://files.pythonhosted.org/packages/f0/f2/eb24b7ebe09fa7302b08e02504327e7a7abfce7b24d284c3717ed7733558/qpic-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "a67cab8a325d498db80d36c6e1395baf", "sha256": "ccfef9b6d7edb9974c76d258ec73fbd55d40dd5e94b1add0170273ddcf484341" }, "downloads": -1, "filename": "qpic-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a67cab8a325d498db80d36c6e1395baf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 37644, "upload_time": "2016-04-21T04:21:22", "url": "https://files.pythonhosted.org/packages/87/89/3eeb2f4a7b4917cdb6b164e03ff285fe83a1884b4bd73774e25cbbaec0ff/qpic-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e0cd71c5c9e74870c07e423ddd878204", "sha256": "7d142173ea300378edd570445fc977bd42345d0a48243d995ba67236d99b156a" }, "downloads": -1, "filename": "qpic-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e0cd71c5c9e74870c07e423ddd878204", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 127390, "upload_time": "2016-04-21T04:21:33", "url": "https://files.pythonhosted.org/packages/16/39/283b4847a02a2cd325b5f41fbfd802090b937e24ef2e260256a1033560b3/qpic-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "080bee567c615d07787a0b53264acdd1", "sha256": "01b1058cd3cef81577a7a1b81f98ea65e91f6d0a29633834e3f7b2e7a5de4c3e" }, "downloads": -1, "filename": "qpic-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "080bee567c615d07787a0b53264acdd1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 37721, "upload_time": "2016-04-21T04:19:57", "url": "https://files.pythonhosted.org/packages/a0/b1/c898a0fb52756c1aaccf603ee415df74f4abedb1edc892f511a23f118ce8/qpic-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "90501918e8064a193de313a97eeb55ad", "sha256": "fb7fa1ba7f5365359a5662c789d11294562b53630271b02ce3ab1710589d9876" }, "downloads": -1, "filename": "qpic-1.0.2.tar.gz", "has_sig": false, "md5_digest": "90501918e8064a193de313a97eeb55ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2570572, "upload_time": "2016-04-21T04:17:06", "url": "https://files.pythonhosted.org/packages/77/f0/44018ba38eac5ad85218d5a2dda96c997cb4317d5c3e9188f84fa5f81bb8/qpic-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "080bee567c615d07787a0b53264acdd1", "sha256": "01b1058cd3cef81577a7a1b81f98ea65e91f6d0a29633834e3f7b2e7a5de4c3e" }, "downloads": -1, "filename": "qpic-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "080bee567c615d07787a0b53264acdd1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 37721, "upload_time": "2016-04-21T04:19:57", "url": "https://files.pythonhosted.org/packages/a0/b1/c898a0fb52756c1aaccf603ee415df74f4abedb1edc892f511a23f118ce8/qpic-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "90501918e8064a193de313a97eeb55ad", "sha256": "fb7fa1ba7f5365359a5662c789d11294562b53630271b02ce3ab1710589d9876" }, "downloads": -1, "filename": "qpic-1.0.2.tar.gz", "has_sig": false, "md5_digest": "90501918e8064a193de313a97eeb55ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2570572, "upload_time": "2016-04-21T04:17:06", "url": "https://files.pythonhosted.org/packages/77/f0/44018ba38eac5ad85218d5a2dda96c997cb4317d5c3e9188f84fa5f81bb8/qpic-1.0.2.tar.gz" } ] }