openqaoa


Nameopenqaoa JSON
Version 0.2.5 PyPI version JSON
download
home_pagehttps://github.com/entropicalabs/openqaoa
SummaryOpenQAOA is a python open-source multi-backend Software Development Kit to create, customise and execute the Quantum Approximate Optimisation Algorithm (QAOA) on Noisy Intermediate-Scale Quantum (NISQ) devices, and simulators
upload_time2023-12-20 15:43:40
maintainer
docs_urlNone
authorEntropica Labs
requires_python>=3.8, <3.11
licenseMIT
keywords quantum optimisation sdk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            <div align="center">

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://github.com/entropicalabs/openqaoa/blob/main/.github/images/openqaoa_logo_offW.png" width="650">
  <img alt="OpenQAOA" src="https://github.com/entropicalabs/openqaoa/blob/main/.github/images/openqaoa_logo.png" width="650">
</picture>

  [![build test](https://github.com/entropicalabs/openqaoa/actions/workflows/test_main_linux.yml/badge.svg)](https://github.com/entropicalabs/openqaoa/actions/workflows/test_main_linux.yml)<!-- Tests (GitHub actions) -->
  [![Documentation Status](https://readthedocs.org/projects/el-openqaoa/badge/?version=latest)](https://el-openqaoa.readthedocs.io/en/latest/?badge=latest) <!-- Readthedocs -->
  [![PyPI version](https://badge.fury.io/py/openqaoa.svg)](https://badge.fury.io/py/openqaoa) <!-- PyPI -->
  [![arXiv](https://img.shields.io/badge/arXiv-2210.08695-<COLOR>.svg)](https://arxiv.org/abs/2210.08695) <!-- arXiv -->
  [![License](https://img.shields.io/pypi/l/openqaoa)](LICENSE.md)<!-- License -->
  [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)<!-- Covenant Code of conduct -->
  [![Downloads](https://pepy.tech/badge/openqaoa)](https://pepy.tech/project/openqaoa)
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/entropicalabs/openqaoa.git/main?labpath=%2Fexamples)
  [![Discord](https://img.shields.io/discord/991258119525122058)](https://discord.gg/ana76wkKBd)
  [![Website](https://img.shields.io/badge/OpenQAOA-Website-blueviolet)](https://openqaoa.entropicalabs.com/) 
</div>

# OpenQAOA

A multi-backend python library for quantum optimization using QAOA on Quantum computers and Quantum computer simulators. Check out the OpenQAOA website at [https://openqaoa.entropicalabs.com/](https://openqaoa.entropicalabs.com/)
 
**OpenQAOA is currently in OpenBeta.**

Please, consider [joining our discord](https://discord.gg/ana76wkKBd) if you want to be part of our community and participate in the OpenQAOA's development. 

## Installation instructions

OpenQAOA is divided into separately installable plugins based on the requirements of the user. The core elements of the package are placed in `openqaoa-core` which comes pre-installed with each flavour of OpenQAOA. 

Currently, OpenQAOA supports the following backends and each can be installed exclusively with the exception of `openqaoa-azure` which installs `openqaoa-qiskit` as an additional requirement because Azure backends support circuit submissions via `qiskit`.
- `openqaoa-braket` for AWS Braket
- `openqaoa-azure` for Microsoft Azure Quantum
- `openqaoa-pyquil` for Rigetti Pyquil
- `openqaoa-qiskit` for IBM Qiskit

The OpenQAOA metapackage, `openqaoa` allows you to install all OpenQAOA plug-ins together.
### Install via PyPI
You can install the latest version of OpenQAOA directly from PyPI. First, create a virtual environment with python3.8, 3.9, 3.10 and then pip install openqaoa with the following command
```
pip install openqaoa
```
### Install via git clone
Alternatively, you can install OpenQAOA manually from the GitHub repository by following the instructions below. 

**NOTE:** We recommend creating a python virtual environment for this project using a python environment manager, for instance Anaconda. Instructions can be found [here](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands). Make sure to use **python 3.8** (or newer) for the environment.
1. Clone the git repository:
```
git clone https://github.com/entropicalabs/openqaoa.git
```
2. After cloning the repository `cd openqaoa` and pip install the package with instructions from the Makefile as follows
```
make local-install
```

### Installation instructions for Developers
Users can install OpenQAOA in the developer mode via the Makefile. For a clean editable install of the package run the following command from the `openqaoa` folder.
```
make dev-install
```
The package can be installed as an editable with extra requirements defined in the `setup.py`. If you would like to install the extra requirements to be able run the tests module or generate the docs, you can run the following

```
make dev-install-x,   with x = {tests, docs, all}
```
Should you face any issue during the installation, please drop us an email at openqaoa@entropicalabs.com or open an issue!

## Getting started

The API documentation for OpenQAOA can be found [here](https://el-openqaoa.readthedocs.io/en/latest/). We also provide a set of tutorials to get you started. Among the many, perhaps you can get started with the following ones:

- [Run your first OpenQAOA workflow](https://el-openqaoa.readthedocs.io/en/latest/notebooks/01_workflows_example.html)
- [How about trying some RQAOA for a change?](https://el-openqaoa.readthedocs.io/en/latest/notebooks/09_RQAOA_example.html)
- [Introducing EL's fast QAOA simulator](https://el-openqaoa.readthedocs.io/en/latest/notebooks/06_fast_qaoa_simulator.html)
- [Discover OpenQAOA's custom parametrizations](https://el-openqaoa.readthedocs.io/en/latest/notebooks/05_advanced_parameterization.html)

### Key Features

- **Build advanced QAOAs**. Create complex QAOAs by specifying custom _parametrisation_, _mixer hamiltonians_, _classical optimisers_ and execute the algorithm on either simulators or QPUs.

- **Recursive QAOA**. Run RQAOA with fully customisable schedules on simulators and QPUs alike. 

- **QPU access**. Built in access for `IBM Quantum`, `Rigetti QCS`, `Amazon Braket` and `Azure Quantum`.


### Available devives 

Devices are serviced both locally and on the cloud. For the IBM Quantum experience, the available devices depend on the specified credentials. For QCS and Amazon Braket, the available devices are listed in the table below:

| Device location | Device Name |
| --------------- | ----------- |
| local | `['qiskit.shot_simulator', 'qiskit.statevector_simulator', 'vectorized', 'pyquil.statevector_simulator']`  |
| [Amazon Braket](https://docs.aws.amazon.com/braket/latest/developerguide/braket-devices.html)    | IonQ, Rigetti, OQC, and simulators |
| [IBMQ](https://quantum-computing.ibm.com/)    | Please check the IBMQ backends available to your account |
| [Rigetti QCS](https://qcs.rigetti.com/sign-in)     | Aspen-11, Aspen-M-1, and QVM simulator |
| [Azure](https://azure.microsoft.com/en-us/products/quantum) | IonQ, Quantinuum, Rigetti, QCI |

## Running the tests

To run the unit-tests, first, make sure to have installed all the optional testing dependencies by running `make dev-install-tests`. Next type `pytest tests/ /src/*/tests/` from the project's root folder. This runs the common metapackage unit-tests and the unit-tests for each OpenQAOA plugin.

:warning: **Some tests require authentication**: Please, check the flags in `pytest.ini`. Currently these testes are marked `qpu`, `api`, `docker_aws`, `braket_api`, `sim`

:warning: **Some tests require authentication**: Please, note that the PyQuil-Rigetti tests contained in `test_pyquil_qvm.py` requires an active `qvm` (see Rigetti's documentation [here](https://pyquil-docs.rigetti.com/en/v3.1.0/qvm.html))
     
## Contributing and feedback

If you find any bugs or errors, have feature requests, or code you would like to contribute, feel free to open an issue or send us a pull request on GitHub.

We are always interested to hear about projects built with OpenQAOA. If you have an application you'd like to tell us about, drop us an email at [openqaoa@entropicalabs.com](mailto:openqaoa@entropicalabs.com)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/entropicalabs/openqaoa",
    "name": "openqaoa",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8, <3.11",
    "maintainer_email": "",
    "keywords": "quantum optimisation SDK",
    "author": "Entropica Labs",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/e7/59/a86d991971479d4a2e4fbaf0e2945795f66ad65c76bb790dcd4a30fdcdb7/openqaoa-0.2.5.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/entropicalabs/openqaoa/blob/main/.github/images/openqaoa_logo_offW.png\" width=\"650\">\n  <img alt=\"OpenQAOA\" src=\"https://github.com/entropicalabs/openqaoa/blob/main/.github/images/openqaoa_logo.png\" width=\"650\">\n</picture>\n\n  [![build test](https://github.com/entropicalabs/openqaoa/actions/workflows/test_main_linux.yml/badge.svg)](https://github.com/entropicalabs/openqaoa/actions/workflows/test_main_linux.yml)<!-- Tests (GitHub actions) -->\n  [![Documentation Status](https://readthedocs.org/projects/el-openqaoa/badge/?version=latest)](https://el-openqaoa.readthedocs.io/en/latest/?badge=latest) <!-- Readthedocs -->\n  [![PyPI version](https://badge.fury.io/py/openqaoa.svg)](https://badge.fury.io/py/openqaoa) <!-- PyPI -->\n  [![arXiv](https://img.shields.io/badge/arXiv-2210.08695-<COLOR>.svg)](https://arxiv.org/abs/2210.08695) <!-- arXiv -->\n  [![License](https://img.shields.io/pypi/l/openqaoa)](LICENSE.md)<!-- License -->\n  [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)<!-- Covenant Code of conduct -->\n  [![Downloads](https://pepy.tech/badge/openqaoa)](https://pepy.tech/project/openqaoa)\n  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/entropicalabs/openqaoa.git/main?labpath=%2Fexamples)\n  [![Discord](https://img.shields.io/discord/991258119525122058)](https://discord.gg/ana76wkKBd)\n  [![Website](https://img.shields.io/badge/OpenQAOA-Website-blueviolet)](https://openqaoa.entropicalabs.com/) \n</div>\n\n# OpenQAOA\n\nA multi-backend python library for quantum optimization using QAOA on Quantum computers and Quantum computer simulators. Check out the OpenQAOA website at [https://openqaoa.entropicalabs.com/](https://openqaoa.entropicalabs.com/)\n \n**OpenQAOA is currently in OpenBeta.**\n\nPlease, consider [joining our discord](https://discord.gg/ana76wkKBd) if you want to be part of our community and participate in the OpenQAOA's development. \n\n## Installation instructions\n\nOpenQAOA is divided into separately installable plugins based on the requirements of the user. The core elements of the package are placed in `openqaoa-core` which comes pre-installed with each flavour of OpenQAOA. \n\nCurrently, OpenQAOA supports the following backends and each can be installed exclusively with the exception of `openqaoa-azure` which installs `openqaoa-qiskit` as an additional requirement because Azure backends support circuit submissions via `qiskit`.\n- `openqaoa-braket` for AWS Braket\n- `openqaoa-azure` for Microsoft Azure Quantum\n- `openqaoa-pyquil` for Rigetti Pyquil\n- `openqaoa-qiskit` for IBM Qiskit\n\nThe OpenQAOA metapackage, `openqaoa` allows you to install all OpenQAOA plug-ins together.\n### Install via PyPI\nYou can install the latest version of OpenQAOA directly from PyPI. First, create a virtual environment with python3.8, 3.9, 3.10 and then pip install openqaoa with the following command\n```\npip install openqaoa\n```\n### Install via git clone\nAlternatively, you can install OpenQAOA manually from the GitHub repository by following the instructions below. \n\n**NOTE:** We recommend creating a python virtual environment for this project using a python environment manager, for instance Anaconda. Instructions can be found [here](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands). Make sure to use **python 3.8** (or newer) for the environment.\n1. Clone the git repository:\n```\ngit clone https://github.com/entropicalabs/openqaoa.git\n```\n2. After cloning the repository `cd openqaoa` and pip install the package with instructions from the Makefile as follows\n```\nmake local-install\n```\n\n### Installation instructions for Developers\nUsers can install OpenQAOA in the developer mode via the Makefile. For a clean editable install of the package run the following command from the `openqaoa` folder.\n```\nmake dev-install\n```\nThe package can be installed as an editable with extra requirements defined in the `setup.py`. If you would like to install the extra requirements to be able run the tests module or generate the docs, you can run the following\n\n```\nmake dev-install-x,   with x = {tests, docs, all}\n```\nShould you face any issue during the installation, please drop us an email at openqaoa@entropicalabs.com or open an issue!\n\n## Getting started\n\nThe API documentation for OpenQAOA can be found [here](https://el-openqaoa.readthedocs.io/en/latest/). We also provide a set of tutorials to get you started. Among the many, perhaps you can get started with the following ones:\n\n- [Run your first OpenQAOA workflow](https://el-openqaoa.readthedocs.io/en/latest/notebooks/01_workflows_example.html)\n- [How about trying some RQAOA for a change?](https://el-openqaoa.readthedocs.io/en/latest/notebooks/09_RQAOA_example.html)\n- [Introducing EL's fast QAOA simulator](https://el-openqaoa.readthedocs.io/en/latest/notebooks/06_fast_qaoa_simulator.html)\n- [Discover OpenQAOA's custom parametrizations](https://el-openqaoa.readthedocs.io/en/latest/notebooks/05_advanced_parameterization.html)\n\n### Key Features\n\n- **Build advanced QAOAs**. Create complex QAOAs by specifying custom _parametrisation_, _mixer hamiltonians_, _classical optimisers_ and execute the algorithm on either simulators or QPUs.\n\n- **Recursive QAOA**. Run RQAOA with fully customisable schedules on simulators and QPUs alike. \n\n- **QPU access**. Built in access for `IBM Quantum`, `Rigetti QCS`, `Amazon Braket` and `Azure Quantum`.\n\n\n### Available devives \n\nDevices are serviced both locally and on the cloud. For the IBM Quantum experience, the available devices depend on the specified credentials. For QCS and Amazon Braket, the available devices are listed in the table below:\n\n| Device location | Device Name |\n| --------------- | ----------- |\n| local | `['qiskit.shot_simulator', 'qiskit.statevector_simulator', 'vectorized', 'pyquil.statevector_simulator']`  |\n| [Amazon Braket](https://docs.aws.amazon.com/braket/latest/developerguide/braket-devices.html)    | IonQ, Rigetti, OQC, and simulators |\n| [IBMQ](https://quantum-computing.ibm.com/)    | Please check the IBMQ backends available to your account |\n| [Rigetti QCS](https://qcs.rigetti.com/sign-in)     | Aspen-11, Aspen-M-1, and QVM simulator |\n| [Azure](https://azure.microsoft.com/en-us/products/quantum) | IonQ, Quantinuum, Rigetti, QCI |\n\n## Running the tests\n\nTo run the unit-tests, first, make sure to have installed all the optional testing dependencies by running `make dev-install-tests`. Next type `pytest tests/ /src/*/tests/` from the project's root folder. This runs the common metapackage unit-tests and the unit-tests for each OpenQAOA plugin.\n\n:warning: **Some tests require authentication**: Please, check the flags in `pytest.ini`. Currently these testes are marked `qpu`, `api`, `docker_aws`, `braket_api`, `sim`\n\n:warning: **Some tests require authentication**: Please, note that the PyQuil-Rigetti tests contained in `test_pyquil_qvm.py` requires an active `qvm` (see Rigetti's documentation [here](https://pyquil-docs.rigetti.com/en/v3.1.0/qvm.html))\n     \n## Contributing and feedback\n\nIf you find any bugs or errors, have feature requests, or code you would like to contribute, feel free to open an issue or send us a pull request on GitHub.\n\nWe are always interested to hear about projects built with OpenQAOA. If you have an application you'd like to tell us about, drop us an email at [openqaoa@entropicalabs.com](mailto:openqaoa@entropicalabs.com)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "OpenQAOA is a python open-source multi-backend Software Development Kit to create, customise and execute the Quantum Approximate Optimisation Algorithm (QAOA) on Noisy Intermediate-Scale Quantum (NISQ) devices, and simulators",
    "version": "0.2.5",
    "project_urls": {
        "Homepage": "https://github.com/entropicalabs/openqaoa"
    },
    "split_keywords": [
        "quantum",
        "optimisation",
        "sdk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42e07d290f335deffeb6283480064671bf996aeb7b50e4244658b607723f18fb",
                "md5": "04fb2a2b95b92ac787f45219aa3b1072",
                "sha256": "655ca728052346fca06cae2d9ab692532d29c978eef4c01d63d0702f4dd30349"
            },
            "downloads": -1,
            "filename": "openqaoa-0.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "04fb2a2b95b92ac787f45219aa3b1072",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8, <3.11",
            "size": 488857,
            "upload_time": "2023-12-20T15:43:38",
            "upload_time_iso_8601": "2023-12-20T15:43:38.417130Z",
            "url": "https://files.pythonhosted.org/packages/42/e0/7d290f335deffeb6283480064671bf996aeb7b50e4244658b607723f18fb/openqaoa-0.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e759a86d991971479d4a2e4fbaf0e2945795f66ad65c76bb790dcd4a30fdcdb7",
                "md5": "691e848ab6a0ba51f2661f60b39ca074",
                "sha256": "7e166d972a8336c1c2744a383fc2ea70fcf3cec3b34f11915b8a5814465b4394"
            },
            "downloads": -1,
            "filename": "openqaoa-0.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "691e848ab6a0ba51f2661f60b39ca074",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8, <3.11",
            "size": 380906,
            "upload_time": "2023-12-20T15:43:40",
            "upload_time_iso_8601": "2023-12-20T15:43:40.280472Z",
            "url": "https://files.pythonhosted.org/packages/e7/59/a86d991971479d4a2e4fbaf0e2945795f66ad65c76bb790dcd4a30fdcdb7/openqaoa-0.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-20 15:43:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "entropicalabs",
    "github_project": "openqaoa",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "openqaoa"
}
        
Elapsed time: 0.15908s