Skip to content

9.0.0

Choose a tag to compare

@randomir randomir released this 10 Sep 21:17
· 127 commits to master since this release
ac00e72

Highlights

  • Solver identification has changed with SAPI solver representation v3. See dwave-cloud-client changes below for details.

  • dwavebinarycsp, deprecated in Ocean 8.1 is now removed in Ocean 9.

  • penaltymodel is deprecated and will be removed in Ocean 10.

Changelog

dimod 0.12.20 ➞ 0.12.21

New Features

  • Add support for Python 3.14.

Bug Fixes

  • Fix Variables._relabel() method. Previously when given a superset
    of labels that happen to correspond to valid indices the wrong
    relabelling would sometimes be applied. See also
    #1408.

dwave-cloud-client 0.13.6 ➞ 0.14.0

Prelude

Solver identification has changed with SAPI solver representation v3. Instead of a unique string id, each solver is now uniquely referenced by a more descriptive identity dictionary. Each solver still has a name, but to uniquely identify a specific working graph of a structured solver (QPU), graph_id has to be used. Hybrid (unstructured) solvers are still uniquely identified by their name.

New Features

  • Allow solver to be specified using the new solver identity string representation.

    The new format is supported in a config file:

    [my-experiment]
    solver = Advantage_system6.4;graph_id=01dae5a273
    

    environment variable:

    DWAVE_API_SOLVER='Advantage_system6.4;graph_id=01dae5a273'
    

    as an argument to the dwave CLI:

    dwave solvers -s 'Advantage_system6.4;graph_id=01dae5a273'
    

    or as the client constructor argument:

    from dwave.cloud import Client
    
    with Client.from_config(solver='Advantage_system6.4;graph_id=01dae5a273') as client:
      solver = client.get_solver()
    
      assert(solver.name == 'Advantage_system6.4')
      assert(solver.graph_id == '01dae5a273')
    

    Note: specifying your solver via name only is still possible. In that case, working graph version is not constrained.

    See #714.

  • Pass-through unused keyword arguments in dwave.cloud.utils.http.BaseUrlSessionMixin constructor. This enables mixing with session mixins from dwave.cloud.api.client in any order.
  • Enable DWaveAPIClient to properly cache different API response representation versions by reordering session mixins. Caching layer is now below the API version handling, hence capturing changes from the versioning layer.
  • Facilitate cached content validation and parsing by caching the response content type as part of metadata in dwave.cloud.api.client.CachingSessionMixin.
  • Make SolverIdentity string representation more explicit. Version components are now clearly identified, avoiding ambiguity and enabling reverse lookups (i.e. conversion between string representation and solver identity structure).

    Add SolverIdentity.from_id() factory that creates solver identity model off its string representation.

    See #713.

  • Implement support for SAPI v3 solver representation format. Use it by default.

    Use Solver.identity instead of Solver.id to uniquely reference a specific solver and its version.

    See #696.

  • Feature-based solver filtering via Client.get_solver() and Client.get_solvers() has been extended to support the new identity field (dict), version (dict) and graph_id (string). For example:

    client.get_solvers(name='Advantage_system6.4', graph_id='01dae5a273')
    client.get_solvers(graph_id='01dae5a273')
    client.get_solvers(version__graph_id='01dae5a273')
    client.get_solvers(identity__version={'graph_id': '01dae5a273'})
    client.get_solvers(category='qpu', order_by='graph_id')
    client.get_solver(id='Advantage_system6.4;graph_id=01dae5a273')
    
  • Add SolverVersion and SolverIdentity to dwave.cloud.api.models. They both compare with a dict, and serialize with .dict() for convenience.
  • Speed-up StructuredSolver construction by deferring initialization of large data members. nodes, edges and undirected_edges are now cached properties, constructed on first access. See #706.
  • Add dwave cache group of commands for listing cache directories used by the cloud-client, displaying additional information about the cache, as well as purging it. See #719.
  • Add support for Leap deprecation messages to dwave.cloud.client.Client and dwave.cloud.api.client.DWaveAPIClient.

    Deprecation messages received are raised as Python warnings using a new category, dwave.cloud.api.exceptions.ResourceDeprecationWarning and logged using the WARNING log level.

    See #721.

  • Enable the previous client close behavior to wait for all remote jobs to finish.

    Waiting for all jobs to finish and their results to be downloaded before shutting down the client is now the new default. To close the client as fast as possible (immediately preventing status polls and answer downloads), set the wait argument to false: Client.close(wait=False).

    See #712.

Upgrade Notes

  • Switch to using solver's identity structure in place of the legacy string id.
  • Solver.data type changed from a raw dict (as returned by SAPI) to the dwave.cloud.api.models.SolverConfiguration model. This is mostly a backwards-compatible change, since getter/setter interface is supported.
  • The type of solver argument to dwave.cloud.api.resources.Problems methods (submit_problem and list_problems) changed from a string, to a SolverIdentity model.
  • dwave.cloud.Client.get_regions() which has been deprecated since cloud-client 0.11.0, is now removed in favor of dwave.cloud.regions.get_regions(). Usage example available in the docs.

    The main benefit of get_regions as a stand-alone function is that Client doesn't have to be instantiated (and configured to use the default region), just to be able to fetch the list of regions.

  • We removed (previously deprecated) aliases for client types.

    Replace your Client imports from dwave.cloud.{type} with imports from dwave.cloud.client.{type} (type being qpu, sw or hybrid).

  • Remove API constants deprecated in 0.13.1 and moved to dwave.cloud.config.constants from dwave.cloud.api.constants: DEFAULT_METADATA_API_ENDPOINT, DEFAULT_REGION, DEFAULT_SOLVER_API_ENDPOINT, DEFAULT_LEAP_API_ENDPOINT.
  • dwave.cloud.utils.coders.NumpyEncoder is now removed in favor of orjson.dumps() used with the OPT_SERIALIZE_NUMPY flag. We first deprecated NumpyEncoder in dwave-cloud-client 0.12.2.

Deprecation Notes

  • Solver.id is deprecated in favor of Solver.identity. Solver "ID" is not available anymore, so it's constructed on the fly from the identity field, with the uniqueness assumption preserved.
  • solver_id argument in dwave.cloud.api.resources.Solvers.get_solver() is deprecated in favor of solver_name.

Bug Fixes

  • Fix tests to never (accidentally) contact 3rd-party mock sites nor depend on their functionality. See #707.
  • Make answer field optional on the dwave.cloud.api.models.ProblemInfo model in order to support problems not completed (e.g. pending or failed). See #703.
  • Preserve Content-Type of a response cached with CachingSessionMixin.

dwave-inspector 0.5.4 ➞ 0.5.5

New Features

  • Implement support for the new solver identity concept available as of dwave-cloud-client>=0.14.0.

Upgrade Notes

  • Drop support for dwave-cloud-client<0.13.0.

dwave-optimization 0.6.2 ➞ 0.6.4

New Features

  • Update the C++ ConstantNode constructors to accept const double*
    rather than double*.
  • Add the Extract symbol and node, following the behavior of
    numpy.extract. See
    #272.
  • Allow BinaryOpNode (which Add, And, Multiply, etc. rely on) to
    accept two dynamic-sized predecessors, as long as they have an
    equivalent shape as determined by their sizeinfo().
  • Add .lower_bound(), .upper_bound(), and .integral() methods to
    the Input symbol.
  • The Where node/symbol now supports the case of all three
    predecessors being dynamic, as long as they have the same shape and
    size.
  • Add ArgSort symbol/node which returns a stable argsort of its
    predecessor.
  • Add expression() decorator for constructing expressions.
  • Add the AccumulateZip symbol and corresponding AccumulateZipNode
    node in the C++. This symbol computes an arbitrary accumulate
    operation on 1-d arrays, similar to numpy.ufunc.accumulate, except
    that it takes any number of operands/predecessors. The accumulate
    operation is supplied by the user and encoded as an Expression.
  • The Constant symbol is now able to pass ownership of the
    corresponding numpy array to the ConstantNode which prevents the
    numpy array from being garbage collected even after the symbol has
    been collected. This means it is no longer necessary to save
    references to all the numpy arrays used by Constant symbols on the
    model itself. To support this, a new constructor for the C++
    ConstantNode has been added which takes a special
    ConstantNode::DataSource struct allowing the Python reference
    count to modified when appropriate.
  • Support automatic constant promotion for arithmetic operations on
    Symbols. This enables operations like model.binary() + 5, where
    the 5 will automatically be converted to a Constant symbol and
    added to the model.
  • Add std::initializer_list and std::span overloads to several
    InputNode methods.
  • Allow the user to provide an initial value to ArraySymbol.max(),
    .min(), .prod(), and .sum() methods.
  • Add Resize symbol and C++ ResizeNode.
  • Change the behavior of Model.constant() to keep a cache of
    symbols. Multiple calls to Model.constant() with the same array
    will no longer create redundant symbols.
  • Add C++ deduplicate_diff_view range view.
  • Add C++ type_list utility class.
  • Added Mean symbol/node which returns the mean of its predecessor.
  • Add support for Python 3.14.

Upgrade Notes

  • Switch from pkgutil-style namespace package to native namespace
    package (PEP 420). While native namespace packages and pkgutil-style
    namespace packages are largely compatible, we recommend using only
    native ones going forward.
  • Move C++ deduplicate_diff() function from
    dwave-optimization/utils.hpp to dwave-optimization/array.hpp.
  • Change the signatures of the C++ ravel_multi_index() and
    unravel_index() functions to accept shapes rather than strides.
    This is consistent with NumPy.
  • Remove C++ Array::View::at() method.

Bug Fixes

  • Fix constructing Constant symbols from read-only NumPy arrays. See
    #296.
  • Fix potential IndexError raised by
    capacitated_vehicle_routing_with_time_windows(). See
    #306.
  • Due to the way AdvancedIndexingNode held the data for
    its shape in the dynamic size case (i.e. when the indexers are
    dynamic), it was possible to encounter issues when mutating multiple
    states on the model. This has been fixed by tracking the shape on
    the node's state data.
  • Previously, the size info as reported by
    ArrayIndexingNode was correct only when the advanced
    indexing operation had no empty slices (i.e. all axes were specified
    with indexing arrays), and even in that case, the full size
    information from the indexing predecessors was not utilized. This
    has been fixed, so certain operations on advanced indexing nodes may
    now be allowed that weren't previously, and a size check may fail
    on certain models that worked before (operations such as
    A + B\[i,:, j, :\] where A is a dynamic 2d array,
    and i and j are dynamic 1d arrays, but
    the dimensions do not match).
  • Fix C++ SizeInfo::substitute() method. Previously it would not
    correctly update the min/max.
  • Fix C++ BasicIndexingNode::sizeinfo() and
    AdvancedIndexingNode::sizeinfo() methods. Previously they would
    sometimes report incorrect size information when indexing or being
    indexed by dynamic nodes.
  • Previously, the check in BinaryOpNode (used by Add, Subtract,
    Maximum, etc) for ensuring that predecessors have the same dynamic
    size did not recurse, meaning that the node might reject some
    predecessors that were actually valid. This has been fixed.
  • Update buffer access to Constant and to ArraySymbol states to
    raise a BufferError when requesting unsupported flags.
  • Implement the C++ UnaryOpNode::sizeinfo() method to handle unary
    operations on dynamic arrays.
  • There was an issue on some models with "diamonds" in the multi-DAG
    structure where adding subsequent nodes could trigger a exponential
    recursion of calling Array::min()/max(). This has been fixed by
    using a min/max cache by default in these methods.

dwave-preprocessing 0.6.9 ➞ 0.6.10

Prelude

Add srts option to SpinReversalTransformComposite

New Features

  • Allow non-random specification of spin reversal transforms.

dwave-system 1.32.0 ➞ 1.33.0

New Features

  • Begin using reno for changelog.

    We began using Reno as a changelog tool after the release of 1.32.0. Content added before that release is not included. See releases for previous release notes.

  • Add support for the new solver identity concept available in dwave-cloud-client>=0.14.0.
  • Speed-up embedding/unembedding in all embedding composites for the special case of one-to-one embeddings, i.e. subgraphs.

    See #579.

  • chain_strength and initial_state are now supported as sampling options in ParallelEmbeddingComposite.

    ParallelEmbeddingComposite is updated with a new sample_multiple helper function to allow different bqms, initial_states and chain_strengths on all embeddings.

dwavebinarycsp 0.3.1 ➞ REMOVED

Upgrade Notes

penaltymodel 1.2.0 ➞ 1.3.0

Deprecation Notes

  • penaltymodel is deprecated and will be removed in Ocean 10. For solving problems with constraints, we recommend using the hybrid solvers in the Leap service.

Package versions

dimod==0.12.21
dwave-cloud-client==0.14.0
dwave-gate==0.3.4
dwave-hybrid==0.6.14
dwave-inspector==0.5.5
dwave-networkx==0.8.18
dwave-optimization==0.6.4
dwave-preprocessing==0.6.10
dwave-samplers==1.6.0
dwave-system==1.33.0
minorminer==0.2.19
penaltymodel==1.3.0