0.10.0.dev8
Pre-release
Pre-release
Release Notes
0.10.0.dev8
New Features
- Add bin_packing, knapsack and multi_knapsack constrained quadratic model generators.
- Add
BinaryQuadraticModel.is_almost_equalmethod for testing approximate equality to other binary quadratic models.
- Add
Variables.copymethod, implemented as acpdefmethod for Cython and Python access.
-
Support specifying lower and upper bounds for integer variables in quadratic models:
- Add
lower_boundandupper_boundkeyword arguments toQuadraticModel.add_variable. - Add
QuadraticModel.lower_boundandQuadraticModel.upper_boundmethods.
- Add
Upgrade Notes
- Remove
dimod.utils.LockableDictanddimod.decorators.lockable_method. AlsoSampleSet.is_writeablecan no longer be set toFalse.
Deprecation Notes
AdjVectorBQMandAdjDictBQMare deprecated and will be removed in dimod 0.11.0. UseBinaryQuadraticModelwithdtype=np.float64anddtype=objectrespectively.
SampleSet.is_writeableis deprecated and now always returns True.
Bug Fixes
- Add support for AdjVectorBQM and AdjDictBQM in ConstrainedQuadraticModel.
- Fix shallow copies of
Variablesobjects when usingcopy.copy.
- Implement rule of five for
dimod::NeighborhoodIterator,dimod::ConstNeighborhoodIterator, anddimod::ConstQuadraticIterator. This fixes double frees caused by the default copy constructor copying information that is not intended to be shared.
- Fix shallow copies of
BinaryQuadraticModelwithobjectdtype when usingcopy.copy.