Dimod

Latest version: v0.12.18

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

Scan your dependencies

Page 3 of 27

0.12.12

New Features

- Add `mimo()` function for generating a multi-input multiple-output (MIMO) channel-decoding problem.
- Add `coordinated_multipoint()` function for generating a coordinated multi-point (CoMP) decoding problem.

0.12.11

New Features

- Make `SampleSet.relabel_variables()` non-blocking in all cases. Previously it would block when `inplace=False`.

- Implement `SampleSet` serialization schema version 3.2.0.

Version 3.2.0 replaces `float` values that represent integers with `int` in the `"data"` field of any arrays returned by `SampleSet.to_serializable()`. In some pathological cases this can result in a much smaller representation when the data dictionaries are json-serialized by avoiding the redundant `.0` appended to every value.

This is a backwards-compatible change.

- Add `penalization_method` parameter to `BinaryQuadraticModel.add_linear_inequality_constraint()`. It allows the use of unbalanced penalization <https://arxiv.org/abs/2211.13914> instead of the slack variables method for the inequality constraints.

Bug Fixes

- Fix the behavior of `SampleSet.relabel_variables()` when `inplace=True`. Previously the method incorrectly returned a copy when the sample set was unresolved.

0.12.10

Bug Fixes

- Fix ``dimod::ConstrainedQuadraticModel::fix_variables()`` C++ method to work correctly with quadratic objectives and constraints. This fixes a bug introduced in dimod 0.12.5. See [1351](https://github.com/dwavesystems/dimod/issues/1351).

0.12.9

New Features

- Add `Constraint.is_onehot()` method.
- Add `dimod::Expression::remove_variables()` C++ method. This method is useful for removing variables in bulk from the objective or constraints of a constrained quadratic model.

0.12.8

New Features

- Add `dimod.generators.magic_square()` which allows for the generation of a constrained quadratic model whose feasible solutions are normal magic squares. The function also generates magic squares of squares when passed `power=2` as a keyword argument.
- Implement version 2.0 of constrained quadratic model serialization. See `ConstrainedQuadraticModel.to_file()` for details.
- Improve LP file reading by wrapping [HiGHS](https://github.com/ERGO-Code/HiGHS) LP file parser.
- Add C++ ``ConstrainedQuadraticModel::remove_constraints_if()`` method.

Upgrade Notes

- Remove the `ObjectView.to_file()` method.
- Remove the `ConstraintView.to_file()` method.
- Remove `dimod::lp` C++ namespace.
- Drop support for Python 3.7.

Bug Fixes
- Fix `ConstrainedQuadraticModel.from_discrete_quadratic_model()` incorrectly formulating the discrete constraints. This bug was
introduced in version 0.12.7.
- Fix `dimod.generators.frustrated_loop()` to correctly handle graphs with tuple labels. See [\1342](https://github.com/dwavesystems/dimod/issues/1342).

0.12.8rc2

Bug Fixes

- Fix loading constrained quadratic models that are serialized with CQM serialization version 2.0 and that have tuple labels.
- Support serializing constraints that need more than 2GB to save.

Page 3 of 27

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.