openjij.sampler.chimera_gpu.base_gpu_chimera#

Module Contents#

Classes#

BaseGPUChimeraSampler

Abstract GPUChimera Sampler.

class openjij.sampler.chimera_gpu.base_gpu_chimera.BaseGPUChimeraSampler[source]#

Bases: dimod.Structured

Inheritance diagram of openjij.sampler.chimera_gpu.base_gpu_chimera.BaseGPUChimeraSampler

Abstract GPUChimera Sampler.

property adjacency Dict[dimod.typing.Variable, Set]#

Adjacency structure formatted as a dict, where keys are the nodes of the structured sampler and values are sets of all adjacent nodes for each key node.

Return type

Dict[dimod.typing.Variable, Set]

property edgelist#

Edges/interactions allowed by the sampler.

property nodelist#

Nodes/variables allowed by the sampler.

property parameters#
property structure _Structure#

Structure of the structured sampler formatted as a namedtuple() where the 3-tuple values are the nodelist, edgelist and adjacency attributes.

Return type

_Structure

to_networkx_graph()#

Convert structure to NetworkX graph format.

Note that NetworkX must be installed for this method to work.

Returns

A NetworkX graph containing the nodes and edges from the sampler’s structure.

Return type

networkx.Graph

valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#

Validate that problem defined by dimod.BinaryQuadraticModel matches the graph provided by the sampler.

Parameters

bqm (dimod.BinaryQuadraticModel) – dimod.BinaryQuadraticModel object to validate.

Returns

Boolean indicating validity of BQM graph compared to sampler graph.

Return type

bool