Changelogs » Dimod

Dimod

0.8.17

Fixes
-----
* Sample sets with non-integer sample dtypes now correctly serialize

0.8.16

New Features
------------
* Remove jsonschema package dependency
* Use standard c++ exceptions in the roof duality source code

Fixes
-----
* `BinaryQuadraticModel.contract_variables` now correctly adds the linear biases
* `BinaryQuadraticModel` can now be copied when it is locked
* `make_quadratic` now correctly handles squared terms in the input polynomial

0.8.15

New Features
------------
* New sample set and binary quadratic model serialization (version 3.0.0)
* Serialization of numpy objects in `SampleSet.info` and `BinaryQuadraticModel.info`

Deprecated
----------
* Sample set serialization version 2.0.0
* Binary quadratic model serialization version 2.0.0

0.8.14

Fixes
-----
* Fix `num_occurrences` not being aggregated correctly in `SampleSet.aggregate`

0.8.13

New Features
------------
* `TrackingComposite`, a new composite that records inputs and outputs for testing
* `NullSampler`, a new sampler that always returns an empty sample set
* `child_structure_dfs` function that searches child samplers for a structured
* `HigherOrderComposite` now supports the `initial_state` keyword argument
* `BinaryQuadraticModel.is_writeable` flag that toggles whether the BQM is treated as immutable or not
* `SampleSet.is_writeable` flag that toggles whether the sample set is treated as immutable or not

0.8.12

New Features
-----------
* `SampleSet.resolve` method that resolves any futures the sample set was constructed from.
* `SampleSet` is now pickleable in python2

Fixes
-----
* `ran_r` now creates vectors of the correct size.
* `BQM.from_numpy_vectors` now checks the size of the input vectors for correctness.
* `SampleSet`s with unresolved futures now block before pickling.

0.8.11

Fixes
-----
* `SampleSet.from_serializable` now correctly deserializes tuple variables
* `SampleSet.aggregate` now correctly preserves order
* `Variables.relabel` now ignores unknown labels
* `BinaryQuadraticModel.from_serializable` now correctly deserializes `BinaryQuadraticModel.info`

New Features
------------
* `ran_r` function to generate RANr binary quadratic models
* `SampleSet.slice` method to create a new sample set with rows sliced according to the standard Python slicing syntax
* `as_vartype` function to cast permitted inputs to a valid `Vartype` enum

0.8.10

Fixes
-----
* `SampleSet.from_serializable` now correctly preserves `SampleSet.info`

New Features
------------
* `SampleSet.lowest` method which returns a new sample set containing the lowest energy samples

0.8.9

Fixes
-----
* `SampleSet.samples` now returns an iterator. This is a backwards-compatibility fix and is a deprecated feature.

0.8.8

New Features
------------
* `combinations` bqm generator
* `SampleSet.samples` now returns an indexable object
* `assert_sampleset_energies` testing function
* `BinaryQuadraticModel.from_networkx_graph` method
* `SampleSet.append_variables` method

Bug Fixes
---------
* Fix bug in `Variables.__contains__` that raised a keyerror rather than returning False

0.8.7

New Features
-----------
* When constructing a sample set using `SampleSet.from_samples`, labels are sorted (if they are the same type). Controlled by `sort_labels` keyword argument
* Support simplejson encoding
* None can now optionally pass through `graph_argument` decorator
* `chimera_anticluster` bqm generator now supports Chimera subgraphs
* Random generator functions now allow the user to specify a seed
* Added `RoofDualityComposite` which uses roof duality to fix some variables in the bqm

Fixes
-----
* Printing now works for `Response` objects
* `SampleSet.relabel_variables` now correctly resolves the future if the sample set was constructed from `.from_future`

0.8.6

New Features
------------
* `TruncateComposite` which filters high energy solutions out of the sample set to speed up post-processing
* `BinaryPolynomial` class for representing higher-order problems
* `PolySampler` abstract base class for sampling binary polynomials
* `PolyScaleComposite` binary polynomial version of `ScaleComposite`
* `PolyTruncateComposite` binary polynomial version of
`TruncateComposite`
* `SampleSet.data_vectors` property has been restored
* New serialization for `SampleSet` and `BinaryQuadraticModel` including a bytes serialization for `SampleSet`
* New `DimodJSONDecoder` and `dimod_object_hook`, and refactored `DimodJSONEncoder`

Fixes
-----
* `SpinReversalTransformComposite` now correctly uses the flipped bqm
* Can now print large samplesets without triggering a recursion error

Deprecated
----------
* Binary quadratic model sampling in binary polynomial samplers will be removed in 0.9.0
* `SpinReversalTransformComposite` now ignores the `spin_reversal_variables` keyword argument and it will be removed in 0.9.0
* Serialization has been refactored, the bqms and sample sets serialized with the 1.0.0 format are supported until 0.9.0

0.8.5

New Features
------------
* `SampleSet.truncate` method
* `BinaryQuadraticModel.to_serializable` bias_dtype and bytes_type parameters

Fixes
-----
* `BinaryQuadraticModel`s are now pickleable in python2.7
* Some bug fixes in `BinaryQuadraticModel.to_serializable`

0.8.4

New Features
------------
* `assert_bqm_almost_equal` function for testing
* `ScaleComposite`
* `sample_column` optional keyword argument for `SampleSet.to_pandas_df`
* `sample_dict_cast` optional keyword argument for `SampleSet.data`

Fixes
-----
* `BQM.normalize` now ignores ignored variables/interactions when determining scale

0.8.3

New Features
------------
* Faster `BQM.add_interaction`
* `HigherOrderComposite`
* `reverse` kwarg for `SampleSet.data`
* `BQM` alias for `BinaryQuadraticModel`
* `SampleSet.__str__` for nicer printing of samplesets

Fixes
-----
* Fix empty `SampleSet`
* Fix import warning for collections package in python 3.7
* Remove unnecessary type check in `BQM.scale`

0.8.2

Bug Fixes
---------
* Return dict from `BinaryQuadraticModel.to_ising` rather than `LinearView`/`QuadraticView`

0.8.1

New Features
-------------------
* `concatenate` function for combining sample sets
* `SampleSet.aggregate` method to aggregate repeated samples
* `SampleSet.from_samples_bqm` constructor to construct sample sets from raw samples and a binary quadratic model

0.8.0

Changes
------------
* Removed `OrderedBinaryQuadraticModel`
* Change the way the `BinaryQuadraticModel` stores the biases to speed up calculations and to save memory
* Deprecated `Response` in favour of `SampleSet`. `Response` is targeted to be removed in 0.9.0 release
* Updated reference samples and composites to use `SampleSet`
* Moved `dimod.io` namespace under `dimod.serialization`
* Removed `dimod.embedding` subpackage, it is now part of [dwave-system](https://github.com/dwavesystems/dwave-system) under `dwave.embedding` namespace.

New Features
-------------------
* `BinaryQuadraticModel.normalize` method, thanks wbernoudy
* `BinaryQuadraticModel.fix_variables` method
* `BinaryQuadraticModel.energies` method
* `SampleSet.to_pandas` method
* `FixedVariableComposite`, thanks conta877
* `poly_energy` and  `poly_energies` function for higher order polynomials, thanks conta877
* Parameter to ignore some variables/interactions in `BinaryQuadraticModel.normalize` and `BinaryQuadraticModel.scale` methods, thanks conta877
* Fix broken documentation link, thanks schnorea

0.7.9

* Support empty `SampleSet` objects
* Update assert `response_energies` to work with `SampleSet`

0.7.8

* Bugfixes

0.7.7

* New `SampleSet` class as a superclass for `Response`

0.7.6

Allow failure of c++ extension install

0.7.5

* Add `fix_variables` function

0.7.4

* add chain break fraction statistics when unembedding responses

0.7.3

* Add new keyword parameter to `BinaryQuadraticModel.to_coo` and `BinaryQuadraticModel.from_coo`

0.7.2

Bug fixes

0.7.1

* bug fixes in Sampler abc. Thank you to kotarotanahashi for the fix
* Add new `to_serializable` and `from_serializable` methods to BinaryQuadraticModel
* Deprecate `to_json`, `from_json`, `to_bson`, `from_bson` methods on BinaryQuadraticModel

0.7.0

* Change the `Response` object API
* Update the embedding chain break methods to be faster
* Add new serialization methods

0.6.13

* Add `BinaryQuadraticModel.to_numpy_vectors` method
* Add `BinaryQuadraticModel.from_numpy_vectors` method

0.6.12

* add new `make_quadratic` function that reduces higher-order polynomials to binary quadratic models.