Skip to content

6.4.0

Choose a tag to compare

@randomir randomir released this 02 Jun 02:11
· 662 commits to master since this release

Changelog

dimod 0.12.3 ➞ 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.

dwave-cloud-client 0.10.4 ➞ 0.10.5

New Features

  • Add strict_mode support to VersionedAPISession. Strict mode is now the default, implying API requests will fail if type/version is expected and the response doesn't include it.

  • Add version_strict_mode config option to DWaveAPIClient. It corresponds to underlying session's (VersionedAPISession) strict_mode.

  • Add VersionedAPISession, a requests.Session subclass (more precisely, further specialized LoggingSession) that enforces conformance of API response version with supported version range(s).

  • Add accepts decorator for declaring accepted media type and response format version (range) on dwave.cloud.api.Resource methods.

  • Simplify dwave.cloud.api.resource.accepts interface (require only media_type and version), but retain flexibility (pass all keyword arguments to VersionedAPISession.set_accept).

  • Support strict_mode control of API response type validation via @accepts interface.

Upgrade Notes

  • Response type version is now always required (regardless of strict_mode) if type is expected and received, and version is expected.

  • Enforce D-Wave API response format version on all cloud.api resources.

Bug Fixes

  • Fix dwave.cloud.api.resources.accepts to allow for partial decoration of Resource methods. See #544.

dwave-inspector 0.4.1 ➞ 0.4.2

Bug Fixes

dwave-networkx 0.8.13 ➞ 0.8.14

New Features

Upgrade Notes

dwave-system 1.18.0 ➞ 1.19.0

New Features

Fixes

dwave-gate 0.2.0 ➞ 0.2.1

New Features

  • Measurement samples can be returned as bitstrings instead of integers in nested lists.

  • A density matrix representation of the state can be accessed via the Circuit.density_matrix
    property, for both pure and mixed states (with the former being lazily calculated from the state
    vector).

Upgrade Notes

  • Adds support for multi-qubit sampling in measurements. Measurement.sample() and
    Measurement.expval() are updated to accept a sequence of qubit indices to sample, sampling
    all measured qubits if none are given.

    circuit = Circuit(2, 2)
    
    with circuit.context as (q, c):
        ops.X(q[0])
        m = ops.Measurement(q) | c
    
    simulate(circuit)
    
    m.sample(num_samples=3, as_bitstring=True)
    # ['10', '10', '10']
  • The state is now stored in the Circuit object (same as the bits/measurement results) instead
    of being returned by the simulate() function. It can now be accessed via the
    Circuit.state property.

Package versions

dimod==0.12.6
dwave-cloud-client==0.10.5
dwave-greedy==0.3.0
dwave-hybrid==0.6.10
dwave-inspector==0.4.2
dwave-neal==0.6.0
dwave-networkx==0.8.14
dwave-preprocessing==0.5.4
dwave-samplers==1.0.0
dwave-system==1.19.0
dwave-tabu==0.5.0
dwavebinarycsp==0.2.0
minorminer==0.2.11
penaltymodel==1.0.2
pyqubo==1.4.0

# extras: all
dwave-gate==0.2.1