sympy.physics.secondquant:

52 views
Skip to first unread message

Stefanos Kourtis

unread,
May 12, 2015, 5:50:53 PM5/12/15
to sy...@googlegroups.com
Hi all,

shouldn't CreateFermion(1)**2 and AnnihilateFermion(1)**2 automatically return zero? Or perhaps simplify to zero? Is there some way to make such terms cancel automatically?

Best,
Stefanos

j.gont...@gmail.com

unread,
May 18, 2015, 11:37:01 AM5/18/15
to sy...@googlegroups.com
Hi,

Yes, I believe you are right and the square (or any even power) of these operators should always simplify to zero. I am not sure how to do that though...

Any experimented SymPy person, could a proper implementation of _eval_power yield the desired behaviour ?

Jerome

Øyvind Jensen

unread,
May 22, 2015, 1:59:38 AM5/22/15
to sy...@googlegroups.com
Hi,
My sympy-foo is a bit rusty now, but I think you would have to implement this in core.Pow to get automatic simplification of that expression. However, there may be good reasons to avoid putting all kinds of special cases into the core module.

The terms should vanish when you apply Wick's theorem, right? Does that work as expected?

Øyvind
Reply all
Reply to author
Forward
0 new messages