Dimod

Latest version: v0.12.14

Safety actively analyzes 625334 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 26

0.11.6rc1

0.11.6.dev2

Bug Fixes

- Fix the type of soft constraint weights when loaded from files. The issue was introduced in 0.11.6.dev1.

0.11.6.dev1

Bug Fixes

- Fix the performance of `ConstrainedQuadraticModel.from_file()` for constrained quadratic models with a large number of constraints. The poor performanc was accidentally introduced in 0.11.6.dev0.

0.11.6.dev0

New Features

- Add `Variables._remove()` method.

<!-- -->

- Added `weight` and <span class="title-ref">penalty</span> parameters on `ConstrainedQuadraticModel.add_constraint` methods to encoded weighted constraints.

<!-- -->

- Add constrained quadratic model serialization version 1.3 to support soft constraints.

0.11.5

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`.

0.11.4

New Features

- Add `ConstrainedQuadraticModel.__str__()` method. See [1188](https://github.com/dwavesystems/dimod/issues/1188).

<!-- -->

- Speed up the construction of <span class="title-ref">Variables</span> objects from a <span class="title-ref">range</span> or another <span class="title-ref">Variables</span>.

<!-- -->

- Add optional keyword argument `labels_type` to the `as_samples()` function.

<!-- -->

- Speed up `BinaryQuadraticModel.energies()` and `QuadraticModel.energies()` in cases where the model has a small subset of the variables in the samples.

<!-- -->

- Speed up `SampleSet.from_samples_cqm()` in cases where there are constraints with a small number of variables relative to the objective.

Page 6 of 26

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.