dwave-graphs provides tools for working with quantum processing unit (QPU) topology graphs, such as the Pegasus used on the AdvantageTM quantum computer, and implementations of graph-theory algorithms on D-Wave quantum computers and other binary quadratic model (BQM) samplers.
This example generates a Pegasus graph of the size used by Advantage QPUs.
>>> import dwave.graphs
>>> graph = dwave.graphs.pegasus_graph(16)Installation from PyPI:
pip install dwave-graphsInstallation from source:
pip install .Development setup
Install development requirements and the package in editable mode:
pip install --group dev
pip install --editable .Tests require the test dependency group:
pip install --group test
python -m unittestReleased under the Apache License 2.0. See LICENSE file.
Ocean's contributing guide has guidelines for contributing to Ocean packages.