-
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 control-flow support to GatesInBasis
#8823
Conversation
It's not yet entirely clear how control-flow will be supported through the `Target` and `basis_gates`, but for the time being, we just test them as if they will be added like any other instruction. This is unlikely to entirely remain the case as more classical handling is added.
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
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.
Thanks for doing this it LGTM, it seems simple and straightforward enough.
My thinking on the support was that a |
Pull Request Test Coverage Report for Build 3163192353
💛 - Coveralls |
At the moment there's an issue that control-flow operations are naturally variadic in qubit count, but even |
For V1, just throwing it in the basis gates will work for now. I suspect we'll probably need to look towards a V2.5 / backwards-compatible V3 as more classical control is added, but it does depend strongly on how much classical processing information we want to pass from backends to Terra. |
Well we can evolve the target interface independently of backend too. That's part of why I made them separate objects (although far from the primary reason). But that's something we'll have to look at for 0.23.0 I guess because it's a general issue for any variable width operation (thinking a global MS gate on ions would have the same problem). I'll open an issue to track this for 0.23.0. |
Oh, good forward thinking with the backend/target split, then - I hadn't fully considered that at all. Yeah, that does give us rather more freedom. |
Summary
It's not yet entirely clear how control-flow will be supported through the
Target
andbasis_gates
, but for the time being, we just test them as if they will be added like any other instruction. This is unlikely to entirely remain the case as more classical handling is added.Details and comments