0.11.0rc1
Pre-release
Pre-release
Prelude
Add support for real-valued variables.
New Features
- Improved deprecation warnings and documentation. See #192.
- Add C++
Vartype::REAL, a new variable type for real-valued variables.
- Support variables with
Vartype::REALin C++QuadraticModel.
- Add
Vartype.REAL, a new variable type for real-valued variables.
- Add
Real()andReals()functions for creating quadratic models with a single real-valued variable.
- Support variables with
Vartype.REALinQuadraticModel.
ConstrainedQuadraticModel.to_file()now uses serialization format 1.2. This format is backwards compatibile.
- Add
vartypeandlinear_onlyarguments toConstrainedQuadraticModel.num_biases().
- Add
vartypeandinclude_objectivearguments toConstrainedQuadraticModel.num_quadratic_variables().
- Add
check_headerkeyword-only argument toConstrainedQuadraticModel.from_file().
- Add a global flag
dimod.REAL_INTERACTIONS. When this flag is set toFalse, variables with variable typeVartype.REALcannot have interactions.dimod.REAL_INTERACTIONSis set toFalseby default.
Upgrade Notes
- Remove
.vartypes,.lower_bounds, and.upper_boundsattributes fromConstrainedQuadraticModel.variables. These were previously deprecated in dimod 0.10.6.
- Remove
.vartype()method fromConstrainedQuadraticModel.variables. It was previously deprecated in dimod 0.10.6.
- Remove
bqm_index_labelled_inputdecorator. It was previously deprecated in dimod 0.10.8.
- Remove
SampleSet.is_writeableattribute.
- Remove
dimod.generators.knapsack(). It was previously deprecated in dimod 0.10.6.
- Remove
dimod.generators.multi_knapsack(). It was previously deprecated in dimod 0.10.6.
- Remove
dimod.generators.bin_packing(). It was previously deprecated in dimod 0.10.6.
- Remove
HigherOrderComposite.sample_ising()method. It was previously scheduled to be removed in dimod 0.10.0.
- Remove
PolySampler.sample(),PolySampler.sample_ising(), andPolySampler.sample_qubo()methods. These were previously scheduled to be removed in dimod 0.10.0.
AdjVectorBQMandAdjDictBQMare now aliases forBinaryQuadraticModelandDictBQMrespectively rather than having their own implementation with a slightly different API. They were previously deprecated in dimod 0.10.0.
- The
dimod.bqmnamespace has been removed.
- The
dimod.core.bqmnamespace has been removed.
dimod::AdjVectorBQMhas been removed from the C++ code.
- Some composites were migrated to dwave-preprocessing in dimod0.10.0. Trying to import and use these composites from dimod now raises an exception rather than a warning. The affected composites:
ClipCompositeConnectedComponentsCompositeFixedVariableCompositeRoofDualityCompositeScaleCompositeSpinReversalTransformComposite
- The
fix_variables()was migrated to dwave-preprocessing in dimod 0.10.0. Trying to import and use it now raises an exception rather than a warning.
- Packages that require binary compatibility with dimod and that were compiled with 0.10.0 will not work with 0.11.0.
Deprecation Notes
- Deprecate support for the
ConstrainedQuadraticModel.add_variable(v, vartype)argument order. UseConstrainedQuadraticModel.add_variable(vartype, v)instead. See #969.
- In the future,
ConstrainedQuadraticModel.num_quadratic_variables()will also include the objective towards the count by default.
Bug Fixes
- Fixes performance regression on energy calculations introduced in 0.10.0. See #1025