Skip to content

6.5.0

Compare
Choose a tag to compare
@arcondello arcondello released this 29 Sep 15:47
· 172 commits to master since this release
8e52e88

dwave-gate 0.2.1 ➞ 0.3.0

New Features

  • Adds support for compiling circuits into the Quantum Intermediate Representation (QIR) language using PyQIR API and qirlib LLVM wrapper.

      circuit = Circuit(2)
    
      with circuit.context as reg:
          ops.X(reg.q[0])
          ops.Y(reg.q[1])
    
      qir_string = circuit.to_qir()

    Circuits can also be compiled directly into bitcode.

      qir_string = circuit.to_qir(bitcode=True)
  • Adds a Quantum Intermediate Representation (QIR) loader which consumes a QIR script and returns a corresponding circuit containing the same instruction.

      ; ModuleID = 'Citrus'
      source_filename = "Citrus"
    
      %Qubit = type opaque
    
      define void @main() {
        entry:
        call void @__quantum__rt__initialize(i8* null)
        call void @__quantum__qis__x__body(%Qubit* null)
        call void @__quantum__qis__y__body(%Qubit* inttoptr (i64 1 to %Qubit*))
        ret void
      }
    
      declare void @__quantum__rt__initialize(i8*)
      declare void @__quantum__qis__x__body(%Qubit*)
      declare void @__quantum__qis__y__body(%Qubit*)
    

    The above QIR script can be loaded into a dwave-gate circuit using the dwave.gate.qir.loader.load_qir_string function.

      from dwave.gate.qir.loader import load_qir_string
    
      circuit = load_qir_string(qir_string, circuit=circuit)

Upgrade Notes

  • Upgrade circuit call to accept classical bits in which to store measurement values. If no bits are passed to the circuit call, measurements will not be stored when circuit is simulated.

      circuit = Circuit(2, 2)
    
      with circuit.context as (q, c):
          ops.Hadamard(q[0])
          ops.Hadamard(q[1])
          ops.Measurement(q) | c
    
      circuit_2 = Circuit(2, 2)
    
      with circuit_2.context as (q, c):
          circuit(q, c)  # pass bits to 'circuit'

Deprecation Notes

  • Support for Python 3.7 deprecated.

Bug Fixes

  • Fix return type from Operation.__call__ and subclasses.

  • Fixes loading QIR scripts with a return mid-function.

  • Fix circular import issue when importing the simulator prior operations.

dwave-preprocessing 0.5.4 ➞ 0.6.3

New Features

  • Make SpinReversalTransformComposite nonblocking.

  • Add a seed parameter to the constructor of SpinReversalTransformComposite.

  • Improve the performance of the Presolver constructor by avoiding an unnecessary copy.

  • Raise an InvalidModelError from Presolver when given a model with float("nan") bounds.

  • Raise an InvalidModelError from Presolver when given a model that has a constraint with float("nan") weight or rhs.

  • Add C++ Presolver::restore() method for restoring samples.

  • Add domain propagation to dwave::presolve::Presolver.

  • Add removing small biases to dwave::presolve::Presolver.

  • Support Numpy>=1.17.3, previously required NumPy>=1.20.0.

  • Add a presolve normalization step to replace inf biases, bounds, offsets, right-hand-sides, etc with a large finite number.

  • A newly instantiated Presolver will now have presolve techniques loaded by default.

  • Add TechniqueFlags enum to represent different presolve techniques.

  • Add C++ dwave::presolve::Presolver::add_techniques(), dwave::presolve::Presolver::set_techniques(), and dwave::presolve::Presolver::techniques() methods for manipulating the presolve techniques that will be used by the presolver.

  • Update Presolver.apply(), Presolver.normalize(), and Presolver.presolve() to release Python's global interpreter lock (GIL).

  • Reimplement the C++ Presolver using the PImpl pattern. This will make it easier to maintain binary compatibility going forward. See #89.

  • Add dwave::presolve::Presolve::normalize() C++ method.

  • Add dwave::presolve::Presolve::presolve() C++ method.

  • Raise an InvalidModelError from Presolver when given a model with float("nan") biases.

  • Add Presolver.feasibility() method to return a Feasibility enum. This can be used to test the feasibility of presolved models.

  • Add time_limit_s keyword argument to Presolver.presolve().

  • Add time_limit argument to C++ method dwave::presolve::Presolver::presolve().

  • Add Presolver.normalize() method. See #78.

  • Add Presolver.presolve() method. See #78.

Upgrade Notes

  • The wrapped C++ dwave::presolve::Presolver held by cyPresolver.cpppresolver is now stored as a pointer.

  • Remove C++ PostSolver class. See #90.

  • A newly instantiated Presolver will now have presolve techniques loaded by default. Previously it would have no techniques loaded and the user would need to also call Presolver.load_default_presolvers().

  • Remove the C++ dwave::presolve::Presolver::load_default_presolvers() method.

  • The C++ Presolver no longer has a header-only implementation.

  • Raise an InvalidModelError rather than a RuntimeError when presolving a detached model.

  • Change Presolver to no longer raise an InfeasibleModelError error for infeasible models.

  • Remove the InfeasibleModelError.

  • Speed up PresolverImpl::normalization_remove_invalid_markers() C++ method. This gives faster presolve normalization times for models with many discrete constraints.

  • Speed up PresolverImpl::technique_remove_small_biases() C++ method. This gives faster presolve times for models with many small biases.

Bug Fixes

  • Fix ImportError being raised on Windows when other dwave namespace packages are installed after dwave-preprocessing. See #130.

  • Fix the handling of quadratic constraints in presolve. Previously fixing variables in quadratic constraints would result in memory errors. See dimod#1351.

Deprecation Notes

  • Drop support for Python 3.7.

  • Deprecate Presolver.load_default_techniques(). Use Presolver.set_techniques(TechniqueFlags.Default) instead.

dwave-samplers 1.0.0 ➞ 1.1.0

New Features

  • Add timing information for SteepestDescentSolver.

  • Add timing information for SimulatedAnnealingSampler.

  • Add randomize_order keyword argument to the SimulatedAnnealingSampler.sample() method. This controls whether the variables are updated in a random order or not.

  • Add proposal_acceptance_criteria keyword argument to the SimulatedAnnealingSampler.sample() method. This controls whether the sampler will use Gibbs or Metropolis updates.

Upgrade Notes

  • Build extensions with C++17.

Bug Fixes

  • Fix ImportError being raised on Windows when other dwave namespace packages are installed after dwave-samplers. See #57.

dwave-system 1.19.0 ➞ 1.20.0

New Features

  • Support Python 3.11

Upgrade Notes

  • Require dimod>=0.12.7

dimod 0.12.6 ➞ 0.12.12

New Features

  • Implement CaseLabelDQM.to_file() when the keyword argument ignore_labels is true. Also make the error message clearer in the case that ignore_labels is false.

  • Improve the performance of ConstrainedQuadraticModel.from_discrete_quadratic_model().

  • Add dimod.generators.magic_square() which allows for the generation of a constrained quadratic model whose feasible solutions are normal magic squares. The function also generates magic squares of squares when passed power=2 as a keyword argument.

  • Implement version 2.0 of constrained quadratic model serialization. See ConstrainedQuadraticModel.to_file() for details.

  • Improve LP file reading by wrapping HiGHS LP file parser.

  • Add C++ ConstrainedQuadraticModel::remove_constraints_if() method.

  • Add Constraint.is_onehot() method.

  • Add dimod::Expression::remove_variables() C++ method. This method is useful for removing variables in bulk from the objective or constraints of a constrained quadratic model.

  • Make SampleSet.relabel_variables() non-blocking in all cases. Previously it would block when inplace=False.

  • Implement SampleSet serialization schema version 3.2.0.

    Version 3.2.0 replaces float values that represent integers with int in the "data" field of any arrays returned by SampleSet.to_serializable(). In some pathological cases this can result in a much smaller representation when the data dictionaries are json-serialized by avoiding the redundant .0 appended to every value.

    This is a backwards-compatible change.

  • Add penalization_method parameter to BinaryQuadraticModel.add_linear_inequality_constraint(). It allows the use of unbalanced penalization https://arxiv.org/abs/2211.13914 instead of the slack variables method for the inequality constraints.

  • Add mimo() function for generating a multi-input multiple-output (MIMO) channel-decoding problem.

  • Add coordinated_multipoint() function for generating a coordinated multi-point (CoMP) decoding problem.

Upgrade Notes

  • Make the arguments of DiscreteQuadraticModel.to_file() keyword-only.

  • Remove the ObjectView.to_file() method.

  • Remove the ConstraintView.to_file() method.

  • Remove dimod::lp C++ namespace.

  • Drop support for Python 3.7.

Bug Fixes

  • Fix ConstrainedQuadraticModel.from_discrete_quadratic_model() incorrectly formulating the discrete constraints. This bug was
    introduced in version 0.12.7.

  • Fix dimod.generators.frustrated_loop() to correctly handle graphs with tuple labels. See #1342.

  • Fix dimod::ConstrainedQuadraticModel::fix_variables() C++ method to work correctly with quadratic objectives and constraints. This fixes a bug introduced in dimod 0.12.5. See #1351.

  • Fix the behavior of SampleSet.relabel_variables() when inplace=True. Previously the method incorrectly returned a copy when the sample set was unresolved.

minorminer 0.2.11 ➞ 0.2.12

Fixes

  • Deploy x86 macOS wheels targeting 10.9 rather than 12.0.

Upgrades

  • Drop support for Python 3.7.
dimod==0.12.12
dwave-cloud-client==0.10.6
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.6.3
dwave-samplers==1.1.0
dwave-system==1.20.0
dwave-tabu==0.5.0
dwavebinarycsp==0.2.0
minorminer==0.2.12
penaltymodel==1.0.2
pyqubo==1.4.0

# extras: all
dwave-gate==0.3.0