dimod.binary.BinaryQuadraticModel.scale#

BinaryQuadraticModel.scale(scalar, ignored_variables=None, ignored_interactions=None, ignore_offset=False)[source]#

Multiply all biases by the specified scalar.

Parameters:
  • scalar (number) – Value by which to scale the energy range of the binary quadratic model.

  • ignored_variables (iterable, optional) – Biases associated with these variables are not scaled.

  • ignored_interactions (iterable[tuple], optional) – Biases associated with these interactions, formatted as an iterable of 2-tuples, are not scaled.

  • ignore_offset (bool, default=False) – If True, the offset is not scaled.