dwave-system icon indicating copy to clipboard operation
dwave-system copied to clipboard

Optimize LeapHybridSampler.{from_ising,from_qubo}

Open randomir opened this issue 4 years ago • 0 comments

Current implementation of dimod.Sampler.from_qubo and dimod.Sampler.from_ising uses dimod.BinaryQuadraticModel as an intermediate BQM sent to .sample. LeapHybridSampler subclasses dimod.Sampler and inherits these methods.

Consequently, submitting (say) a large dict QUBO to HSS via LeapHybridSampler.sample_qubo creates a throwaway BinaryQuadraticModel before it's converted to a fileview-compatible BQM (e.g. AdjArrayBQM) and uploaded to SAPI.

Ultimately, we plan to update dimod to default to AdjVectorBQM, but before doing that (major change), we can implement LeapHybridSampler.from_ising and LeapHybridSampler.from_qubo to use AdjVectorBQM.

randomir avatar Feb 09 '21 21:02 randomir