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: do not use normal_order as part of commutator methods #1299

Merged
merged 2 commits into from
Dec 7, 2023

Conversation

mrossinek
Copy link
Member

Summary

Fixes #1298

Details and comments

In #1208 we had discussed the inclusion of normal_order into the commutator methods without realizing that this breaks API. Here, I simply remove this call and update the unittests accordingly.
Basically, this means that the user needs to normal-order the result themselves if needed (which is totally fine).

@mrossinek mrossinek added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Dec 7, 2023
robertodr
robertodr previously approved these changes Dec 7, 2023
Copy link
Collaborator

@ftroisi ftroisi left a comment

Choose a reason for hiding this comment

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

@mrossinek Thanks a lot for taking care of this!

@coveralls
Copy link

coveralls commented Dec 7, 2023

Pull Request Test Coverage Report for Build 7125855649

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.765%

Totals Coverage Status
Change from base Build 7083968559: 0.0%
Covered Lines: 8785
Relevant Lines: 10125

💛 - Coveralls

@mrossinek mrossinek requested a review from ftroisi December 7, 2023 08:55
@mrossinek
Copy link
Member Author

Sorry, looks like we got into a race on requesting a review and approving. Please re-approve 😅

@mrossinek mrossinek merged commit 978fcad into qiskit-community:main Dec 7, 2023
@mrossinek mrossinek deleted the fix-commutators branch December 7, 2023 09:38
mergify bot pushed a commit that referenced this pull request Dec 7, 2023
* fix: do not use `normal_order` as part of commutator methods

Fixes #1298

* Update docs

(cherry picked from commit 978fcad)
mergify bot added a commit that referenced this pull request Dec 7, 2023
…1300)

* fix: do not use `normal_order` as part of commutator methods

Fixes #1298

* Update docs

(cherry picked from commit 978fcad)

Co-authored-by: Max Rossmannek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

The commutator methods break API by using normal_order
4 participants