Changelogs » Dimod

PyUp Safety actively tracks 232,000 Python packages for vulnerabilities and notifies you when to upgrade.

Dimod

0.9.5

New Features
  ------------
  * `BQM.normalize` now returns the value the BQM was scaled by
  * `SampleSet.relabel_variables` no longer blocks for unresolved sample sets
  * `FileView` has a new parameter, `ignore_variables` that treats the BQM as integer-labelled
  * `ScaleComposite` no longer blocks
  
  Fixes
  -----
  * `FileView.seek` now works correctly with `io.SEEK_END`
  
  Changes
  -------
  * `BinaryPolynomial` support in `ScaleComposite` has been removed

0.9.4

New Features
  ------------
  • `assert_consistent_bqm` to `dimod.testing` for testing different BQM implementations
  • Testing is now done with parameterized package - this does not affect installed packages
  • FileView version 2.0 with improved docs

0.9.3

New Features
  ------------
  * `pack_samples` kwarg for `SampleSet.to_serializable()` method that allows the user to _not_ pack samples. This means bumping the sample set serialization version to 3.1.0
  
  Fixes
  -----
  * `SampleSet.info` is now correctly propagated through the `ClipComposite`
  * All `.pyx` and `.pxd` files are included in the MANIFEST which means that `cimport dimod` will now work correctly

0.9.2

New Features
  ------------
  * BQM C++ headers are now in `dimod/include/dimod/`. Packages that need access to the headers can get the path using the new `get_dimod_headers()` function. Note that the C++ code is still considered unstable and does not respect semantic versioning.
  * `Initialized` ABC and accompanying `parse_initial_states` method for samplers that accept initial states.
  * `IdentitySampler` that returns passed-in initial states.
  * `ising_to_qubo` function now accepts an underspecified `h` arg.
  
  Fixes
  -----
  * General performance and structural improvements to C++ bqms.
  * cyBQMs are now pickleable and deepcopyable.

0.9.1

Changes
  -------
  * Removed deprecated kwarg in `SpinReversalTransformComposite`
  
  Fixes
  -----
  * `RoofDualityComposite`, `ConnectedComponentComposite` and `FixedVariableComposite` now all work with the new BQM types
  
  New Features
  ------------
  * A sample method testing framework for Samplers
  * Significant documentation update
  * A unified location for header files

0.9.0


        

0.9.0.dev6

Fixes
  -----
  * Fix numpy version range
  * `BQM.get_quadratic` now has consistent/correct behaviour when a default is provided
  * Restored some removed methods, `BQM.to_coo`, `.from_coo`, `.to_numpy_matrix`, `.from_numpy_matrix`, `.to_networkx_graph`, `.from_networkx_graph`
  * `BQM.energies` now raises the correct exception when given bad samples
  
  New Features
  ------------
  * Binary quadratic models can now be constructed from linear/quadratic iterators
  * `BQM.base` attribute to help when constructing from views
  * `BQM.energies` mixin now uses a faster numpy-based energy calculation

0.9.0.dev5

Changes
  -------
  * `BinaryQuadraticModel` now subclasses `AdjDictBQM`
  * Remove `BinaryQuadraticModel.to_coo` and `BinaryQuadraticModel.from_coo`
  * Remove `BinaryQuadraticModel.to_numpy_matrix` and `BinaryQuadraticModel.from_numpy_matrix`
  * Remove `BinaryQuadraticModel.SPIN` and `BinaryQuadraticModel.BINARY`
  * Remove `vartype` keyword argument from `BinaryQuadraticModel.add_variable`, `BinaryQuadraticModel.add_variables`, `BinaryQuadraticModel.add_interaction` and `BinaryQuadraticModel.add_interactions`
  * The `.spin` and `.binary` properties of binary quadratic models are now views rather than copies
  
  New Features
  ------------
  * `as_bqm` function for constructing binary quadratic models
  * Most `BinaryQuadraticModel` methods and properties have been added to `AdjArrayBQM`, `AdjDictBQM`, `AdjMapBQM` and `AdjVectorBQM`

0.9.0.dev4

Fixes
  -----
  * Fix deserialization of variables that are nested tuples
  * Include `shapeablebqm.pyx.src` in the `manifest.ini`

0.9.0.dev3

Fixes
  -----
  * Python 3.5+ wheels are now installable on Windows machines that don't have FH4 exception handling
  * cyBQMs now correctly use the linear biases when constructed with a linear sequence (rather than dict)
  * Install now correctly requires NumPy>=1.16.0
  
  New Features
  ------------
  * Simpler implementation of the `FileView`
  * FileView supports additional `whence` values for `FileView.seek`

0.9.0.dev2

Fixes
  -----
  * `as_samples` now respects the provided dtype for SampleSet inputs
  * cyBQM views now raise the correct exception
  
  New Features
  ------------
  * `BQM.relabel_variables` for the cyBQMs
  * `iter_safe_relabels` decorator
  * The legacy `BinaryQuadraticModel` is now a registered subclass of the `BQM` ABC

0.9.0.dev1

**Development Release**
  
  New Features
  ------------
  * New BQM types: `AdjArrayBQM`, `AdjDictBQM`, `AdjMapBQM` and `AdjVectorBQM`
  
  Changes
  --------
  * Drops support for Python 2.7 and 3.4

0.8.21

New Features
  ------------
  * `SampleSet` objects can now have additional attributes assigned to them
  
  Fixes
  -----
  * Fix float/int issues in deprecated deserialization format

0.8.20

Fixes
  -----
  * `LockableDict` methods that have return values no longer always return None

0.8.19

Fixes
  ------
  * Fix osx wheels for 10.9 binary compatibility
  * `ConnectedComponentComposites` now correctly fixes variables according to vartype

0.8.18

New Features
  ------------
  * `ConnectedComponentComposite`, a composite that will break a BQM into its connected components and solve each on the child sampler separately
  * BQM generator functions now accept edgelists as graphs
  * `ClipComposite`, a composite that will "clip" the biases to be within a specified range
  * `FixedVariableComposite` now handles non-blocking child samplers
  * `ExactPolySolver`, a brute-force solver for binary polynomials
  
  Fixes
  -----
  * `make_quadratic` can now handle much larger binary polynomials without running into the recursion depth limit

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