Alexander Condello
Alexander Condello
I wrote ```python from typing import Optional, Tuple import dimod import numpy as np from dwave.system import LeapHybridSampler def factor(p: int, *, shape: Optional[Tuple[int, int]] = None, sampler: Optional[dimod.Sampler] =...
For large CQMs with lots of linear constraints, the user can run into memory/performance bottlenecks. One place we could potentially relieve the bottleneck is to _not_ encode the linear constraints...
It would be convenient in some cases to scale or normalize the objective and constraints in bulk.
These functions should be better documented, and possibly promoted to the top-level namespace. ~Further, it would be helpful for `unpack_samples()` to also accept an optional `num_variables` parameter.~ edit: that's the...
It would save on needing to do things like ```python qm.add_linear(qm.add_variable('BINARY'), 1.5) ``` and would improve performance for the `_from` methods, e.g. ```python qm.add_linear_from(((v, 0) for v in range(5)), 'BINARY')...
There are times where it would be convenient to add quadratic biases from a large dense array to a BQM or QM. There is currently an internal method [`.add_quadratic_from_dense()`](https://github.com/dwavesystems/dimod/blob/1bfbd3c66641b0121d077fca2002a7c6cd0941be/dimod/binary/cybqm/cybqm_template.pyx.pxi#L273) that...
Right now this can be done with ``` with open(.., 'wb') as f: shutil.copyfileobj(bqm.to_file(), f) ``` but it would be nice to be able to just do ``` with open(..,...
A user may wish to test whether the given sample(s): 1) Have exactly matching variables 2) Have the correct values for the given variable vartype(s) Something like ``` bqm.energies(samples, check_vartypes=True,...
A frequent source of confusion in 0.10 is the distinction between `x` and `'x'` in ```python >>> x = Binary('x') ``` The former is a `dimod.BinaryQuadraticModel` object, the latter is...
It would be helpful to have a method to change the vartype of individual variables across the CQM. Would handle the BQM-to-QM promotions etc.