dimod.ConstrainedQuadraticModel.fix_variables

ConstrainedQuadraticModel.fix_variables(fixed: Union[Mapping[Hashable, float], Iterable[Tuple[Hashable, float]]], *, cascade: Optional[bool] = None) Dict[Hashable, float][source]

Fix the value of the variables and remove them.

Parameters
  • fixed – Dictionary or iterable of 2-tuples of variable assignments.

  • cascade – Deprecated. Does nothing.

Returns

An empty dictionary, for legacy reasons.

Deprecated since version 0.12.0: The cascade keyword argument will be removed in 0.14.0. It currently does nothing.