dwave-graphs
A package providing graphs and algorithms for working with D-Wave quantum computers.
What it is and what it does
dwave-graphs is a Python library for representing and manipulating quantum processor topologies, particularly the Pegasus topology used by D-Wave's Advantage quantum computers. It wraps graph structures and provides algorithms designed to work with binary quadratic model (BQM) samplers on D-Wave hardware and other compatible systems.
The package sits in the D-Wave Ocean SDK ecosystem and depends on networkx for graph operations, numpy for numerical work, and dimod for BQM handling. It is primarily useful for researchers and developers building quantum annealing applications who need to understand or work directly with QPU connectivity constraints, or who are implementing graph-based algorithms for quantum optimization.
Use it for:
- Generate and inspect Pegasus topology graphs to understand D-Wave Advantage QPU connectivity constraints.
- Implement graph-theory algorithms optimized for quantum annealing on D-Wave hardware.
- Map classical optimization problems to QPU topology when designing BQM formulations.
- Prototype quantum annealing solutions that must respect hardware topology limitations.
- Research quantum processor architecture and topology-aware algorithm design.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides graph representations and algorithms for D-Wave quantum processors, including topology graphs like Pegasus and tools for working with binary quadratic model samplers.
Yes, if you are working with D-Wave quantum computers or researching quantum annealing. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It is a specialized tool with a narrow audience—install only if you need QPU topology graphs or D-Wave-specific graph algorithms.
Install
dwave-graphs on PyPI
pip
pip install dwave-graphsuv
uv add dwave-graphspoetry
poetry add dwave-graphsInstalling dwave-graphs
Before you install
Low install friction with a pure Python wheel and three common dependencies (dimod, networkx, numpy). Active maintenance with a recent release and no known vulnerabilities.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions, typical for D-Wave's open-source quantum software ecosystem.
Quickstart
pip install dwave-graphs
import dwave.graphs
graph = dwave.graphs.pegasus_graph(16)
Requires Python 3.10 or later (3.14.1 excluded); depends on dimod, networkx, and numpy being installed.
Verify before relying
- Whether pegasus_graph(16) is the correct size parameter for Advantage QPUs or if other sizes are commonly used.
- What specific graph-theory algorithms beyond topology representation are included in the package.
- Performance characteristics when working with large-scale QPU topologies.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (!=3.14.1,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — dimod, networkx, numpy |
| Maintenance | actively maintained — 64 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,527/month — #14,518 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dwave_graphs-1.0.0-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
dwave-cloud-clientD-Wave Cloud Client provides a Python interface…
permissive · top 15,000 on PyPI
dwave-networkxExtends NetworkX with tools for D-Wave quantum…
permissive · top 15,000 on PyPI
dwave-optimizationFormulates nonlinear optimization models…
permissive · top 15,000 on PyPI
minorminerminorminer finds graph minor embeddings—it maps…
unclear · top 15,000 on PyPI
dwave-samplersProvides a collection of classical and hybrid…
permissive · top 15,000 on PyPI
quimbQuimb provides Python tools for quantum…
permissive · top 15,000 on PyPI
dimoddimod provides classes and interfaces for…
permissive · top 15,000 on PyPI
hugrhugr provides a pure-Python implementation of…
permissive · top 15,000 on PyPI
qiskit-algorithmsQiskit Algorithms provides a library of quantum…
permissive · top 15,000 on PyPI
cirq-webProvides browser-based 3D visualization tools…
permissive · top 15,000 on PyPI