dwave-networkx#
Reference documentation for dwave-networkx:
About dwave-networkx#
dwave-networkx is an extension of NetworkX—a Python language package for exploration and analysis of networks and network algorithms—for users of D-Wave quantum computers. It 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_networkx as dnx
>>> graph = dnx.pegasus_graph(16)
Functions such as draw_pegasus()
provide easy visualization for
Pegasus graphs while functions such as
maximum_cut()
or
min_vertex_cover()
provide graph
algorithms useful to optimization problems that fit well with D-Wave
quantum computers.
Like D-Wave quantum computers, all other supported samplers must have
sample_qubo
and sample_ising
methods for solving Ising and
QUBO models and return an iterable of samples in order of increasing
energy. You can set a default sampler using the
set_default_sampler()
function.
Usage Information#
Concepts for terminology
Topologies for an introduction to QPU topologies such as the Pegasus graph
Binary Quadratic Models for an introduction to binary quadratic models (BQM)
Samplers and Solvers for an introduction to samplers