dimod.BinaryQuadraticModel.empty

classmethod BinaryQuadraticModel.empty(vartype)[source]

Create an empty binary quadratic model.

Equivalent to instantiating a BinaryQuadraticModel with no bias values and zero offset for the defined vartype:

BinaryQuadraticModel({}, {}, 0.0, vartype)
Parameters:vartype (Vartype/str/set) –

Variable type for the binary quadratic model. Accepted input values:

Examples

>>> bqm = dimod.BinaryQuadraticModel.empty(dimod.BINARY)