{ "info": { "author": "ProjectQ", "author_email": "info@projectq.ch", "bugtrack_url": null, "classifiers": [], "description": "ProjectQ - An open source software framework for quantum computing\n==================================================================\n\n.. image:: https://travis-ci.org/ProjectQ-Framework/ProjectQ.svg?branch=master\n :target: https://travis-ci.org/ProjectQ-Framework/ProjectQ\n\n.. image:: https://coveralls.io/repos/github/ProjectQ-Framework/ProjectQ/badge.svg\n :target: https://coveralls.io/github/ProjectQ-Framework/ProjectQ\n\n.. image:: https://readthedocs.org/projects/projectq/badge/?version=latest\n :target: http://projectq.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://badge.fury.io/py/projectq.svg\n :target: https://badge.fury.io/py/projectq\n \n.. image:: https://img.shields.io/badge/python-2.7%2C%203.4%2C%203.5%2C%203.6-brightgreen.svg\n\n\nProjectQ is an open source effort for quantum computing.\n\nIt features a compilation framework capable of\ntargeting various types of hardware, a high-performance quantum computer\nsimulator with emulation capabilities, and various compiler plug-ins.\nThis allows users to\n\n- run quantum programs on the IBM Quantum Experience chip\n- simulate quantum programs on classical computers\n- emulate quantum programs at a higher level of abstraction (e.g.,\n mimicking the action of large oracles instead of compiling them to\n low-level gates)\n- export quantum programs as circuits (using TikZ)\n- get resource estimates\n\nExamples\n--------\n\n**First quantum program**\n\n.. code-block:: python\n\n from projectq import MainEngine # import the main compiler engine\n from projectq.ops import H, Measure # import the operations we want to perform (Hadamard and measurement)\n\n eng = MainEngine() # create a default compiler (the back-end is a simulator)\n qubit = eng.allocate_qubit() # allocate a quantum register with 1 qubit\n\n H | qubit # apply a Hadamard gate\n Measure | qubit # measure the qubit\n\n eng.flush() # flush all gates (and execute measurements)\n print(\"Measured {}\".format(int(qubit))) # converting a qubit to int or bool gives access to the measurement result\n\n\nProjectQ features a lean syntax which is close to the mathematical notation used in quantum physics. For example, a rotation of a qubit around the x-axis is usually specified as:\n\n.. image:: docs/images/braket_notation.svg\n :alt: Rx(theta)|qubit>\n :width: 100px\n\nThe same statement in ProjectQ's syntax is:\n\n.. code-block:: python\n\n Rx(theta) | qubit\n\nThe **|**-operator separates the specification of the gate operation (left-hand side) from the quantum bits to which the operation is applied (right-hand side).\n\n**Changing the compiler and using a resource counter as a back-end**\n\nInstead of simulating a quantum program, one can use our resource counter (as a back-end) to determine how many operations it would take on a future quantum computer with a given architecture. Suppose the qubits are arranged on a linear chain and the architecture supports any single-qubit gate as well as the two-qubit CNOT and Swap operations:\n\n.. code-block:: python\n\n from projectq import MainEngine\n from projectq.backends import ResourceCounter\n from projectq.ops import QFT\n from projectq.setups import linear\n\n compiler_engines = linear.get_engine_list(num_qubits=16,\n one_qubit_gates='any',\n two_qubit_gates=(CNOT, Swap))\n resource_counter = ResourceCounter()\n eng = MainEngine(backend=resource_counter, engine_list=compiler_engines)\n qureg = eng.allocate_qureg(16)\n QFT | qureg\n eng.flush()\n\n print(resource_counter)\n\n # This will output, among other information,\n # how many operations are needed to perform\n # this quantum fourier transform (QFT), i.e.,\n # Gate class counts:\n # AllocateQubitGate : 16\n # CXGate : 240\n # HGate : 16\n # R : 120\n # Rz : 240\n # SwapGate : 262\n\n\n**Running a quantum program on IBM's QE chips**\n\nTo run a program on the IBM Quantum Experience chips, all one has to do is choose the `IBMBackend` and the corresponding compiler:\n\n.. code-block:: python\n\n compiler_engines = projectq.setups.ibm16.get_engine_list()\n eng = MainEngine(IBMBackend(use_hardware=True, num_runs=1024,\n verbose=False, device='ibmqx5'),\n engine_list=compiler_engines)\n\n\n**Classically simulate a quantum program**\n\nProjectQ has a high-performance simulator which allows simulating up to about 30 qubits on a regular laptop. See the `simulator tutorial `__ for more information. Using the emulation features of our simulator (fast classical shortcuts), one can easily emulate Shor's algorithm for problem sizes for which a quantum computer would require above 50 qubits, see our `example codes `__.\n\n\nThe advanced features of the simulator are also particularly useful to investigate algorithms for the simulation of quantum systems. For example, the simulator can evolve a quantum system in time (without Trotter errors) and it gives direct access to expectation values of Hamiltonians leading to extremely fast simulations of VQE type algorithms:\n\n.. code-block:: python\n \n from projectq import MainEngine\n from projectq.ops import All, Measure, QubitOperator, TimeEvolution\n\n eng = MainEngine()\n wavefunction = eng.allocate_qureg(2)\n # Specify a Hamiltonian in terms of Pauli operators:\n hamiltonian = QubitOperator(\"X0 X1\") + 0.5 * QubitOperator(\"Y0 Y1\")\n # Apply exp(-i * Hamiltonian * time) (without Trotter error)\n TimeEvolution(time=1, hamiltonian=hamiltonian) | wavefunction\n # Measure the expection value using the simulator shortcut:\n eng.flush()\n value = eng.backend.get_expectation_value(hamiltonian, wavefunction)\n\n # Last operation in any program should be measuring all qubits\n All(Measure) | qureg\n eng.flush()\n\n\n\nGetting started\n---------------\n\nTo start using ProjectQ, simply follow the installation instructions in the `tutorials `__. There, you will also find OS-specific hints, a small introduction to the ProjectQ syntax, and a few `code examples `__. More example codes and tutorials can be found in the examples folder `here `__ on GitHub.\n\nAlso, make sure to check out the `ProjectQ\nwebsite `__ and the detailed `code documentation `__.\n\nHow to contribute\n-----------------\n\nFor information on how to contribute, please visit the `ProjectQ\nwebsite `__ or send an e-mail to\ninfo@projectq.ch.\n\nPlease cite\n-----------\n\nWhen using ProjectQ for research projects, please cite\n\n- Damian S. Steiger, Thomas H\u00e4ner, and Matthias Troyer \"ProjectQ: An\n Open Source Software Framework for Quantum Computing\"\n `Quantum 2, 49 (2018) `__\n (published on `arXiv `__ on 23 Dec 2016)\n- Thomas H\u00e4ner, Damian S. Steiger, Krysta M. Svore, and Matthias Troyer\n \"A Software Methodology for Compiling Quantum Programs\" `Quantum Sci. Technol. 3 (2018) 020501 `__ \n (published on `arXiv `__ on 5 Apr 2016)\n\nAuthors\n-------\n\nThe first release of ProjectQ (v0.1) was developed by `Thomas\nH\u00e4ner `__\nand `Damian S.\nSteiger `__\nin the group of `Prof. Dr. Matthias\nTroyer `__ at ETH\nZurich.\n\nProjectQ is constantly growing and `many other people `__ have already contributed to it in the meantime.\n\nLicense\n-------\n\nProjectQ is released under the Apache 2 license.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.projectq.ch", "keywords": "", "license": "Apache 2", "maintainer": "", "maintainer_email": "", "name": "projectq", "package_url": "https://pypi.org/project/projectq/", "platform": "", "project_url": "https://pypi.org/project/projectq/", "project_urls": { "Homepage": "http://www.projectq.ch" }, "release_url": "https://pypi.org/project/projectq/0.4.2/", "requires_dist": null, "requires_python": "", "summary": "ProjectQ - An open source software framework for quantum computing", "version": "0.4.2" }, "last_serial": 4765555, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d3150906cdae9cccd214def87247572e", "sha256": "1801165e9a6160c9b5281f979f4fbaf8c9b8328a1a35f6493924a5df13df24c5" }, "downloads": -1, "filename": "projectq-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d3150906cdae9cccd214def87247572e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 79170, "upload_time": "2016-12-28T09:54:28", "url": "https://files.pythonhosted.org/packages/7c/3a/6814f6dd138bc2f4c771655f74fe67232511319e310561c581ddf0ce86fa/projectq-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4a70cae971a72723f5d0a0a8c07d12ae", "sha256": "886210e1f8c3cad872b0ca5725d41e440a402ce8f3bbb98184f3ccf6f7d5c946" }, "downloads": -1, "filename": "projectq-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4a70cae971a72723f5d0a0a8c07d12ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 103491, "upload_time": "2017-01-01T22:35:44", "url": "https://files.pythonhosted.org/packages/75/f2/503b5422685459436235bf87579f429cfe88c11e937281d2ade7348e613e/projectq-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f4973b3c31b49556828f13082f892d55", "sha256": "5bc2bab4e6cd7e9e332d2c8062d65e22279fa4b3e76b14bed0af0edb723be88c" }, "downloads": -1, "filename": "projectq-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f4973b3c31b49556828f13082f892d55", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 103706, "upload_time": "2017-01-03T17:23:14", "url": "https://files.pythonhosted.org/packages/e4/c6/b401ae477eb79744369b32cc76ad9707fcb4d35749c0a584dc61306611a0/projectq-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2e7b5f6d1775b8333e4c3504646cf74b", "sha256": "0b08cbe58243fdd1470fefd07b446d37c8fc69635099a73a35a302a4bb938d74" }, "downloads": -1, "filename": "projectq-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2e7b5f6d1775b8333e4c3504646cf74b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 104339, "upload_time": "2017-01-19T16:41:10", "url": "https://files.pythonhosted.org/packages/c3/fa/287d297487659e9ab04115776398926cbd5134dfcfe0f4bc1694effe317c/projectq-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4a86b28179765aef94260920e7dcce24", "sha256": "0d1f6cb949bc713ffee4efc86d0b97d7b50ca0e1e4a7d5a6bcafa00080de9441" }, "downloads": -1, "filename": "projectq-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4a86b28179765aef94260920e7dcce24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 164928, "upload_time": "2017-04-20T18:27:33", "url": "https://files.pythonhosted.org/packages/8d/64/8dbe75329561e62de53c104ab9c8cdedd7b0fee3b6a8a1475f9cd7447c0c/projectq-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "e300768599dfa1c1b2592b18fa5a4613", "sha256": "9c2219b66b3a808ce1f5c42845d98f4c4f0e14622805ebc3d5eb9c9f9b6831fa" }, "downloads": -1, "filename": "projectq-0.3.0.tar.gz", "has_sig": false, "md5_digest": "e300768599dfa1c1b2592b18fa5a4613", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 181619, "upload_time": "2017-05-05T05:28:44", "url": "https://files.pythonhosted.org/packages/6e/cb/6ab7d4c45424098292ea66493cd74990a8a046ad36cdaa50e3fef864557d/projectq-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "4a1ed0f893bd2dbf97dc1eb2afc9e458", "sha256": "ff8fad76736b09f80a65799aeb9cd16aa3c2e5cd469dc36050d95245421f4ea3" }, "downloads": -1, "filename": "projectq-0.3.1.tar.gz", "has_sig": false, "md5_digest": "4a1ed0f893bd2dbf97dc1eb2afc9e458", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 184385, "upload_time": "2017-06-13T03:52:25", "url": "https://files.pythonhosted.org/packages/03/d5/bca49b0149f36f952441c3fbbbe5b420394433f1ce55ca1d0c1e3e732f82/projectq-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "0576a3ccef6d5504d9dcc2612d82efe7", "sha256": "25460609e4bcdb65304d9388241babac6c49416d610ee9c607ebf1b4636a5910" }, "downloads": -1, "filename": "projectq-0.3.2.tar.gz", "has_sig": false, "md5_digest": "0576a3ccef6d5504d9dcc2612d82efe7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 194631, "upload_time": "2017-06-29T05:17:11", "url": "https://files.pythonhosted.org/packages/7c/bd/956f384e62ba376e98d3654d715c0ecd9bdfdeb17a9a92db3dab701c3a17/projectq-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "ab44c8efe6e9624079b95cd51e4ced23", "sha256": "6a584a81644fb57f2b306f08507232f8954dca6cc79af37a2266fd65bd616005" }, "downloads": -1, "filename": "projectq-0.3.3.tar.gz", "has_sig": false, "md5_digest": "ab44c8efe6e9624079b95cd51e4ced23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 194733, "upload_time": "2017-09-01T13:31:05", "url": "https://files.pythonhosted.org/packages/bc/d6/40467fedc83f38dcbed9cfb6f451aaa70368cc5cdc62735902bd7e1d3ccb/projectq-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "1fa4b8ec033e8066535f835728a280d2", "sha256": "64d117b8113773225c70f91e3b9f9401048655ad014bc50f69e4ddfd38dd3098" }, "downloads": -1, "filename": "projectq-0.3.4.tar.gz", "has_sig": false, "md5_digest": "1fa4b8ec033e8066535f835728a280d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 205004, "upload_time": "2017-09-11T15:20:06", "url": "https://files.pythonhosted.org/packages/36/8e/ff25a0dfcfdbc67c1d6863fd99873a1be874a35ee89e6452a241b4ef5207/projectq-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "179b88a7d7f7055797fcfc3ba7f96228", "sha256": "39aa63c5164d27c4762cdf187269f502f86120a8473a1e57214bfe2725e87871" }, "downloads": -1, "filename": "projectq-0.3.5.tar.gz", "has_sig": false, "md5_digest": "179b88a7d7f7055797fcfc3ba7f96228", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 205338, "upload_time": "2017-10-03T14:12:07", "url": "https://files.pythonhosted.org/packages/59/4d/f73664a546779bd27ebdb854d46e93043f7a07a9de79b6c2c0024cd82ac4/projectq-0.3.5.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "fcdb4ec55f1d4be590e2bb627e0e5c5d", "sha256": "9cb610679d8ca166d537386e7851fc426cf5551feaed6b66737fb05f656d28e7" }, "downloads": -1, "filename": "projectq-0.3.6.tar.gz", "has_sig": false, "md5_digest": "fcdb4ec55f1d4be590e2bb627e0e5c5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 143006, "upload_time": "2018-02-06T09:43:02", "url": "https://files.pythonhosted.org/packages/17/45/78a85a35648fde6f00dcc372779731d8b8123d9b1b12fcc80f4a89d85ac3/projectq-0.3.6.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "a4c7234bc3be760df8909a81b1c90ffc", "sha256": "d419bb8b217b8d0cb4981d173420ec0e59bc30df8c470731066a59a41d12608b" }, "downloads": -1, "filename": "projectq-0.4.tar.gz", "has_sig": false, "md5_digest": "a4c7234bc3be760df8909a81b1c90ffc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 180765, "upload_time": "2018-07-23T11:46:47", "url": "https://files.pythonhosted.org/packages/36/85/cd4a3e2f413980768508fd41ccc2ec77b924721302f2ff6fff9a4fb4b73c/projectq-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "7fff3a58c48a140f19008299d1af877f", "sha256": "0b314b33407b58d09bb66bd5b934845bceeed6678357192e376e4ecf4afa66a6" }, "downloads": -1, "filename": "projectq-0.4.1.tar.gz", "has_sig": false, "md5_digest": "7fff3a58c48a140f19008299d1af877f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 189196, "upload_time": "2018-08-26T13:59:37", "url": "https://files.pythonhosted.org/packages/95/59/1b2dfd77e1c4ed6cf18a320786f9c36cef2abeef2dc6f945d82cb9940fe6/projectq-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "1354b52a9c863f5073c13379ef598ac3", "sha256": "45a45fb51f6961754fee0cb2baabcc2969fa8c882b8288627a6bbdfe2f695717" }, "downloads": -1, "filename": "projectq-0.4.2.tar.gz", "has_sig": false, "md5_digest": "1354b52a9c863f5073c13379ef598ac3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 191158, "upload_time": "2019-01-31T21:22:36", "url": "https://files.pythonhosted.org/packages/2a/3e/138ed37bcc17a5a6903369ce22f665481685b4c66edbfeb1217e593a6f1e/projectq-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1354b52a9c863f5073c13379ef598ac3", "sha256": "45a45fb51f6961754fee0cb2baabcc2969fa8c882b8288627a6bbdfe2f695717" }, "downloads": -1, "filename": "projectq-0.4.2.tar.gz", "has_sig": false, "md5_digest": "1354b52a9c863f5073c13379ef598ac3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 191158, "upload_time": "2019-01-31T21:22:36", "url": "https://files.pythonhosted.org/packages/2a/3e/138ed37bcc17a5a6903369ce22f665481685b4c66edbfeb1217e593a6f1e/projectq-0.4.2.tar.gz" } ] }