-
Notifications
You must be signed in to change notification settings - Fork 208
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
The commutator
methods break API by using normal_order
#1298
Labels
Comments
Merged
mrossinek
added a commit
to mrossinek/qiskit-nature
that referenced
this issue
Dec 7, 2023
mrossinek
added a commit
to mrossinek/qiskit-nature
that referenced
this issue
Dec 7, 2023
mrossinek
added a commit
that referenced
this issue
Dec 7, 2023
* fix: do not use `normal_order` as part of commutator methods Fixes #1298 * Update docs
mergify bot
added a commit
that referenced
this issue
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
Environment
What is happening?
The methods provided by the
qiskit_nature.second_q.operators.commutators
module call.normal_order()
even though they canNOT because this method is not part of theSparseLabelOp
API. I am honestly very surprised how our linters did not catch this.How can we reproduce the issue?
I found this while testing something with the
MajoranaOp
from #1270, but we can also reproduce it with theSpinOp
which has nonormal_order
method.This results in:
What should happen?
The methods should work for any
SparseLabelOp
. This bug was introduced by #1210 which attempted to fix #1208.@ftroisi we should figure out a different way of fixing that problem with the
BosonicOp
.Any suggestions?
No response
The text was updated successfully, but these errors were encountered: