dimod.QuadraticModel.fix_variable#

QuadraticModel.fix_variable(v: Hashable, value: float)[source]#

Remove a variable by fixing its value.

Parameters:
  • v – Variable to be fixed.

  • value – Value assigned to the variable. Values should generally match the Vartype of the variable, but do not have to.

Raises:

ValueError – If v is not a variable in the model.