Does sympy give me wrong results for the second quantization commutators?

て烟熏妆下的殇ゞ 提交于 2019-12-10 10:09:41

问题


I am using the following code in sympy:

from sympy.physics.secondquant import F, Fd, NO, Commutator
from sympy import symbols

a, b, c, d = symbols("a,b,c,d")

comm = NO(Commutator( Fd(a) * F(b), Fd(c) * F(d) ).doit())
print(comm)
# gives me 0

Clearly, this should not be zero.

Well, maybe I do not understand sympy. Here is what I want to calculate: [F†_a F_b, F†_c F_d] with not necessarily equal indices a, b, c and d.

来源:https://stackoverflow.com/questions/52227318/does-sympy-give-me-wrong-results-for-the-second-quantization-commutators

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!