New Features
- Add `ConstrainedQuadraticModel.is_linear()` method.
<!-- -->
- Add `ConstrainedQuadraticModel.spin_to_binary()` method.
<!-- -->
- Add `Variables._clear()` method for use by classes that have `Variables` as an attribute.
<!-- -->
- Add C++ `dimod::QuadraticModel::clear()` method.
<!-- -->
- Add C++ `dimod::BinaryQuadraticModel::clear()` method.
<!-- -->
- Add `QuadraticModel.clear()` method.
<!-- -->
- Add `BinaryQuadraticModel.clear()` method.
<!-- -->
- Add typing support for the `dimod.variables.Variables` class. See [1221](https://github.com/dwavesystems/dimod/issues/1221).
Bug Fixes
- Fix `as_samples()` when given a `SampleSet` and using the `labels_type` keyword argument. Previously it would raise a `TypeError`. This fix allows constructions like `bqm.energies(sampleset)` to function correctly.
<!-- -->
- Refactor `dimod.typing.SamplesLike` and `dimod.typing.SampleLike`. `SampleLike` now correctly includes constructions like `([0, 1], 'ab')`.
<!-- -->
- Make `Vartype.INTEGER` and `Vartype.REAL` pickleable. This fixes the pickling of many downstream objects like `QuadraticModel` and `SampleSet`.