Skip to content

Define minimal problem per solver class and simplify solver pinging#747

Open
randomir wants to merge 6 commits into
dwavesystems:masterfrom
randomir:feature/solver-minimal-problem-ping
Open

Define minimal problem per solver class and simplify solver pinging#747
randomir wants to merge 6 commits into
dwavesystems:masterfrom
randomir:feature/solver-minimal-problem-ping

Conversation

@randomir
Copy link
Copy Markdown
Member

@randomir randomir commented May 21, 2026

In this PR we:

  • redefine base solvers and their subclasses a bit; now minimal_problem, sample_problem and upload_problem are universally defined for all solvers.
  • add support for pinging any existing solver, without the need to manually specify required parameters

@randomir randomir force-pushed the feature/solver-minimal-problem-ping branch from 59b98e0 to 291c82b Compare May 21, 2026 17:11
randomir added 2 commits May 21, 2026 19:23
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.
@randomir randomir force-pushed the feature/solver-minimal-problem-ping branch from 291c82b to 2c1ca54 Compare May 21, 2026 17:23
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 82.89474% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.86%. Comparing base (b5b9cd0) to head (328dd5e).

Files with missing lines Patch % Lines
dwave/cloud/solver.py 82.19% 13 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread dwave/cloud/solver.py
raise NotImplementedError

def sample_qubo(self, qubo, **params):
def sample_problem(self,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure "sample" is the right verb here, long term.

Comment thread dwave/cloud/solver.py

def upload_bqm(self, bqm):
@property
def minimal_problem(self) -> tuple[Any, dict]:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, not sure if "job" instead of problem would be better. I chose "problem" for consistency across Leap, SAPI and Ocean. 🤷

@randomir randomir requested review from arcondello and thisac May 21, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant