9.0.0
Highlights
-
Solver identification has changed with SAPI solver representation v3. See
dwave-cloud-clientchanges below for details. -
dwavebinarycsp, deprecated in Ocean 8.1 is now removed in Ocean 9. -
penaltymodelis 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
solverto 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=01dae5a273environment variable:
DWAVE_API_SOLVER='Advantage_system6.4;graph_id=01dae5a273'as an argument to the
dwaveCLI: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.BaseUrlSessionMixinconstructor. This enables mixing with session mixins fromdwave.cloud.api.clientin any order.
- Enable
DWaveAPIClientto 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
SolverIdentitystring 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.identityinstead ofSolver.idto uniquely reference a specific solver and its version.See #696.
-
Feature-based solver filtering via
Client.get_solver()andClient.get_solvers()has been extended to support the newidentityfield (dict),version(dict) andgraph_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
SolverVersionandSolverIdentitytodwave.cloud.api.models. They both compare with adict, and serialize with.dict()for convenience.
- Speed-up
StructuredSolverconstruction by deferring initialization of large data members.nodes,edgesandundirected_edgesare now cached properties, constructed on first access. See #706.
- Add
dwave cachegroup 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.Clientanddwave.cloud.api.client.DWaveAPIClient.Deprecation messages received are raised as Python warnings using a new category,
dwave.cloud.api.exceptions.ResourceDeprecationWarningand logged using theWARNINGlog 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
waitargument to false:Client.close(wait=False).See #712.
Upgrade Notes
- Switch to using solver's
identitystructure in place of the legacy stringid.
Solver.datatype changed from a raw dict (as returned by SAPI) to thedwave.cloud.api.models.SolverConfigurationmodel. This is mostly a backwards-compatible change, since getter/setter interface is supported.
- The type of
solverargument todwave.cloud.api.resources.Problemsmethods (submit_problemandlist_problems) changed from a string, to aSolverIdentitymodel.
-
dwave.cloud.Client.get_regions()which has been deprecated since cloud-client 0.11.0, is now removed in favor ofdwave.cloud.regions.get_regions(). Usage example available in the docs.The main benefit of
get_regionsas a stand-alone function is thatClientdoesn'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
Clientimports fromdwave.cloud.{type}with imports fromdwave.cloud.client.{type}(typebeingqpu,sworhybrid).
- Remove API constants deprecated in 0.13.1 and moved to
dwave.cloud.config.constantsfromdwave.cloud.api.constants:DEFAULT_METADATA_API_ENDPOINT,DEFAULT_REGION,DEFAULT_SOLVER_API_ENDPOINT,DEFAULT_LEAP_API_ENDPOINT.
dwave.cloud.utils.coders.NumpyEncoderis now removed in favor oforjson.dumps()used with theOPT_SERIALIZE_NUMPYflag. We first deprecatedNumpyEncoderin dwave-cloud-client 0.12.2.
Deprecation Notes
Solver.idis deprecated in favor ofSolver.identity. Solver "ID" is not available anymore, so it's constructed on the fly from theidentityfield, with the uniqueness assumption preserved.
solver_idargument indwave.cloud.api.resources.Solvers.get_solver()is deprecated in favor ofsolver_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.ProblemInfomodel in order to support problems not completed (e.g. pending or failed). See #703.
- Preserve
Content-Typeof a response cached withCachingSessionMixin.
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++
ConstantNodeconstructors to acceptconst double*
rather thandouble*. - Add the
Extractsymbol 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 theirsizeinfo(). - Add
.lower_bound(),.upper_bound(), and.integral()methods to
theInputsymbol. - 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
ArgSortsymbol/node which returns a stable argsort of its
predecessor. - Add
expression()decorator for constructing expressions. - Add the
AccumulateZipsymbol and correspondingAccumulateZipNode
node in the C++. This symbol computes an arbitrary accumulate
operation on 1-d arrays, similar tonumpy.ufunc.accumulate, except
that it takes any number of operands/predecessors. The accumulate
operation is supplied by the user and encoded as anExpression. - The
Constantsymbol is now able to pass ownership of the
corresponding numpy array to theConstantNodewhich 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 byConstantsymbols on the
model itself. To support this, a new constructor for the C++
ConstantNodehas been added which takes a special
ConstantNode::DataSourcestruct allowing the Python reference
count to modified when appropriate. - Support automatic constant promotion for arithmetic operations on
Symbols. This enables operations likemodel.binary() + 5, where
the5will automatically be converted to aConstantsymbol and
added to the model. - Add
std::initializer_listandstd::spanoverloads to several
InputNodemethods. - Allow the user to provide an initial value to
ArraySymbol.max(),
.min(),.prod(), and.sum()methods. - Add
Resizesymbol and C++ResizeNode. - Change the behavior of
Model.constant()to keep a cache of
symbols. Multiple calls toModel.constant()with the same array
will no longer create redundant symbols. - Add C++
deduplicate_diff_viewrange view. - Add C++
type_listutility class. - Added
Meansymbol/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.hpptodwave-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
Constantsymbols from read-only NumPy arrays. See
#296. - Fix potential
IndexErrorraised by
capacitated_vehicle_routing_with_time_windows(). See
#306. - Due to the way
AdvancedIndexingNodeheld 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
ArrayIndexingNodewas 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, :\]whereAis a dynamic 2d array,
andiandjare 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
Constantand toArraySymbolstates to
raise aBufferErrorwhen 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 callingArray::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_strengthandinitial_stateare now supported as sampling options inParallelEmbeddingComposite.ParallelEmbeddingCompositeis updated with a newsample_multiplehelper function to allow differentbqms,initial_statesandchain_strengthson all embeddings.
dwavebinarycsp 0.3.1 ➞ REMOVED
Upgrade Notes
- For solving problems with constraints, we recommend using the hybrid solvers in the Leap ™️ service. You can find documentation for the hybrid solvers at https://docs.dwavequantum.com/en/latest/industrial_optimization/.
penaltymodel 1.2.0 ➞ 1.3.0
Deprecation Notes
penaltymodelis 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