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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add LinearAncillaComposite #530
add LinearAncillaComposite #530
Changes from 1 commit
acc5e68
b7d11f5
983e5ce
d8416ff
74f4e31
63e4026
5867eba
6751401
080bfa2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping "magnitude" because I am looking for the maximum absolute. Hence assumed to be positive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is the issue that if the value is too big, background susceptibility affects the computation. So I will just mention the minimum requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In practice we may want to share ancillas. This might allow some problems to be programmed that are impossible with unique ancilla per variable. Might be worth adding a comment to this effect somewhere, with a view to a future feature expansion (probably an optional argument).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We share ancillas. We're just biased towards picking the least used ones
https://github.com/dwavesystems/dwave-system/pull/530/files#diff-558dca34f40df626e648cc5dc9cb3f09dcafe585a4e5860a540228d64b33a847R171
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MockSampler can be amended so as to emulate flux_biases as Ising model linear biases:
https://github.com/AndyZzzZzzZzz/shimming-tutorial/blob/andy/tutorial_code/helpers/sampler_wrapper.py
I recommend you use a wrapper like this one and then test optimization using MockSampler().sample
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests in
test_linear_ancilla_composite
do not check for sample correctness. Just for the implementation of ancillas and flux biases in the call. So the MockSampler works for it.The error that I posted yesterday was related to circle CI testing the example in a docstring. In that case I am not sure it's possible to wrap with this fancier mock sampler. If it's not trivial to do so I would skip