New Features
- Improve the performance of the `ConstrainedQuadraticModel.add_variables()` method.
- Allow discrete constraints added by `ConstrainedQuadraticModel.add_discrete()` to have zero or one variables.
- Add `dimod::ConstrainedQuadraticModel::constraints()` method that returns a view of the constraints that is easily iterated over.
- Improve the performance of fixing and removing variables from constrained quadratic model expressions.
- Implement the `Expression::fix_variable()` C++ method. Previously it would throw `std::logic_error("not implemented - fix_variable")`.
- Improve the performance of `ConstrainedQuadraticModel.fix_variable()` and `ConstrainedQuadraticModel.fix_variables()`.
- Add `inplace` keyword argument to `ConstrainedQuadraticModel.fix_variables()`.
- Add `dimod::Constraint::clear()` C++ method.
Upgrade Notes
- Remove the undocumented `cyConstrainedQuadraticModel.add_variable()` method.
- Add an overload to the C++ `QuadraticModel::remove_variable()` method. This is binary compatible, but it makes `&remove_variable` ambiguous.
- The `ConstrainedQuadraticModel.fix_variables()` function now returns a `ConstrainedQuadraticModel` rather than an empty dictionary.
- Change `lp.load()` and `lp.loads()` to raise a `ValueErrorr` rather than a `RuntimeError` when given an invalid file format.
- Make `beta_range`, `num_reads`, and `num_sweeps` keyword-only arguments for `SimulatedAnnealingSampler.sample()`.
- Make `num_reads` and `seed` keyword-only arguments for `RandomSampler.sample()`.
- Make `initial_states`, `initial_states_generator`, `num_reads` and `seed` keyword-only arguments for `IdentitySampler.sample()`.
- Make `rtol` and `atol` keyword-only arguments for `ExactCQMSolver.sample_cqm()`.
Bug Fixes
- Fix `ConstrainedQuadraticModel.add_variable()` to raise a `ValueError` when given an inconsistent variable type. Previously it incorrectly raised a `TypeError`.
- Fix `ConstrainedQuadraticModel.add_variable()` to raise a `ValueError` when given invalid variable bounds.
- Fix `lp.load()` and `lp.loads()` functions to correctly handle maximization objectives. See [\1321](https://github.com/dwavesystems/dimod/issues/1321).