'The Commutator [A,B] is on canonical form if A < B.
Examples
>>> from sympy.physics.secondquant import Commutator, F, Fd
>>> from sympy.abc import x
>>> c1 = Commutator(F(x), Fd(x))
>>> c2 = Commutator(Fd(x), F(x))
>>> Commutator.eval(c1, c2)
0'

@classmethod
def eval(cls, a, b):

    if (not (a and b)):
        return S.Zero
    if (a == b):
        return S.Zero
    if (a.is_commutative or b.is_commutative):
        return S.Zero
    a = a.expand()
    if isinstance(a, Add):
        return Add(*[cls(term, b) for term in a.args])
    b = b.expand()
    if isinstance(b, Add):
        return Add(*[cls(a, term) for term in b.args])
    (ca, nca) = a.args_cnc()
    (cb, ncb) = b.args_cnc()
    c_part = (list(ca) + list(cb))
    if c_part:
        return Mul(Mul(*c_part), cls(Mul._from_args(nca), Mul._from_args(ncb)))
    if (isinstance(a, BosonicOperator) and isinstance(b, BosonicOperator)):
        if (isinstance(b, CreateBoson) and isinstance(a, AnnihilateBoson)):
            return KroneckerDelta(a.state, b.state)
        if (isinstance(a, CreateBoson) and isinstance(b, AnnihilateBoson)):
            return (S.NegativeOne * KroneckerDelta(a.state, b.state))
        else:
            return S.Zero
    if (isinstance(a, FermionicOperator) and isinstance(b, FermionicOperator)):
        return (wicks((a * b)) - wicks((b * a)))
    if (a.sort_key() > b.sort_key()):
        return (S.NegativeOne * cls(b, a))
