Skip to content

Optimization and QUBO

grove

Maintained by rigetticomputing

A collection of quantum algorithms built using the Rigetti Forest platform.

PythonApache-2.0
grove illustration

Resource snapshot

Category

Optimization and QUBO

Stars

384

Last pushed

Dec 2, 2021Updated 4y ago

Open issues

50

What it is

grove is maintained by rigetticomputing and sits in the Optimization and QUBO lane of the open-source quantum map.

A collection of quantum algorithms built using the Rigetti Forest platform.

Last verified by Qtangl generator on May 27, 2026

Who it's for

Teams exploring routing, scheduling, allocation, and other combinatorial problems that can be modeled as optimization workloads.

What you can build or learn

  • Understand how this project models constrained optimization problems.
  • Compare QUBO, QAOA, and hybrid optimization workflows against classical baselines.
  • Identify pieces that could inform a practical planning stack like Qtangl.

Code samples

Examples from the repository.

Deutschjosza (examples/DeutschJosza.ipynb)
from itertools import product

from mock import patch

from grove.deutsch_jozsa.deutsch_jozsa import DeutschJosza
Groversalgorithm (examples/GroversAlgorithm.ipynb)
from itertools import product

from mock import patch

from grove.amplification.grover import Grover
Isingsolver (examples/IsingSolver.ipynb)
from mock import patch, Mock
from pyquil.api import WavefunctionSimulator

from grove.ising.ising_qaoa import ising

License

Apache-2.0

SPDX identifier detected from the repository metadata or license files.

Repository README

Preview from the project README.

Rendered as Markdown inside a scrollable preview. Long READMEs stay contained; expand or open on GitHub for the full document.

~559 words · about 3 min readOpen on GitHub

Grove

A collection of quantum algorithms built using the Rigetti Forest platform. Grove is licensed under the Apache 2.0 license.

Build Status Documentation Status

Grove currently includes:

Features in the alpha package are considered experimental.

Documentation

Documentation is hosted at http://grove-docs.readthedocs.io/en/latest/

Installation

You can install Grove directly from the Python package manager pip using:

pip install quantum-grove

To instead install Grove from source, clone this repository, cd into it, and run:

pip install -e .

This will install Grove’s dependencies if you do not already have them. However, you will still need to install pyQuil and set up a connection to the Rigetti Forest (see below). To enable the tomography module, you will also have to install qutip and cvxpy, see below for more details.

Forest and pyQuil

Grove also requires the Python library for Quil, called pyQuil.

You can install pyQuil directly from the Python package manager pip using:

pip install pyquil

To instead install pyQuil from source, clone the pyQuil GitHub repository, cd into it, and run:

pip install -e .

You will need to make sure that your pyQuil installation is properly configured to run with a quantum virtual machine (QVM) or real quantum processor (QPU) hosted on the Rigetti Forest, which requires an API key. See the pyQuil docs for instructions on how to do this.

Installing the dependencies for Quantum Tomography

Quantum tomography relies on the external packages qutip and and cvxpy, which can be somewhat tricky to install.

You can first attempt to just run

pip install -r requirements.txt
pip install -r optional-requirements.txt
pip install quantum-grove

If the installation of the optional requirements fails, you can manually install the individual packages as

pip install cython==0.24.1 scs==1.2.6
pip install qutip==4.1 cvxpy==0.4.11

These are not the most recent versions but they are the only ones that have consistently worked for us across different platforms and python versions.

For Windows users: Both qutip and cvxpy are fairly tricky to install under windows and we therefore recommend using Anaconda's conda package manager to install these first and then pip to install quantum-grove.

Building the Docs

We use sphinx to build the documentation. To do this, navigate into Grove's top-level directory and run:

sphinx-build -b html docs/ docs/_build

To view the docs navigate to the newly-created docs/_build directory and open the index.html file in a browser. Note that we use the Read the Docs theme for our documentation, so this may need to be installed using pip install sphinx_rtd_theme.

Development and Testing

We use tox and pytest for testing. Tests can be executed from the top-level directory by simply running:

tox

The setup is currently testing Python 2.7 and Python 3.6.

How to cite Grove and Forest

If you use pyquil, grove or other parts of Forest in your research, please cite it as follows:

bibTeX:

@misc{1608.03355,
  title={A Practical Quantum Instruction Set Architecture},
  author={Smith, Robert S and Curtis, Michael J and Zeng, William J},
  journal={arXiv preprint arXiv:1608.03355},
  year={2016}
}

Text:

R. Smith, M. J. Curtis and W. J. Zeng, "A Practical Quantum Instruction Set Architecture," (2015), 
  arXiv:1608.03355 [quant-ph], https://arxiv.org/abs/1608.03355
Read on GitHub

Activity

Latest release

—

Watchers

32

Python support

—

Learn digest

Get monthly updates when library entries change.

Monthly digest: new library entries, updated flagships, and one editorial pick.

Related resources

Keep exploring nearby tools.

dwavesystems

dwave_sapi_dimod

dimod wrapper for D-Wave's SAPI Client Library

PythonApache-2.0Archive

9 stars · Updated 8y ago

cda-tum

mqt-qmap

MQT QMAP - A tool for Quantum Circuit Mapping written in C++

C++MITFlagshipQtangl relevant

138 stars · Updated 3mo ago

entropicalabs

openqaoa

Multi-backend SDK for quantum optimisation

PythonMITFlagshipQtangl relevant

139 stars · Updated 2y ago

dwavesystems

penaltymodel

Utilities and interfaces for using penalty models.

PythonApache-2.0Archive

19 stars · Updated 1y ago

Qiskit

qiskit-optimization

Quantum Optimization

PythonApache-2.0FlagshipQtangl relevant

281 stars · Updated 5mo ago

jtiosue

qubovert

The one-stop package for formulating, simulating, and solving problems in boolean and spin form

PythonApache-2.0FlagshipQtangl relevant

41 stars · Updated 4mo ago