Skip to content

0.10.12

Compare
Choose a tag to compare
@arcondello arcondello released this 21 Jan 20:46
· 905 commits to main since this release
66f8c06

New Features

  • Add cascade keyword argument to ConstrainedQuadraticModel.fix_variable() and ConstrainedQuadraticModel.fix_variables(). These methods also now return any variables fixed using the cascade keyword argument.
  • Add QuadraticModel::swap_variables() and BinaryQuadraticModel::swap_variables() methods to the C++ code.
  • Reintroduce BinaryQuadraticModel.to_serializable() and BinaryQuadraticModel.from_serializable() methods that were previously removed in dimod 0.10.0, see #847.

Upgrade Notes

  • ConstrainedQuadraticModel.fix_variable() and ConstrainedQuadraticModel.fix_variables() now raise a ValueError if given a variable not in the model.
  • Make use_bytes and bytes_type keyword-only arguments in BinaryQuadraticModel.to_serializable(). Note that BinaryQuadraticModel.to_serializable() was removed in 0.10.0 but restored in 0.10.12.
  • The bias_dtype keyword-only argument in BinaryQuadraticModel.to_serializable() now does nothing. Note that BinaryQuadraticModel.to_serializable() was removed in 0.10.0 but restored in 0.10.12.

Bug Fixes

  • Fix QuadraticModel.fix_variable() to correctly update the vartypes and bounds of of variables that are not fixed.
  • Fix QuadraticModel.fix_variable() when fixing the last variable in the quadratic model. Previously it would incorrectly raise an AttributeError.