-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[WIP] introduce GroupingMeasure class #9750
[WIP] introduce GroupingMeasure class #9750
Conversation
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:
|
Pull Request Test Coverage Report for Build 4362567056
💛 - Coveralls |
Just to let you know: this PR is unlikely to see review immediately, and it may well be in the future that we need to go a slightly different direction, but we definitely are thinking about it. We're discussing a generalisation of how measurements are handled in Terra, but there's a lot of knock-on effects we've got to consider to get this right. There are different stages within the Terra compilation model: abstract, possibly user-defined operations when building a It's only the last of these that scheduling and hardware need to be concerned about, but for us we need to make sure we've got the right data structures in place to handle all three. There are a lot of old assumptions about measurements built into the transpiler, and adding more (especially co-opting the opcode |
Thanks Jake. I agree in the long run we need to consider canonicalization of measurement instruction, but on the (pulse/circuit) scheduling side we need more immediate solution. IBM backend provides the
The first bullet is indeed the breaking API change and I want to fix this in this release. Basically we just need to introduce multi qubit measurement as a Qiskit instruction and update V2 converter not to ignore the calibration for it. (edit) Alternatively, we can modify the rest of Qiskit stack to generate grouped measurement calibration on the fly. With this we don't need to introduce new instruction, but there is no guarantee that grouped measurement and collection of single qubit measurements are identical (usually yes though). |
I don't think it's a straightforward change to allow the current Off the top of my head, it'll probably be ok to add a new |
Since I'm not so familiar with BackendV2 issue, I can't review the PR. But I would like to suggest renaming the class name. Grouping seems like abelian grouping to me. How about ConcurrentMeasure? |
Yes, we should give dedicated identifier for new instruction. Note that this instruction is a compiler directive to manage circuit scheduling. I am thinking to add something like
Fair enough. ConcurrentMeasure sounds good to me. |
Thank you for discussion. |
Summary
This PR introduces GroupingMeasure class which is a sub class of Instruction class and enables to n-qubits syncronized measurement in backendV2.
In previous, the class for measure, Measure class limits the number of measured qubit is one.
I expect this PR is a first step for solving failure of schedule with backendV2 and being able to measure all qubits.
Details and comments
related to #9488.