-
Notifications
You must be signed in to change notification settings - Fork 3
Bug in group_by_operators #12
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
Comments
Thanks for flagging this issue. We looked into it and found that if you use an expression like That said, this doesn’t affect sympt’s output because Again, thank you for providing this insight. We will start working on this, so that users will be able to use Please let us know if you find some other issue, or if there was a misunderstanding from our part of what is that you were trying to point out. |
Ah, thanks for the clarification, good to know. I've looked at the I agree that the bug is insignificant for the |
Hello sympt team!
While implementing second quantization in pymablock, @iarayad and I believe that we saw a bug in your implementation of$H_0$ isn't linear in boson number. In those cases, perturbation theory generates terms like $a^\dagger (a^\dagger a + x)^{-1} a$ . $a^\dagger a: (a^\dagger a + x)^{-1}$ , which is incorrect because the energy denominator does not commute with $a$ . Because
group_by_operators
, which influences the example https://qcode-uni-a.github.io/sympt/examples/I1_Transmon_resonator/ or any other Hamiltonian wheregroup_by_operators
will process this term asgroup_by_operators
is used in all examples as a way to examine the results, it seems like a serious issue.To be able to manipulate expressions with energy denominators, where normal ordering does not work, and also to be able to use sympy simplification routines with operator expressions, we developed a number ordering scheme. Please find its implementation over here:
https://github.com/quantum-tinkerer/pymablock/blob/745a68291e5ae5c1c6c4a1bbfad73c70cf26a20c/pymablock/second_quantization.py#L64-L327
The text was updated successfully, but these errors were encountered: