dwavesystems / dwavesystems/dwave-system

Optimize LeapHybridSampler.{from_ising,from_qubo}

Open
#386 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
98
Forks
67
Avg merge
7m
Merged PRs (30d)
1

Description

Current implementation of [`dimod.Sampler.from_qubo`](https://github.com/dwavesystems/dimod/blob/a56318dba98c1321e0caf946e1c10582a83f0ec5/dimod/core/sampler.py#L239) and [`dimod.Sampler.from_ising`](https://github.com/dwavesystems/dimod/blob/a56318dba98c1321e0caf946e1c10582a83f0ec5/dimod/core/sampler.py#L210) 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`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.