dwavesystems / dwavesystems/dwave-greedy

Add option for continuous sampling

Open
#24 4 comments 1 reaction 0 assignees View on GitHub
feature
Dominant language
Python
Stars
5
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Keeping `N` samples in memory is expensive if we only want the `k` best ones!

Open question is the interface -- `num_reads` is synonymous with `num_samples` returned in sample set for all samplers in Ocean. Also, `initial_states` (even for random states) are expanded to `num_reads` input samples -- something we would also want to avoid in this case.

To retain compatible behavior with existing samplers, perhaps we could introduce a parameter like `num_resample`. Also, `resample_reduce_method` (`min`/`max`). And to support the `k` best samples use case, we'll need a parameter like `num_samples`.

So, something like:
```
ss = greedy.sample(bqm, num_reads=1, num_resample=1000, num_samples=3, resample_reduce_method='k-best')
```

---

Another take on this would be async sampler interface. In which case a caller would yield as many samples are needed, all with minimal memory overhead!

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.