{ "info": { "author": "caoyudong", "author_email": "yudong@zapatacomputing.com", "bugtrack_url": null, "classifiers": [], "description": "\n# QClassify\n\n\n## Description\n\nQClassify is a Python framework for implementing variational quantum classifiers. The goal is to provide a generally customizable way of performing classification tasks using gate-model quantum devices. The quantum devices can be either simulated by a quantum simulator or a cloud-based quantum processor accessible via Rigetti Computing's [Quantum Cloud Services](https://www.rigetti.com/qcs).\n\nVariational quantum classification is a paradigm of supervised quantum machine learning that has been investigated actively in the quantum computing community (See for instance [Farhi and Neven](https://arxiv.org/abs/1802.06002), [Schuld et al.](https://arxiv.org/abs/1804.00633), [Mitarai et al.](https://arxiv.org/abs/1803.00745) and [Havlicek et al.](https://arxiv.org/abs/1804.11326)). The general framework adopted in the design of QClassify follows from these contributions in the literature. The workflow can be summarized in Figure 1 below. \n\n![Flow chart](https://github.com/zapatacomputing/QClassify/blob/master/images/qclassify.png)\n*Figure 1: Diagram illustrating the workflow of QClassify. Each rectangle represents a data object and each oval represents a method.* \n\n\n\n## Main Components\n\nThe main data structure describing the quantum classifier setting is in `qclassifier.py`. The implementation allows for modular design of the following components of a quantum classifier (Figure 1): \n\n1. **Encoder**: transforms a classical data vector into a quantum state. See `encoder.py`.\n\n + 1.1 **Classical preprocessor**: maps an input data vector to circuit parameters. See `preprocessing.py`.\n\n + 1.2 **Quantum state preparation**: applies the parametrized circuit to an all-zero input state to generate a quantum state encoding the input data. See `encoding_circ.py`.\n\n2. **Processor**: extracts classical information from the encoded quantum state. See `processor.py`.\n\n + 2.1 **Quantum state transformation**: applies a parametrized circuit to the encoded quantum state to transform it into a form more amenable for information extraction by measurement and classical postprocessing. See `proc_circ.py`.\n\n + 2.2 **Information extraction**: extract classical information from the output quantum state. See `postprocessing.py`.\n\n - 2.2.1 **Measurement**: repeatedly run the quantum circuit, perform measurements and collect measurement statistics\n\n - 2.2.2 **Classical postprocessing**: Glean information from the measurement statistics and produce the output label of the quantum classifier.\n\n\n\n## Installation\n\nTo install QClassify using ``pip``:\n\n\n\tpip install qclassify\n\n\nTry executing ``import qclassify`` to test the installation in your terminal.\n\n\nTo instead install QClassify from source, clone this repository, ``cd`` into it, and run:\n\n\tgit clone https://github.com/zapatacomputing/QClassify\n\tcd QClassify\n\tpython -m pip install -e .\n\nNote that the pyQuil version used requires Python 3.6 or later. For installation on a user QMI, please click [here](https://github.com/hsim13372/QCompress/blob/master/qmi_instructions.rst).\n\n\n## Examples\n\n\nWe provide a Jupyter notebook to demonstrate the utility of QClassify. \n\nNotebook | Feature(s)\n---------|---------------\n [qclassify_demo.ipynb](https://github.com/zapatacomputing/QClassify/blob/master/examples/qclassify_demo.ipynb) | Uses a simple two-qubit circuit to learn the XOR dataset. \n\n\n## Disclaimer\n\nWe note that there is a lot of room for improvement and fixes. Please feel free to submit issues and/or pull requests!\n\n\n## How to cite\n\nWhen using QClassify for research projects, please cite:\n\n>\tSukin Sim, Yudong Cao, Jonathan Romero, Peter D. Johnson and Al\u00e1n Aspuru-Guzik.\n\t*A framework for algorithm deployment on cloud-based quantum computers*.\n\t[arXiv:1810.10576](https://arxiv.org/abs/1810.10576). 2018.\n\n\n## Authors\n\n[Yudong Cao](https://github.com/yudongcao),\n[Sukin (Hannah) Sim](https://github.com/hsim13372) (Harvard)\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zapatacomputing/QClassify", "keywords": "", "license": "Apache-2.0", "maintainer": "", "maintainer_email": "", "name": "qclassify", "package_url": "https://pypi.org/project/qclassify/", "platform": "", "project_url": "https://pypi.org/project/qclassify/", "project_urls": { "Homepage": "https://github.com/zapatacomputing/QClassify" }, "release_url": "https://pypi.org/project/qclassify/0.0.1.dev0/", "requires_dist": [ "jupyter", "pyquil (>=2.0.0b1)", "matplotlib", "scipy" ], "requires_python": ">=3.6", "summary": "A Python framework for the variational quantum classifier", "version": "0.0.1.dev0" }, "last_serial": 4487393, "releases": { "0.0.1.dev0": [ { "comment_text": "", "digests": { "md5": "93c7955a0a0c90cacd2f869fe475fef9", "sha256": "f0b2debc0a74078af0fe8241abbe38d0691da63a4312224f63e1996a37b5ff93" }, "downloads": -1, "filename": "qclassify-0.0.1.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "93c7955a0a0c90cacd2f869fe475fef9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 16412, "upload_time": "2018-11-14T22:31:56", "url": "https://files.pythonhosted.org/packages/38/a4/a943c9dc014b3bf62cdbc7b4ec83065884eb18f8cabbf0a102600fc2b4ff/qclassify-0.0.1.dev0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6cac48673754305155ebfa51b21ef585", "sha256": "3a0fdad7b6763ace217c6d37afca15843bfc101c075248b8a7a3c349970607ba" }, "downloads": -1, "filename": "qclassify-0.0.1.dev0.tar.gz", "has_sig": false, "md5_digest": "6cac48673754305155ebfa51b21ef585", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12120, "upload_time": "2018-11-14T22:31:58", "url": "https://files.pythonhosted.org/packages/8d/0c/247ad921a7f2b78f9439f6f0677105b8462e72f5c56b5776e1aed9e7a9cb/qclassify-0.0.1.dev0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "93c7955a0a0c90cacd2f869fe475fef9", "sha256": "f0b2debc0a74078af0fe8241abbe38d0691da63a4312224f63e1996a37b5ff93" }, "downloads": -1, "filename": "qclassify-0.0.1.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "93c7955a0a0c90cacd2f869fe475fef9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 16412, "upload_time": "2018-11-14T22:31:56", "url": "https://files.pythonhosted.org/packages/38/a4/a943c9dc014b3bf62cdbc7b4ec83065884eb18f8cabbf0a102600fc2b4ff/qclassify-0.0.1.dev0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6cac48673754305155ebfa51b21ef585", "sha256": "3a0fdad7b6763ace217c6d37afca15843bfc101c075248b8a7a3c349970607ba" }, "downloads": -1, "filename": "qclassify-0.0.1.dev0.tar.gz", "has_sig": false, "md5_digest": "6cac48673754305155ebfa51b21ef585", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12120, "upload_time": "2018-11-14T22:31:58", "url": "https://files.pythonhosted.org/packages/8d/0c/247ad921a7f2b78f9439f6f0677105b8462e72f5c56b5776e1aed9e7a9cb/qclassify-0.0.1.dev0.tar.gz" } ] }