Define minimal problem per solver class and simplify solver pinging#747
Open
randomir wants to merge 6 commits into
Open
Define minimal problem per solver class and simplify solver pinging#747randomir wants to merge 6 commits into
randomir wants to merge 6 commits into
Conversation
Provide better abstraction and separation of interfaces.
Require `sample_problem` and `upload_problem`.
59b98e0 to
291c82b
Compare
This enables pinging of QCDL solvers, but also removes the inconvenience of having to manually specify the required params (like time_limit) for some (hybrid) solvers.
291c82b to
2c1ca54
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #747 +/- ##
==========================================
- Coverage 89.88% 89.86% -0.02%
==========================================
Files 44 44
Lines 5318 5380 +62
==========================================
+ Hits 4780 4835 +55
- Misses 538 545 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
randomir
commented
May 21, 2026
| raise NotImplementedError | ||
|
|
||
| def sample_qubo(self, qubo, **params): | ||
| def sample_problem(self, |
Member
Author
There was a problem hiding this comment.
Not sure "sample" is the right verb here, long term.
randomir
commented
May 21, 2026
|
|
||
| def upload_bqm(self, bqm): | ||
| @property | ||
| def minimal_problem(self) -> tuple[Any, dict]: |
Member
Author
There was a problem hiding this comment.
Similarly, not sure if "job" instead of problem would be better. I chose "problem" for consistency across Leap, SAPI and Ocean. 🤷
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR we:
minimal_problem,sample_problemandupload_problemare universally defined for all solvers.