-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 representation of box
#13869
Open
jakelishman
wants to merge
1
commit into
Qiskit:main
Choose a base branch
from
jakelishman:box/repr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add representation of box
#13869
Conversation
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
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 13442098597Details
💛 - Coveralls |
f3a933d
to
ce18a24
Compare
This adds in the base `box` control-flow construction, with support for containing instructions and having a literal delay, like the `Delay` instruction. This supports basic output to OpenQASM 3, QPY and some rudimentary support in the text and mpl drawers. The transpiler largely handles things already, since control flow is handled generically in most places. Known issues: - QPY fails to round-trip the `unit` field from an instruction's duration. - We expect this to be able to accept stretches in its duration, just as `Delay` can, which will need a follow-up. - We expect `Box` to support "annotations" in a future release of Qiskit. - There is currently no way in OpenQASM 3 to represent a qubit that is idle during a `box` without inserting a magic instruction on it. - There's no support for import from OpenQASM 3 for `box` yet - that happens in different package (`qiskit-qasm3-import`) right now. - IBM backends don't claim support for `box` yet, so `transpile` against a backend will fail, though you can modify the `Target` to add the instruction manually.
ce18a24
to
13fcd65
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Changelog: New Feature
Include in the "Added" section of the changelog
mod: transpiler
Issues and PRs related to Transpiler
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.
This adds in the base
box
control-flow construction, with support for containing instructions and having a literal delay, like theDelay
instruction.This supports basic output to OpenQASM 3, QPY and some rudimentary support in the text and mpl drawers. The transpiler largely handles things already, since control flow is handled generically in most places.
Known issues:
unit
field from an instruction's duration.Delay
can, which will need a follow-up.Box
to support "annotations" in a future release of Qiskit.box
without inserting a magic instruction on it.box
yet - that happens in different package (qiskit-qasm3-import
) right now.box
yet, sotranspile
against a backend will fail, though you can modify theTarget
to add the instruction manually.Summary
Details and comments
No tests yet, but I tested various things casually - this is just the WIP to show what's going on.
Close #13772.