You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from sympy.physics.quantum import Commutator as Comm
from sympy.physics.quantum import Operator
A = Operator('A')
B = Operator('B')
C = Comm(Comm(Comm(A,B),A),B)
D = Comm(Comm(Comm(A,B),B),A)
E = (C-D).expand(commutator=true)
E
where the expected output would be 0 but it is:
[[[A,B],A],B] - [[[A,B],B],A]
one can invoke the .doit() method:
>>> simplify(E.doit())
0
but arguably Commutator._eval_expand_commutator should already know this identity.
The text was updated successfully, but these errors were encountered:
From http://stackoverflow.com/questions/36095622
where the expected output would be
0
but it is:one can invoke the
.doit()
method:but arguably
Commutator._eval_expand_commutator
should already know this identity.The text was updated successfully, but these errors were encountered: