dimod.binary.BinaryQuadraticModel.change_vartype#

BinaryQuadraticModel.change_vartype(vartype: Vartype, inplace: bool = True) BinaryQuadraticModel[source]#

Return a binary quadratic model with the specified vartype.

Parameters:
  • vartype

    Variable type for the changed model. Accepted input values:

  • inplace – If True, the binary quadratic model is updated in-place; otherwise, a new binary quadratic model is returned.

Returns:

A binary quadratic model with the specified vartype.