Skip to content

9.5.0

Latest

Choose a tag to compare

@randomir randomir released this 15 Sep 23:03
· 14 commits to master since this release
bf5ced1

Changelog

dwave-cloud-client 0.14.6 ➞ 0.14.8

New Features

  • Extend QCDLSolver's sample_qcdl and upload_qcdl to accept QCDLs
    expressed as a Pydantic model (dwave.gate.qcdl.Qcdl).

  • Use open enums for SAPI-returned constants to ensure additive SAPI
    changes don't crash client-side response validation.

  • Allow unknown fields on models for SAPI-returned responses to allow
    additive SAPI changes.

dwave-gate 0.3.5 ➞ 0.6.0

Prelude

First release of dwave-gate with quantum circuit description language
(QCDL) support. QCDL is an embedded domain-specific language, using
Python as its host language, for generating quantum circuit programs via
the @qcdl decorator.

New Features

  • Add the QCDL module (dwave.gate.qcdl), which includes the @qcdl
    decorator and QCDLCircuit for building programs, a library of gates
    and measurement operations, real-time control flow (If/Else,
    While, DoWhile, For, Repeat, etc), and classical registers
    (Register, FixedPointRegister).

  • Add dwave.gate.results.Result, a Pydantic model that decodes a
    solver's answer data, exposing measurements and records, and providing
    get_memory, get_counts, and run_time for retrieving per-shot
    outcomes, sample counts, and run times.

  • Add dwave.gate.results.YieldHandling, an enumeration of strategies
    (only_post_selected_counts, renormalize_distribution, and
    renormalize_distribution_or_raise) for handling shots with
    end-of-line measurement errors (splats) when building counts.

  • Add dwave.gate.utils.tunable_noise_model_helpers, providing
    create_oneq_gate_noise and create_twoq_gate_noise helpers for
    building tunable single- and two-qubit gate noise models.

  • Add dwave.gate.qcdl.LeapQCDLSimulator, a client for running QCDL
    programs on the Dual-Rail simulator hosted in the Leap service. By
    default, it selects the latest accessible QCDL software solver, with
    solver selection and connection configurable via standard
    dwave.cloud.client.Client options. Its run method submits a QCDL
    program together with solver-specific job parameters and returns the
    decoded dwave.gate.results.Result in a concurrent.futures.Future.

  • QCDLModule.one_to_all now accepts any group of qubits as its
    destinations: a Scope, a single QCDLModule, or a sequence of
    either. Qubits are deduplicated by name, preserving the order in which
    they are given.

  • Validate the arguments of the @qcdl decorator and the signature of
    the function it decorates. Because qubits are injected by name, a
    parameter that is not a q<N> previously received nothing and
    Python's own error named only the parameter, giving no hint that
    qubits were involved, and a generated qubit with no parameter to
    receive it was dropped from the program silently. Both now raise and
    explain the q<N> rule and which qubits were supplied. num_qubits
    is checked when the decorator is applied, including a bare @qcdl
    that would otherwise be passed the decorated function as the qubit
    count.

Upgrade Notes

  • Rename QCDL modules to drop the redundant qcdl_ prefix:
    dwave.gate.qcdl.qcdl_circuit is now dwave.gate.qcdl.circuit,
    dwave.gate.qcdl.qcdl_models is now dwave.gate.qcdl.models, and
    dwave.gate.qcdl.qcdl_objects is now dwave.gate.qcdl.objects. Names
    re-exported from dwave.gate.qcdl itself, such as QCDLProgram and
    QCDLStatement, are unaffected.

  • Move LeapQCDLSimulator from dwave.gate.qcdl.leap to
    dwave.gate.leap, and the register mirroring helpers from
    dwave.gate.qcdl.implementations to dwave.gate.implementations.
    Neither module defines the QCDL language itself, so both now sit
    alongside dwave.gate.results. LeapQCDLSimulator is no longer
    re-exported from dwave.gate.qcdl; use
    from dwave.gate.leap import LeapQCDLSimulator.

  • Rename dwave.gate.qcdl.utils to dwave.gate.qcdl._utils to mark it
    private. It contains internal helpers only, and its name collided with
    the public dwave.gate.utils package.

  • Move print_qcdl and display_qcdl, together with
    blacken_qcdl_str, from dwave.gate.qcdl to
    dwave.gate.utils.display. They are no longer exported from
    dwave.gate.qcdl; use
    from dwave.gate.utils.display import print_qcdl. Importing
    dwave.gate.qcdl no longer imports the optional black and IPython
    dependencies.

  • The Result.get_memory and Result.get_counts methods now default to
    the measured register rather than to every qubit in the circuit, so
    bitstrings no longer include a padded unmeasured_value for a qubit
    that was never measured. Pass register=get_default_register(...)
    explicitly to keep the previous, padded register.

Bug Fixes

  • Fix broken documentation references to dwave.gate.results.Result and
    dwave.gate.results.YieldHandling, which were documented under
    dwave.gate, and to dwave.gate.qcdl.operations.measure. Document
    QCDLModuleName under dwave.gate.qcdl.models, where it is defined.

  • Fix QCDLModule.one_to_all raising an AttributeError when
    destinations is a sequence of qubits, such as the qcdl_modules of
    a Scope, rather than the Scope itself.

  • The Result.get_memory and Result.get_counts methods no longer pad
    unmeasured qubits into the bitstring by default, where such a qubit
    was previously read as an outcome. They default to
    Result.get_measurements_register and fall back to every qubit only
    when nothing was measured at all.

  • The YieldHandling.apply method now accepts every key format that the
    count_measurements function produces. Testing keys for a splat
    raised TypeError on the integer keys produced for key_format=None,
    and the all-erasures fallback key is now built only for string keys,
    which are the only ones that can hold a splat.

  • The YieldHandling.apply method now raises ValueError for an empty
    distribution, rather than the StopIteration that its fallback key
    raised for a counts dict that post selection had emptied.

dwave-graphs 1.0.0 ➞ 1.1.0

New Features

  • Add graph automorphism algorithms, including functions for computing
    Schreier representations, sampling automorphisms, and determining
    vertex and edge orbits.

  • Extend automorphism support to Frucht, Shrikhande, and random regular
    graphs, with tests to verify correctness against known counts.

dwave-optimization 0.7.1 ➞ 0.7.3

New Features

  • Add C++ type_list::add (which adds a new type to the type list), type_list::equals (which can check if two type lists are contain the same types) and type_list::update/type_list::vereinigung which allow you to take the union of two or more type lists (similar to Python's set.update().

  • Add DTypes type_list.

  • Add DTypeLike concept for references and const-qualified types.

  • Add C++ Node::num_listeners() method.

  • Add C++ Graph::constants() method.

  • Add MatrixMultiplyNode::operands() method.

  • Add Graph::remove_redundant_nodes() method. See #563.

  • Add Model.remove_redundant_symbols() method. See #563.

  • Add Node::take_successors() method.

  • Allow constructing a submatrix permutation.

  • Add C++ Graph::clear_constraints() method.

  • Add ArraySymbol and Symbol to dwave.optimization.typing. See #603.

  • C++ DisjointBitSetsNode::get_containing_set_index() now accepts a const State&. This allows the containing set of an element to be queried when only a const state is available.

  • Add a C++ Graph::propose(State&) overload that propagates and commits.

  • Add checkpointing to all decision nodes. See #510.

  • Add Graph::pop_decision() and Graph::swap_decisions() methods.

  • Add C++ IsDisjointCoverNode node/symbol, which computes whether a collection of lists are disjoint and cover some primary set.

  • Add IsDisjointCover symbol and is_disjoint_cover function.

  • Use SciPy's scipy.optimize.linprog() function to calculate the state of the LinearProgram symbol when SciPy is available. See #599.

  • Accept ArraySymbolLike inputs to linprog() function.

  • Add dependencies-oldest and dependencies-all-oldest dependency groups.

  • Build wheels for Python 3.15.

  • Add keep argument for Graph::remove_unused_nodes().

Upgrade Notes

  • Rename C++ Graph class's protected members to have a trailing underscore. See #398.

  • Remove C++ Graph::add_successor() method

  • The DType concept is no longer satisfied for const types.

  • Return std::shared_ptr<const bool> from Node::expired_ptr() rather than std::shared_ptr<bool>.

  • Remove AccumulateZipNode::initial attribute and replace it with AccumulateZipNode::initial() method.

  • Require Numpy>=2.

  • Remove the test dependency group.

Bug Fixes

  • Fix FormatCharacter::signedlonglong_ to correctly use q rather than Q. See #406.

  • Include <cassert> in the state.hpp header.

  • Ensure that serialization supports a mix of initialized and uninitialized decision states. Specifically, DisjointLists and DisjointBitSets would raise an error when deserializing a model with not all states initialized. See #585.

  • Prevent using Input.set_state() when the model is not locked. Previously it would raise a segmentation fault. See #584.

  • Modified NumberNode::get_value() arguments so that it accepts a const state as opposed to a non-const state.

  • Add ShapeLike to dwave.optimization.typing.__all__.

dwave-system 1.35.0 ➞ 1.36.0

New Features

  • Support dwave-optimization>=0.1.0,<0.9.

Package versions

dimod==0.12.22
dwave-cloud-client==0.14.8
dwave-gate==0.6.0
dwave-graphs==1.1.0
dwave-hybrid==0.6.16
dwave-inspector==0.5.5
dwave-networkx==0.8.19
dwave-optimization==0.7.3
dwave-preprocessing==0.6.11
dwave-samplers==1.8.0
dwave-system==1.36.0
minorminer==0.2.22
penaltymodel==1.3.0

Package extras

pytorch =
    dwave-pytorch-plugin==0.4.0
qiskit =
    dwave-qiskit-plugin==0.2.0
all =
    dwave-ocean-sdk[pytorch, qiskit]