cimod
C++ library for a binary (and polynomial) quadratic model.
cimod.model.binary_quadratic_model Namespace Reference

Functions

def get_cxxcimod_class (linear, quadratic, sparse)
 
def extract_offset_and_vartype (*args, **kwargs)
 
def make_BinaryQuadraticModel (linear, quadratic, sparse)
 
def make_BinaryQuadraticModel_from_JSON (obj)
 
def BinaryQuadraticModel (linear, quadratic, *args, **kwargs)
 
def bqm_from_numpy_matrix (mat, list variables=None, offset=0.0, vartype="BINARY", **kwargs)
 
def bqm_from_qubo (Q, offset=0.0, **kwargs)
 
def bqm_from_ising (linear, quadratic, offset=0.0, **kwargs)
 

Variables

 model_type
 

Function Documentation

◆ BinaryQuadraticModel()

def cimod.model.binary_quadratic_model.BinaryQuadraticModel (   linear,
  quadratic,
args,
**  kwargs 
)

◆ bqm_from_ising()

def cimod.model.binary_quadratic_model.bqm_from_ising (   linear,
  quadratic,
  offset = 0.0,
**  kwargs 
)

◆ bqm_from_numpy_matrix()

def cimod.model.binary_quadratic_model.bqm_from_numpy_matrix (   mat,
list   variables = None,
  offset = 0.0,
  vartype = "BINARY",
**  kwargs 
)

References cimod.model.binary_quadratic_model.make_BinaryQuadraticModel().

Here is the call graph for this function:

◆ bqm_from_qubo()

def cimod.model.binary_quadratic_model.bqm_from_qubo (   Q,
  offset = 0.0,
**  kwargs 
)

References cimod.model.binary_quadratic_model.make_BinaryQuadraticModel().

Here is the call graph for this function:

◆ extract_offset_and_vartype()

def cimod.model.binary_quadratic_model.extract_offset_and_vartype ( args,
**  kwargs 
)

Referenced by cimod.model.binary_quadratic_model.BinaryQuadraticModel().

Here is the caller graph for this function:

◆ get_cxxcimod_class()

def cimod.model.binary_quadratic_model.get_cxxcimod_class (   linear,
  quadratic,
  sparse 
)

Referenced by cimod.model.binary_quadratic_model.make_BinaryQuadraticModel().

Here is the caller graph for this function:

◆ make_BinaryQuadraticModel()

def cimod.model.binary_quadratic_model.make_BinaryQuadraticModel (   linear,
  quadratic,
  sparse 
)
BinaryQuadraticModel factory.
   Generate BinaryQuadraticModel class with the base class specified by the arguments linear and quadratic
Args:
    linear (dict): linear bias
    quadratic (dict): quadratic bias
    sparse (bool): if true, the inner data will be a sparse matrix, otherwise the data will be a dense matrix
Returns:
    generated BinaryQuadraticModel class

References cimod.model.binary_quadratic_model.BinaryQuadraticModel(), cimod.model.binary_quadratic_model.get_cxxcimod_class(), and cimod.vartype.to_cxxcimod().

Referenced by cimod.model.binary_quadratic_model.BinaryQuadraticModel(), cimod.model.binary_quadratic_model.bqm_from_ising(), cimod.model.binary_quadratic_model.bqm_from_numpy_matrix(), cimod.model.binary_quadratic_model.bqm_from_qubo(), and cimod.model.binary_quadratic_model.make_BinaryQuadraticModel_from_JSON().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_BinaryQuadraticModel_from_JSON()

def cimod.model.binary_quadratic_model.make_BinaryQuadraticModel_from_JSON (   obj)

References cimod.model.binary_quadratic_model.make_BinaryQuadraticModel().

Referenced by cimod.model.binary_quadratic_model.bqm_from_ising().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ model_type

cimod.model.binary_quadratic_model.model_type