-
Notifications
You must be signed in to change notification settings - Fork 375
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
Fixed MPS expectation value when qubits are not given in ascending order #603
Merged
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
…ot in ascending order
…dered in ascending order
atilag
reviewed
Feb 18, 2020
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.
This is a first round of two reviews.
Left some comments so far
src/simulators/matrix_product_state/matrix_product_state_internal.cpp
Outdated
Show resolved
Hide resolved
src/simulators/matrix_product_state/matrix_product_state_internal.cpp
Outdated
Show resolved
Hide resolved
merav-aharoni
changed the title
[WIP] Fixed MPS expectation value when qubits are not given in ascending order
Fixed MPS expectation value when qubits are not given in ascending order
Feb 18, 2020
… documentation accordingly
mtreinish
added
the
stable-backport-potential
The issue or PR might be minimal and/or import enough to backport to stable
label
Feb 24, 2020
atilag
approved these changes
Feb 24, 2020
mtreinish
pushed a commit
to mtreinish/qiskit-aer
that referenced
this pull request
Feb 24, 2020
…der (Qiskit#603) * added support for computing expectation value pauli when qubits are not in ascending order * in expectation_value_pauli, moved the reverse_qubits to before the sort * update MPS expectation value snapshots * added support for expectation value matrix when the qubits are not ordered in ascending order * rewrote the function move_qubits_to_new_position * changed name of method and parameters, to suit functionality * updated documentation accordingly Co-authored-by: yaelbh <[email protected]> (cherry picked from commit 0d010b3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
stable-backport-potential
The issue or PR might be minimal and/or import enough to backport to stable
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
MPS expectation value is now working correctly for any ordering of the given qubits.
Details and comments
The fix includes the following:
Since this PR includes PR509, the latter can be closed. @yaelbh , can you please review?