{ "info": { "author": "Kwan-Yuet Ho", "author_email": "stephenhky@yahoo.com.hk", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: C", "Programming Language :: Cython", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: Chemistry", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Scientific/Engineering :: Physics" ], "description": "# Quantum Entanglement in Python\n\n[![Build Status](https://travis-ci.org/stephenhky/pyqentangle.svg?branch=master)](https://travis-ci.org/stephenhky/pyqentangle)\n[![GitHub release](https://img.shields.io/github/release/stephenhky/pyqentangle.svg?maxAge=3600)](https://github.com/stephenhky/pyqentangle/releases)\n\n## Version\n\nThe releases of `pyqentangle` 2.x.x is incompatible with previous releases.\n\nThe releases of `pyqentangle` 3.x.x is incompatible with previous releases.\n\n## Installation\n\nThis package can be installed using `pip`.\n\n```\n>>> pip install -U pyqentangle\n```\n\nTo use it, enter\n\n```\n>>> import pyqentangle\n>>> import numpy as np\n```\n\n## Schmidt Decomposition for Discrete Bipartite States\n\nWe first express the bipartite state in terms of a tensor. For example, if the state is `|01>+|10>`, then express it as\n\n```\n>>> tensor = np.array([[0., np.sqrt(0.5)], [np.sqrt(0.5), 0.]])\n```\n\nTo perform the Schmidt decompostion, just enter:\n\n```\n>>> pyqentangle.schmidt_decomposition(tensor)\n[(0.7071067811865476, array([ 0., -1.]), array([-1., -0.])),\n (0.7071067811865476, array([-1., 0.]), array([-0., -1.]))]\n ```\n\nFor each tuple in the returned list, the first element is the Schmidt coefficients, the second the component for first subsystem, and the third the component for the second subsystem.\n\n## Schmidt Decomposition for Continuous Bipartite States\n\nWe can perform Schmidt decomposition on continuous systems too. For example, define the following normalized wavefunction:\n\n```\n>>> fcn = lambda x1, x2: np.exp(-0.5 * (x1 + x2) ** 2) * np.exp(-(x1 - x2) ** 2) * np.sqrt(np.sqrt(8.) / np.pi)\n```\n\nThen perform the Schmidt decomposition, \n\n```\n>>> modes = pyqentangle.continuous_schmidt_decomposition(biwavefcn, -10., 10., -10., 10., keep=10)\n```\n\nwhere it describes the ranges of x1 and x2 respectively, and `keep=10` specifies only top 10 Schmidt modes are kept. Then we can read the Schmidt coefficients:\n\n```\n>>> list(map(lambda dec: dec[0], modes))\n[0.9851714310094161,\n 0.1690286950361957,\n 0.02900073920775954,\n 0.004975740210361192,\n 0.0008537020544076649,\n 0.00014647211608480773,\n 2.51306421011773e-05,\n 4.311736522272035e-06,\n 7.39777032460608e-07,\n 1.2692567250688184e-07]\n```\n\nThe second and the third elements in each tuple in the list `decompositions` are lambda functions for the modes of susbsystems A and B respectively. The Schmidt functions can be plotted:\n```\n>>> xarray = np.linspace(-10., 10., 100)\n\n plt.subplot(3, 2, 1)\n plt.plot(xarray, modes[0][1](xarray))\n plt.subplot(3, 2, 2)\n plt.plot(xarray, modes[0][2](xarray))\n\n plt.subplot(3, 2, 3)\n plt.plot(xarray, modes[1][1](xarray))\n plt.subplot(3, 2, 4)\n plt.plot(xarray, modes[1][2](xarray))\n\n plt.subplot(3, 2, 5)\n plt.plot(xarray, modes[2][1](xarray))\n plt.subplot(3, 2, 6)\n plt.plot(xarray, modes[2][2](xarray))\n```\n\n![alt](https://github.com/stephenhky/pyqentangle/raw/master/fig/three_harmonic_modes.png)\n\n\n## Useful Links\n\n* Study of Entanglement in Quantum Computers: [https://datawarrior.wordpress.com/2017/09/20/a-first-glimpse-of-rigettis-quantum-computing-cloud/](https://datawarrior.wordpress.com/2017/09/20/a-first-glimpse-of-rigettis-quantum-computing-cloud/)\n* Github page: [https://github.com/stephenhky/pyqentangle](https://github.com/stephenhky/pyqentangle)\n* PyPI page: [https://pypi.python.org/pypi/pyqentangle/](https://pypi.python.org/pypi/pyqentangle/)\n* Documentation: [http://pyqentangle.readthedocs.io/](http://pyqentangle.readthedocs.io/)\n* RQEntangle: [https://CRAN.R-project.org/package=RQEntangle](https://CRAN.R-project.org/package=RQEntangle) (corresponding R library)\n\n## Reference\n* Artur Ekert, Peter L. Knight, \"Entangled quantum systems and the Schmidt decomposition\", *Am. J. Phys.* 63, 415 (1995).\n\n## Acknowledgement\n* [Hossein Seifoory](https://ca.linkedin.com/in/hosseinseifoory?trk=public_profile_card_url)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/stephenhky/pyqentangle", "keywords": "quantum physics Schmidt decompostion entanglement", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyqentangle", "package_url": "https://pypi.org/project/pyqentangle/", "platform": "", "project_url": "https://pypi.org/project/pyqentangle/", "project_urls": { "Homepage": "https://github.com/stephenhky/pyqentangle" }, "release_url": "https://pypi.org/project/pyqentangle/3.0.1/", "requires_dist": null, "requires_python": "", "summary": "Quantum Entanglement in Python", "version": "3.0.1" }, "last_serial": 5132070, "releases": { "0.1": [], "0.11": [ { "comment_text": "", "digests": { "md5": "c73cd8f36bcb0df4bca2a900a5c267af", "sha256": "c7c3519bb7603051b5fc86600f3701a8cdaa4bedd53c4c55fc77768878bc11ab" }, "downloads": -1, "filename": "pyqentangle-0.11.tar.gz", "has_sig": false, "md5_digest": "c73cd8f36bcb0df4bca2a900a5c267af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3062, "upload_time": "2016-11-02T21:46:40", "url": "https://files.pythonhosted.org/packages/b1/54/a423c062474663f3560c0da3e5abb8574eb0144ce37ed38e77e69d39ed56/pyqentangle-0.11.tar.gz" } ], "0.12": [ { "comment_text": "", "digests": { "md5": "1dce39e2532fe9ef4bf91c8a85cdfed3", "sha256": "74f9599ec97228b7be69fe47a69ddf5157660e0a2fd50828bd13a1f6624c7934" }, "downloads": -1, "filename": "pyqentangle-0.12.tar.gz", "has_sig": false, "md5_digest": "1dce39e2532fe9ef4bf91c8a85cdfed3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3868, "upload_time": "2016-11-03T14:58:52", "url": "https://files.pythonhosted.org/packages/e9/fc/504e58188892858ddc99983f5891da2cfdb8eac0bda29a3410c86e6e31c2/pyqentangle-0.12.tar.gz" } ], "0.13": [ { "comment_text": "", "digests": { "md5": "e24c85ecdb49fb6a4dff0800aae702b2", "sha256": "79fe431c4b3ea94bf9ae0ae9080a083847eeae2be571bea6e6811553330ad9b2" }, "downloads": -1, "filename": "pyqentangle-0.13.tar.gz", "has_sig": false, "md5_digest": "e24c85ecdb49fb6a4dff0800aae702b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3969, "upload_time": "2016-11-03T15:12:43", "url": "https://files.pythonhosted.org/packages/67/09/974708f2b1d086c504c0fcb506c310b61324b6b311f41c873f93f0fa4fe7/pyqentangle-0.13.tar.gz" } ], "0.14": [ { "comment_text": "", "digests": { "md5": "c6f8ed7feee80c3c5b8663a228721a13", "sha256": "8ad18ef6a44c841d48dc62dfa7d6ce6eee5c3a845084b38d6671f34a10fce86b" }, "downloads": -1, "filename": "pyqentangle-0.14.tar.gz", "has_sig": false, "md5_digest": "c6f8ed7feee80c3c5b8663a228721a13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5230, "upload_time": "2016-11-04T21:01:04", "url": "https://files.pythonhosted.org/packages/33/d1/8a4bf93796e45fdd966407b6d83e57b8240e4f1d638ab6f0a94efca7ff71/pyqentangle-0.14.tar.gz" } ], "0.15": [ { "comment_text": "", "digests": { "md5": "78dfd78652bbebfd3392935226a7157d", "sha256": "501f656db91e0d75526d8c0af6769ab643615298f4017d443821ebb49bd42609" }, "downloads": -1, "filename": "pyqentangle-0.15.tar.gz", "has_sig": false, "md5_digest": "78dfd78652bbebfd3392935226a7157d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5263, "upload_time": "2017-09-08T13:47:53", "url": "https://files.pythonhosted.org/packages/08/e2/44ad7ffc3f50c9088eaaba0b487bf4947b9b927e64aa607fa338f1446cba/pyqentangle-0.15.tar.gz" } ], "0.16": [ { "comment_text": "", "digests": { "md5": "e13e244fd1e5d170fbe5ae6a1dc30346", "sha256": "f8cc6567e001ec61ae6032cf4a18fc3d75bd61984d8de2bea86953e4020a2437" }, "downloads": -1, "filename": "pyqentangle-0.16.tar.gz", "has_sig": false, "md5_digest": "e13e244fd1e5d170fbe5ae6a1dc30346", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5291, "upload_time": "2017-09-19T18:05:02", "url": "https://files.pythonhosted.org/packages/36/77/44671468fdb98f7b31c34069a787655652015b1b18def2952f1041988722/pyqentangle-0.16.tar.gz" } ], "0.17": [ { "comment_text": "", "digests": { "md5": "a18e8a2e0c2cf4ca0d0b9b2f0e431cd3", "sha256": "72ca0538330c33e41811ded5b4c54b234bf667d41291b4e399d9423ac0c7dc83" }, "downloads": -1, "filename": "pyqentangle-0.17.tar.gz", "has_sig": false, "md5_digest": "a18e8a2e0c2cf4ca0d0b9b2f0e431cd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5617, "upload_time": "2018-02-10T22:22:24", "url": "https://files.pythonhosted.org/packages/f4/e8/97d86d45f9c7ea7db0b2b71b9cd3f2bb038fc1d3224c0f5915582483d522/pyqentangle-0.17.tar.gz" } ], "0.18": [ { "comment_text": "", "digests": { "md5": "5aefadc423dfdd4ad0344f7f0915e3c6", "sha256": "32e58162f1c9ce303300c52754e725c94fb69be57f9e48c48ef375b3830606db" }, "downloads": -1, "filename": "pyqentangle-0.18.tar.gz", "has_sig": false, "md5_digest": "5aefadc423dfdd4ad0344f7f0915e3c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5835, "upload_time": "2018-02-14T17:03:43", "url": "https://files.pythonhosted.org/packages/0f/eb/890508c85de40bc4481c6cb47b47dd8b3757823051dd17dce0368c591143/pyqentangle-0.18.tar.gz" } ], "0.19": [ { "comment_text": "", "digests": { "md5": "1cda00bb5834c5789e1ba2fc5cd9bbcc", "sha256": "4de9a2b8c89491397a635b3fb3a9fa3ce9a6bd6faed3b1ad194e929a8b95daa7" }, "downloads": -1, "filename": "pyqentangle-0.19.tar.gz", "has_sig": false, "md5_digest": "1cda00bb5834c5789e1ba2fc5cd9bbcc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5846, "upload_time": "2018-02-22T17:14:36", "url": "https://files.pythonhosted.org/packages/ea/d4/fe4e39477e6a5e9d1902d62ed4e197a47763334c61f670a0f44c66647267/pyqentangle-0.19.tar.gz" } ], "0.20": [ { "comment_text": "", "digests": { "md5": "588a3ec811c6a42c58660c83a7a0b076", "sha256": "b6b0d02daf25500df22a450cfccfa7517dd0f30de039d2faf2c42a3c2913e5c1" }, "downloads": -1, "filename": "pyqentangle-0.20.tar.gz", "has_sig": false, "md5_digest": "588a3ec811c6a42c58660c83a7a0b076", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43738, "upload_time": "2018-03-20T15:54:34", "url": "https://files.pythonhosted.org/packages/8e/e9/3b22724e946aad9823befe47e4e2240a54389a520d59ca5b80dceb46ddfd/pyqentangle-0.20.tar.gz" } ], "0.21": [ { "comment_text": "", "digests": { "md5": "003ffaee49824759f9bdfe8b6c2087f1", "sha256": "623a882b6264aa494e21cc15c6af5bc3f2d7d95515fa2769817064d92b455af9" }, "downloads": -1, "filename": "pyqentangle-0.21.tar.gz", "has_sig": false, "md5_digest": "003ffaee49824759f9bdfe8b6c2087f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43963, "upload_time": "2018-03-20T16:01:18", "url": "https://files.pythonhosted.org/packages/c2/9a/5027ffd3fd7a3eba67a3c2f2f3a0f18b7ddc16aebefa15a2929cc729e24b/pyqentangle-0.21.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "c90d4b1d34f4192a6b1689f28af25f08", "sha256": "b3c59854783f77f0eb2feeaf53e59acb7ce6a2826608827d1eda924c281b2dc3" }, "downloads": -1, "filename": "pyqentangle-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c90d4b1d34f4192a6b1689f28af25f08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44168, "upload_time": "2018-06-21T17:49:36", "url": "https://files.pythonhosted.org/packages/af/79/e3bb354843050620bcabae10a438949b315380441c508be4aa2fd19a5226/pyqentangle-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "cd0ef1e73929b78da0b390b8b7f291d1", "sha256": "c7f1f0b1a6516814a183a0a4f37d6d4d841cb31861628e0fa939e3aa4e3a67ee" }, "downloads": -1, "filename": "pyqentangle-1.0.1.tar.gz", "has_sig": false, "md5_digest": "cd0ef1e73929b78da0b390b8b7f291d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 83702, "upload_time": "2018-06-26T16:41:36", "url": "https://files.pythonhosted.org/packages/d0/66/60761780659b7f5062d34076573e99f4624ded5a214d72b429eb321aed50/pyqentangle-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "891a434048afc1fb5065d75866eab131", "sha256": "02de0dddac44dbdafb564fb5f050b66904325a97bc76acd3c583ec1c6be96124" }, "downloads": -1, "filename": "pyqentangle-1.0.2.tar.gz", "has_sig": false, "md5_digest": "891a434048afc1fb5065d75866eab131", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 120601, "upload_time": "2018-07-20T20:16:19", "url": "https://files.pythonhosted.org/packages/67/69/865de01f41e71736b33c64e338ff99b28a2e42ef1e0f0d4c6bd38169f078/pyqentangle-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "b423884b22bc69fa51766b20867d1d11", "sha256": "7f3726efda925f2ded40c31f57c371c79f021f24fc06fea916e408f94e59ef9a" }, "downloads": -1, "filename": "pyqentangle-1.0.3.tar.gz", "has_sig": false, "md5_digest": "b423884b22bc69fa51766b20867d1d11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 120706, "upload_time": "2018-07-23T16:35:41", "url": "https://files.pythonhosted.org/packages/5e/d4/0a7c238f3488fcf1be34c5a2005142a3a0a2ecf5f1e8c2601ff9d9f3e06c/pyqentangle-1.0.3.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "702291ae25a0f95c27688443efa381fa", "sha256": "2c24c9fb9969cfd44c1cde655d0b407ccc2f1ad4369e9a6145b5097caed58b0a" }, "downloads": -1, "filename": "pyqentangle-1.1.0.tar.gz", "has_sig": false, "md5_digest": "702291ae25a0f95c27688443efa381fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 120661, "upload_time": "2018-08-02T20:57:18", "url": "https://files.pythonhosted.org/packages/db/e9/08bc6ce44ff93b7d532a5430c2548e699e6a8082e82f23570c7694e6c436/pyqentangle-1.1.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "33fb9be108c15360ee22de367316429a", "sha256": "48fe99879d159f82cc1e2cc95f290a2b860456254d91e6a77a314d605a280f1a" }, "downloads": -1, "filename": "pyqentangle-2.0.0.tar.gz", "has_sig": false, "md5_digest": "33fb9be108c15360ee22de367316429a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160219, "upload_time": "2019-01-04T23:24:34", "url": "https://files.pythonhosted.org/packages/d6/81/2ca80cb5c37c28df3bea157e0efc9ac7f596ae87e7aa3c4dc96969873c66/pyqentangle-2.0.0.tar.gz" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "8dc653acc08883342a37b9b054742295", "sha256": "11ec02b67649902ceda5f243545ef8cfd2afbab2ea23e3e4472eb3fcaf5f23a8" }, "downloads": -1, "filename": "pyqentangle-3.0.0.tar.gz", "has_sig": false, "md5_digest": "8dc653acc08883342a37b9b054742295", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160392, "upload_time": "2019-04-09T04:10:42", "url": "https://files.pythonhosted.org/packages/9d/98/d657f39c65555cd4518de4d47ee3786c82b9e6a5c4c261fb4f484d1722f0/pyqentangle-3.0.0.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "4f32ecf28ddae70f7c0ab9a10309697c", "sha256": "3f47abd4736fdd09edd37f64367c4a8656c23300fd94dbd2fff1adb93e1ee1e6" }, "downloads": -1, "filename": "pyqentangle-3.0.1.tar.gz", "has_sig": false, "md5_digest": "4f32ecf28ddae70f7c0ab9a10309697c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160916, "upload_time": "2019-04-12T04:05:53", "url": "https://files.pythonhosted.org/packages/20/4f/57c1114f52275d2460a45a312b1a312689c7c03a71847a01882eff230e34/pyqentangle-3.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4f32ecf28ddae70f7c0ab9a10309697c", "sha256": "3f47abd4736fdd09edd37f64367c4a8656c23300fd94dbd2fff1adb93e1ee1e6" }, "downloads": -1, "filename": "pyqentangle-3.0.1.tar.gz", "has_sig": false, "md5_digest": "4f32ecf28ddae70f7c0ab9a10309697c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160916, "upload_time": "2019-04-12T04:05:53", "url": "https://files.pythonhosted.org/packages/20/4f/57c1114f52275d2460a45a312b1a312689c7c03a71847a01882eff230e34/pyqentangle-3.0.1.tar.gz" } ] }