{ "info": { "author": "David Amaro", "author_email": "davamaro@hotmail.es", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# StabGraph\n\nEvery stabilizer state can be transformed into a graph state by means of a local \nClifford unitary. stabgraph is contains the function `convert` that, given a \nstabilizer state, it finds such a graph state and the local Clifford unitary \nthat transforms the stabilizer state into the graph state. This function follows\nthe steps described in the article [1].\n\n[1] Manuscript under preparation. \n\n## Installation\n\nTo install using [pip](https://pip.pypa.io/en/stable/):\n\n```bash\npython -m pip install --upgrade pip\npython -m pip install stabgraph\n```\n\nReplace `python` with `python3` as appropriate.\n\n\n## Usage\n\n```python\nimport stabgraph\n\nG , c , t , z , R = stabgraph.convert(stabs,control=None,target=None,shuffle=False) \n```\n\nINPUT\n\n`stabs` contains the N stabilizer operators defining a stabilizer state of N \n qubits. It is a list of N strings 'PPPP...', one for each stabilizer \n operator. Every string has N elements 'P' from the set 'I', 'X', 'Y', \n 'Z', that represents the set of Pauli matrices.\n\nOPTIONAL INPUTS\n\n`control` is a list of control qubits. Gives the option to set some qubits as \n control qubits. Qubits are labelled from 0 to N-1. It is an empy list by\n default.\n\n`target` is a list of target qubits. Gives the option to set some qubits as\n target qubits. Qubits are labelled from 0 to N-1. It is an empty list by\n default.\n\n`shuffle` can be set to be True. For a given stabilizer state there are multiple \n local Clifford equivalent graph states that can be obtained by this \n program. If shuffle=True the output graph is one of these graphs chosen \n randomly. shuffle=False by default.\n\nOUTPUTS\n\n`G` adjacency matrix defining the underlying graph of the graph state. It is\n a NxN numpy array composed by 0 and 1.\n\n`c` list of control qubits labelled from 0 to N-1. The program completes the\n list of control qubits given as an input.\n\n`t` list of target qubits labelled from 0 to N-1. The program completes the\n list of target qubits given as an input. A Hadamard gate is applied on\n every target qubit.\n\n`z` list of control qubits labelled from 0 to N-1 where a pi/2 z-rotation is\n applied.\n\n`R` invertible binary matrix representing the recombination of stabilizers\n performed to obtain the stabilizers of the graph state. It is a NxN \n numpy array composed of 0 and 1.\n\nEXAMPLES\n\nBell pair\n```\n>>> stabs = ['XX','ZZ']\n>>> G , c , t , z , R = stabgraph.convert(stabs)\n>>> G\nnp.array([[0,1],[1,0]])\n>>> c\n[0]\n>>> t\n[1]\n>>> z\n[]\n>>> R\nnp.array([[1,0],[0,1]])\n```\n\nGHZ state fixing 0 as a control qubit and 1 as a target qubit\n```\n>>> stabs = ['XXX','ZZI','IZZ']\n>>> G , c , t , z , R = stabgraph.convert(stabs,[0],[1])\n>>> c\n[0]\n>>> t\n[1,2]\n```\n\nSteane code in the |0> logical state. \nMultiple graphs can be obtained, so put `shuffle=True` to obtain one of them randomly chosen.\nThe result respects the selection of control and target qubits\n```\n>>> stabs = ['XXXXIII','IXXIXXI','IIXXIXX','ZZZZIII','IZZIZZI','IIZZIZZ','ZZZZZZZ']\n>>> G , c , t , z , R = stabgraph.convert(stabs, control = [0], shuffle=True)\n>>> c\n[0,1,2]\n>>> G , c , t , z , R = stabgraph.convert(stabs, control = [2, 5], shuffle=True)\n>>> c\n[2,5,6]\n\n```\n\n## Citation\n```\n@misc{amaro2019,\n author = \t\"David Amaro\",\n title = \t\"StabGraph\",\n year = \t\"2019\",\n month = \"July\",\n publisher = {GitHub},\n journal = {GitHub repository},\n howpublished = {\\url{https://github.com/davamaro/stabgraph}}\n}\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/davamaro/stabgraph/archive/0.1.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "stabilizer graph local clifford", "license": "Apache 2", "maintainer": "", "maintainer_email": "", "name": "stabgraph", "package_url": "https://pypi.org/project/stabgraph/", "platform": "", "project_url": "https://pypi.org/project/stabgraph/", "project_urls": { "Download": "https://github.com/davamaro/stabgraph/archive/0.1.zip" }, "release_url": "https://pypi.org/project/stabgraph/0.1.2/", "requires_dist": [ "numpy" ], "requires_python": ">=3.5", "summary": "Transforms stabilizer state into graph state", "version": "0.1.2" }, "last_serial": 5462658, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "01c004bf3e2e49c8f0a697c3a4654656", "sha256": "f9e018b82928c725c85f65bd3128b644a72b9c9d557276f3a1fc24ec213af836" }, "downloads": -1, "filename": "stabgraph-0.1.tar.gz", "has_sig": false, "md5_digest": "01c004bf3e2e49c8f0a697c3a4654656", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 9029, "upload_time": "2019-06-28T16:49:39", "url": "https://files.pythonhosted.org/packages/40/83/c96b8e948e0268f3bf3077cefc603310f14d3337fffe5cf34b72c492cfc0/stabgraph-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a2afcc9b96bac257eba5e86a7024f0e2", "sha256": "e37112991fbf1a657a8a39839c6b58d1f9f075e371cf03c69e467e5afbb6ee3b" }, "downloads": -1, "filename": "stabgraph-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a2afcc9b96bac257eba5e86a7024f0e2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 10106, "upload_time": "2019-06-28T17:10:10", "url": "https://files.pythonhosted.org/packages/f2/d3/592bb10706c5aff1cae7137eabe2d8c98fd6022c42838c0667beefa2777f/stabgraph-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6d13329b4cc2b26d97207cbba99d6ba8", "sha256": "c8346c7160cc7debe1e865815d017a419249ca157099d76e0d561128a880549a" }, "downloads": -1, "filename": "stabgraph-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6d13329b4cc2b26d97207cbba99d6ba8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 9360, "upload_time": "2019-06-28T17:10:12", "url": "https://files.pythonhosted.org/packages/d5/a8/39297c8fdbbd649478edfa94c67d152a8f8025ad633e39f1677ca8cd4d23/stabgraph-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5e117a45d163a4025a00d8366fd8e7e4", "sha256": "2444ff62fa59ae9271645c3d68f7f7f8c1968e6f9867775eabd59e92e9680893" }, "downloads": -1, "filename": "stabgraph-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e117a45d163a4025a00d8366fd8e7e4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 10087, "upload_time": "2019-06-28T17:18:34", "url": "https://files.pythonhosted.org/packages/1d/69/802b29dd694c24375a730e1770fb1ab60118a3da8308900c36adb488e42e/stabgraph-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "585e89667bf24e4b52cd5f19c9df00cc", "sha256": "1d2f57b519d5b0095468bafc2d0bf8f009e5e93d95510b552c266754b43a0198" }, "downloads": -1, "filename": "stabgraph-0.1.2.tar.gz", "has_sig": false, "md5_digest": "585e89667bf24e4b52cd5f19c9df00cc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 9359, "upload_time": "2019-06-28T17:18:36", "url": "https://files.pythonhosted.org/packages/91/e9/e61cc256f9164f51fc2216b983081a5116cef4f6a9269c789a936c64533d/stabgraph-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5e117a45d163a4025a00d8366fd8e7e4", "sha256": "2444ff62fa59ae9271645c3d68f7f7f8c1968e6f9867775eabd59e92e9680893" }, "downloads": -1, "filename": "stabgraph-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e117a45d163a4025a00d8366fd8e7e4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 10087, "upload_time": "2019-06-28T17:18:34", "url": "https://files.pythonhosted.org/packages/1d/69/802b29dd694c24375a730e1770fb1ab60118a3da8308900c36adb488e42e/stabgraph-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "585e89667bf24e4b52cd5f19c9df00cc", "sha256": "1d2f57b519d5b0095468bafc2d0bf8f009e5e93d95510b552c266754b43a0198" }, "downloads": -1, "filename": "stabgraph-0.1.2.tar.gz", "has_sig": false, "md5_digest": "585e89667bf24e4b52cd5f19c9df00cc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 9359, "upload_time": "2019-06-28T17:18:36", "url": "https://files.pythonhosted.org/packages/91/e9/e61cc256f9164f51fc2216b983081a5116cef4f6a9269c789a936c64533d/stabgraph-0.1.2.tar.gz" } ] }