-
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
Support stretchy delays in box
#13899
Draft
jakelishman
wants to merge
3
commits into
Qiskit:main
Choose a base branch
from
jakelishman:box/stretch
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.
Draft
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
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.
This is currently built on top of a roll-up merge of Kevin's `stretchy-delay` branch, and just unifies the handling between `Delay` and `Box` so that they both support the `Expr` stuff. There's no need for Rust-space handling for `box`, because the entirety of the control-flow system isn't handled in Python-space yet. This might need further modification based on Kevin's work on transpiler support. This commit will be rebased and amended along with the rest of the `stretch` patch series.
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: circuit
Related to the core of the `QuantumCircuit` class or the circuit library
mod: transpiler
Issues and PRs related to Transpiler
on hold
Can not fix yet
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.
Summary
This is currently built on top of a roll-up merge of Kevin's
stretchy-delay
branch, and just unifies the handling betweenDelay
andBox
so that they both support theExpr
stuff. There's no need for Rust-space handling forbox
, because the entirety of the control-flow system isn't handled in Python-space yet.This might need further modification based on Kevin's work on transpiler support.
This commit will be rebased and amended along with the rest of the
stretch
patch series.Details and comments
Built on top of both #13869 and #13853.