-
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
Pauli-X measurement instruction #7716
Conversation
Pull Request Test Coverage Report for Build 1915762000
💛 - Coveralls |
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.
LGTM. I like this implementation in calibration perspective. Since we can attach calibration per every instruction, a general Pauli measure instruction is difficult to manage because schedule may change depends on the basis.
(but I will hold my approval since I'm not expert of circuit instruction)
I have a question. Should |
@ikkoham This is a good question. See also here: #5311 (comment). |
I think |
Thank you, it would be useful to have an option to leave the Hadamard gate when removing the X measurement. |
What do you mean by this @nkanazawa1989 ? Also is the experiments usecase here that there is a separate measure_x calibration that is different from just a Hadamard+measure? |
The purpose of this PR is to speed-up Aer (statevector method) for VQE circuits. The idea is that VQE circuits will express their expectation value using the new instructions. Consequently, Aer will be able to efficiently simulate multi-qubit Pauli measurements. I'm not sure if the last couple of sentences make sense; at least they made sense some time ago, when I started this work. Possibly, since then, the interface between VQE and Aer has changed, especially in light of the new Estimator primitive. I'm closing this PR, because currently I'm not focused on classical simulation for VQE. I find the addition of instructions less simple than it looks, for reasons detailed in previous comments. Back then, we (@chriseclectic and I) considered two alternatives. The one that we decided to pursue is to add instructions to Terra, and let Aer benefit from them. The other alternative is to build a mechanism in Aer that detects Pauli measurement instructions, in circuits that don't contain them explicitly. |
Summary
This PR replaces the old PR #5311, while addressing the comments there.
Details and comments
measure_x
, when it's finalized (after review) I'll writemeasure_y
.Ready for review if the CI passes.
@1ucian0 @nkanazawa1989 @itoko