dimod
dimod copied to clipboard
A shared API for QUBO/Ising samplers.
**Application** Unbalanced penalization is an alternative way to represent inequality constraints without the need of using extra slack variables. We have shown that this method works well for the bin...
**Description** DQM's [adj property](https://docs.ocean.dwavesys.com/en/stable/docs_dimod/reference/generated/dimod.DiscreteQuadraticModel.adj.html) only works when all interactions are zero. **Steps To Reproduce** * Fails: ``` >>> dqm = dimod.DiscreteQuadraticModel() >>> dqm.add_variable(2) >>> dqm.add_variable(2) >>> dqm.set_linear(0, [1, -1]) #...
**Application** The terms of a `BinaryPolynomial` are implemented with `frozenset`. Python sets are unordered in a non-deterministic way. This leads to some interesting behavior that propagates to the related functions,...
**Application** We should implement a variant of fix_variables that is optimised for fixing a large number of variables. The current implementation iterates over the variables to be fixed first, then...
**Description** I can first add a constraint that acts as an upper bound and then set an upper bound on the variable but I am not allowed to do the...
Speeds up adding linear constraints to the CQM. We get about a 10x speedup. ```python import time import dimod import numpy as np num_variables = 1_000 num_constraints = 5_000 pnz...
**Application** Often, we need to store the fingerprint of a CQM object. This may be useful when one needs to store a CQM object in memory or on disk or...
Quadratic interactions between continuous variables are not supported. However, it is possible to build a CQM object with quadratic interaction between two real variables by "bypassing" some checks. This happens...
Closes https://github.com/dwavesystems/dimod/issues/849
Right now, to remove multiple variables from a QM, one uses a loop like ```C++ for (auto& v : to_remove) { expression.remove_variable(v); } ``` it would nice to be able...