Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

QBSolv should be a composite #149

Open
spakin opened this issue Jun 1, 2020 · 1 comment
Open

QBSolv should be a composite #149

spakin opened this issue Jun 1, 2020 · 1 comment

Comments

@spakin
Copy link
Contributor

spakin commented Jun 1, 2020

Current Problem

It strikes me as inconsistent that the QBSolv class is not defined as a composite sampler. If I want to add auto-embedding support to a sampler, I pass the sampler to an AutoEmbeddingComposite. If I want to add reverse-annealing support to a sampler, I pass the sampler to a ReverseAdvanceComposite. If I want to add spin-reversal support to a sampler, I pass the sampler to a SpinReversalTransformComposite. But if I want to add QBSolv support to sampler to break up a large problem, I first create a QBSolv object with no child sampler. Only when I sample from the QBsolv object do I pass QBSolv.sample the sampler I want to use.

Proposed Solution
I propose deriving QBSolv from dimod.Composite. That way, users can treat QBSolv as any other composite sampler, specifying the child at creation time, not at sampling time.

@arcondello
Copy link
Member

I agree. QBSolve pre-dates the notion of a composite, but conceptually you are absolutely correct.

For another approach, I would check out dwave-hybrid's qbsolv-like which will give you more control.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants