-
Notifications
You must be signed in to change notification settings - Fork 342
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
feat: Add a with_loop
method to Program
#1717
Merged
MarquessV
merged 15 commits into
master
from
1712-utility-apply-num-shots-loop-directly-to-program-quil
Jan 27, 2024
Merged
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
405acbc
feat: Add a `apply_numshots_loop` method to `Program`
MarquessV 4b3c8d3
update docs
MarquessV 1c360ad
update snapshot
MarquessV 6c49dc2
Update docs/source/programs_and_gates.rst
MarquessV fd920a6
remove unused section
MarquessV 29f47ba
expand example to include execution
MarquessV 30a9867
refactor around suggested API
MarquessV 8cd930f
doc cleanup
MarquessV c97dad4
formatting
MarquessV 158479d
Merge branch 'master' into 1712-utility-apply-num-shots-loop-directly…
MarquessV 5195ba7
remove shot_count from memory_map
MarquessV 33c8b03
add doc for num_iterations param
MarquessV 6ed1480
Merge branch 'master' into 1712-utility-apply-num-shots-loop-directly…
MarquessV 29d6e0e
Merge branch 'master' into 1712-utility-apply-num-shots-loop-directly…
MarquessV 53d8833
Merge branch 'master' into 1712-utility-apply-num-shots-loop-directly…
MarquessV 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# name: test_with_loop | ||
''' | ||
DECLARE ro BIT[1] | ||
DECLARE shot_count INTEGER[1] | ||
DEFFRAME 0 "rx": | ||
HARDWARE-OBJECT: "hardware" | ||
DEFWAVEFORM custom: | ||
1, 2 | ||
DEFCAL I 0: | ||
DELAY 0 1 | ||
MOVE shot_count[0] 100 | ||
LABEL @start-loop | ||
MEASURE q ro[0] | ||
JUMP-UNLESS @end-reset ro[0] | ||
X q | ||
LABEL @end-reset | ||
I 0 | ||
SUB shot_count[0] 1 | ||
JUMP-UNLESS @end-loop shot_count[0] | ||
JUMP @start-loop | ||
LABEL @end-loop | ||
|
||
''' | ||
# --- |
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
Oops, something went wrong.
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.
this is great