Dwave-ocean-sdk

Latest version: v6.10.0

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

Scan your dependencies

Page 14 of 27

0.12.14

New Features

- Add C++ `dimod::abc::QuadraticModelBase::remove_variables()` method
and accompanying overloads.
- Speed up C++ `dimod::Expression::remove_variables()` method.

0.12.13

New Features

- Build wheels for Python 3.12.

- Build C++ extensions with Cython 3.

0.12.12

New Features

- Implement `CaseLabelDQM.to_file()` when the keyword argument `ignore_labels` is true. Also make the error message clearer in the case that `ignore_labels` is false.

- Improve the performance of `ConstrainedQuadraticModel.from_discrete_quadratic_model()`.

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

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

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

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

Upgrade Notes

- Make the arguments of `DiscreteQuadraticModel.to_file()` keyword-only.

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

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

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

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

0.12.3

New Features

- Add `compress` keyword argument to `ConstrainedQuadraticModel.to_file()`.

<!-- -->

- Add `ConstraintView.set_weight()` method. This allows users to set the weight of existing constraints.

Upgrade Notes

- When the constraint is hard, `ConstraintView.penalty()` now returns `None`. Previously it would return either `'linear'` or `'quadratic'`.

Bug Fixes

- Fix the `copy` keyword argument of `ConstrainedQuadraticModel.add_constraint_from_model()`. Previously it would always make a copy.

<!-- -->

- Add missing `include` in `dimod/include/dimod/abc.h`.

<!-- -->

- Fix `ConstrainedQuadraticModel.add_constraint_from_iterable()` to no longer raise a `NotImplementedError` when given a weight.

<!-- -->

- Fix `ConstrainedQuadraticModel.add_constraint()` to raise a `ValueError` rather than a `NotImplementedError` when given an invalid penalty.

0.12.2

New Features

- Implement `Expression::remove_variable()` method in the C++ code.

<!-- -->

- Implement `Expression.remove_variable()` method in the Python code.

<!-- -->

- Add `dimod/libcpp/expression.pxd` and `dimod/libcpp/constraint.pxd`.

Page 14 of 27

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.