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

Fix the inverse method of PauliEvolutionGate #7524

Merged
merged 2 commits into from
Jan 27, 2022

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Jan 13, 2022

Summary

Fix PauliEvolutionGate.inverse which previously computed the
inverse by inverting the evolution time, which is only the correct inverse if the operator
was involved correctly. In particular, this led to the inverse of Trotterization-based time
evolutions being incorrect

Details and comments

By removing the inverse method, the code will rely on the standard inversion of circuits. That's arguably less elegant than inverting the time, but correct 🙂

@Cryoris Cryoris requested a review from a team as a code owner January 13, 2022 12:01
@Cryoris Cryoris added Changelog: Bugfix Include in the "Fixed" section of the changelog stable backport potential The bug might be minimal and/or import enough to be port to stable labels Jan 13, 2022
@coveralls
Copy link

coveralls commented Jan 13, 2022

Pull Request Test Coverage Report for Build 1755487611

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.007%) to 83.17%

Files with Coverage Reduction New Missed Lines %
qiskit/extensions/quantum_initializer/uc.py 2 87.94%
qiskit/pulse/library/waveform.py 3 89.36%
Totals Coverage Status
Change from base Build 1755217678: -0.007%
Covered Lines: 52033
Relevant Lines: 62562

💛 - Coveralls

@kdk kdk added this to the 0.19.2 milestone Jan 25, 2022
Copy link
Member

@1ucian0 1ucian0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks straight forward to me. let's merge it!

@mergify mergify bot merged commit 5429986 into Qiskit:main Jan 27, 2022
mergify bot pushed a commit that referenced this pull request Jan 27, 2022
Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
(cherry picked from commit 5429986)
mergify bot added a commit that referenced this pull request Jan 27, 2022
Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
(cherry picked from commit 5429986)

Co-authored-by: Julien Gacon <gaconju@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants