-
Notifications
You must be signed in to change notification settings - Fork 575
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
Circuit cutting: Add expansion to cut_circuit transform #2340
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0a23b2f
Add expansion
trbromley 148c240
Reword
trbromley 558307b
Reword raise
trbromley 80b87d2
Add tests
trbromley 55966d9
Add to changelog
trbromley 3052805
Update changelog
trbromley 21189c6
Fix CI
trbromley 2b53e0e
Update changelog
trbromley 94d9d2f
Update max_depth default
trbromley aaaf6bb
Fix
trbromley 2e007cf
Fix tests
trbromley ed9aae5
Merge branch 'master' into qcut_expansion
trbromley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
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.
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.
I'm thrown by the indentation level here, it looks like we're defining the
expand_fn
method here but there some recursive subtlety here:_qcut_expand_fn
usesexpand_fn
which is defined by_qcut_expand_fn
...Is this how it's working?
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.
Yeah I was thrown by this as well 🤔 It makes sense now that I re-read it, but I'm curious if the following would also work?
This is easier for me to grok on first read
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.
Yes good question. It was originally
on line 1236, and this works too. It just makes it hard to track with spies in the test, we'd need one spy for
cut_circuit.expand_fn
(first call) and another for_qcut_expand_fn
(subsequent calls).