dimod.decorators.bqm_structured#

bqm_structured(f)[source]#

Decorator to raise an error if the given BQM does not match the sampler’s structure.

Designed to be applied to Sampler.sample(). Expects the wrapped function or method to accept a BinaryQuadraticModel as the second input and for the Sampler to also be Structured.