Skip to main content

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

Project description

OpenQAOA

build test Documentation Status PyPI version arXiv License Contributor Covenant Downloads Binder Discord Website

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/

OpenQAOA is currently in OpenBeta.

Please, consider joining our discord 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. 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
  1. 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. We also provide a set of tutorials to get you started. Among the many, perhaps you can get started with the following ones:

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 IonQ, Rigetti, OQC, and simulators
IBMQ Please check the IBMQ backends available to your account
Rigetti QCS Aspen-11, Aspen-M-1, and QVM simulator
Azure 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)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openqaoa-0.2.6.tar.gz (385.4 kB view details)

Uploaded Source

Built Distribution

openqaoa-0.2.6-py3-none-any.whl (493.6 kB view details)

Uploaded Python 3

File details

Details for the file openqaoa-0.2.6.tar.gz.

File metadata

  • Download URL: openqaoa-0.2.6.tar.gz
  • Upload date:
  • Size: 385.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for openqaoa-0.2.6.tar.gz
Algorithm Hash digest
SHA256 23b91f504695fc31209d999c929c998d090a37284bb12d12d8de5b5214a8aa13
MD5 e20d6b5229e9567a251f7c1a4cacd8dc
BLAKE2b-256 688f21b64fd005661691b1a55b297132db2d13b308541fb1efb3f8eb08ff519e

See more details on using hashes here.

File details

Details for the file openqaoa-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: openqaoa-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 493.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for openqaoa-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 dd6c6ca5cc4c9c010bc01638fe2a067f85eb6986a04959ca7817b9291f190a98
MD5 a877c71c2e4fa366ac2f44f027ed71e5
BLAKE2b-256 6e73c3dc071eaae701b369d157f3fc02e53e0e0b3b40ad3d6ae242cb23136dd2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page