Skip to content
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
merged 22 commits into from
Feb 24, 2020

Conversation

merav-aharoni
Copy link
Contributor

Summary

MPS expectation value is now working correctly for any ordering of the given qubits.

Details and comments

The fix includes the following:

  1. Fix for Pauli expectation value
  2. Fix for matrix expectation value
  3. PR509, that includes 2 new tests in unittest
    Since this PR includes PR509, the latter can be closed. @yaelbh , can you please review?

@chriseclectic chriseclectic added this to the 0.4.1 release milestone Feb 11, 2020
Copy link
Member

@atilag atilag left a 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

@merav-aharoni 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
@mtreinish 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 atilag merged commit 0d010b3 into Qiskit:master 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 <yaelbh@il.ibm.com>
(cherry picked from commit 0d010b3)
@merav-aharoni merav-aharoni deleted the 509 branch March 19, 2020 14:54
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants