You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
New Features
Add ConstrainedQuadraticModel.is_equal() and ConstrainedQuadraticModel.is_almost_equal() methods. See #1012
Add QuadraticModel.is_almost_equal() method
Support equality checks between quadratic models and binary quadratic models in BinaryQuadraticModel.is_equal(), BinaryQuadraticModel.is_almost_equal(), QuadraticModel.is_equal(), and QuadraticModel.is_almost_equal() methods.
Add GraphLike type hint to dimod.typing.
Add ConstrainedQuadraticModel.iter_constraint_data(), ConstrainedQuadraticModel.iter_violations() and ConstrainedQuadraticModel.violations() methods. See 971.
Added from_lp_file classmethod to ConstrainedQuadraticModel that reads input LP file and converts it to CQM instance.
ConstrainedQuadraticModel.set_objective now accepts an iterable.
Add random_bin_packing function with the same functionality as the (now deprecated) bin_packing.
Allow BinaryQuadraticModel and QuadraticModel to be divided by a scalar or squared. See #864, #984.
Add SampleSet.filter() method that returns a sample set with data rows filtered by a given predicate.
Add .to_dict() and .from_dict() methods to the sample inverter returned by the cqm_to_bqm function. The methods return a json serializable representation of the inversion for storage if needed. See 977.
Add random_multi_knapsack function with the same functionality as the (now deprecated) multi_knapsack.
Add random_knapsack function with the same functionality as the (now deprecated) knapsack.
Allow the offset of a BinaryQuadraticModel to be specified as a keyword argument.
Add PEP 561 compatibility to allow tools like mypy to auto-detect typing hints. See #980.
Upgrade Notes
The cls keyword argument of the chimera_anticluster function now does nothing.
Deprecation Notes
Deprecate cls keyword argument of the chimera_anticluster function.
Deprecate bin_packing function in favour of random_bin_packing.
Deprecate multi_knapsack function in favour of random_multi_knapsack.
Deprecate knapsack function in favour of random_knapsack.
Bug Fixes
QuadraticModel can now be multiplied by a number in place.
Fix energy calculations for integer variables with large values. See #982.
Make dimod.BinaryQuadraticModel a virtual subclass of dimod.core.bqm.BQM.