Refresh composites docs#605
Merged
randomir merged 9 commits intodwavesystems:masterfrom Feb 23, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #605 +/- ##
==========================================
- Coverage 89.66% 86.98% -2.69%
==========================================
Files 22 22
Lines 2013 2013
==========================================
- Hits 1805 1751 -54
- Misses 208 262 +54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
randomir
approved these changes
Feb 20, 2026
Comment on lines
+77
to
+79
| >>> with DWaveSampler() as sampler: | ||
| ... sampleset = CutOffComposite(AutoEmbeddingComposite( | ||
| ... sampler), 0.75).sample(bqm, num_reads=1000) |
Member
There was a problem hiding this comment.
This is perfectly fine, but perhaps cleaner (due to all composites implementing Scoped):
Suggested change
| >>> with DWaveSampler() as sampler: | |
| ... sampleset = CutOffComposite(AutoEmbeddingComposite( | |
| ... sampler), 0.75).sample(bqm, num_reads=1000) | |
| >>> with CutOffComposite(AutoEmbeddingComposite(DWaveSampler()), 0.75) as sampler: | |
| ... sampleset = sampler.sample(bqm, num_reads=1000) |
Actually, even clearer would be to use the cutoff kwarg...
| def parameters(self): | ||
| """A dict where keys are the keyword parameters accepted by the sampler methods | ||
| and values are lists of the properties relevant to each parameter.""" | ||
| """dict: Supported parameters. |
Member
There was a problem hiding this comment.
Perhaps add a type annotation instead of type prefix in the docstring? At least for attributes/properties.
Contributor
Author
There was a problem hiding this comment.
Updated for new return types
| @property | ||
| def children(self): | ||
| """List of child samplers that that are used by this composite.""" | ||
| """list: Child samplers that that are used by this composite.""" |
Contributor
Author
There was a problem hiding this comment.
Thanks, fixed.
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.
No description provided.