(self, **hints)
return (a*b - b*a).doit(**hints)
Enables the computation of complex expressions.

        Examples
        ========

        >>> from sympy.physics.secondquant import Commutator, F, Fd
        >>> from sympy import symbols
        >>> i, j = symbols('i,j', below_fermi=True)
        >>> a, b = symbols('a,b', above_fermi=True)
        >>> c = Commutator(Fd(a)*F(i),Fd(b)*F(j))
        >>> c.doit(wicks=True)
        0
Enables the computation of complex expressions.
Enables the computation of complex expressions .
def doit(self, **hints):
        """
        Enables the computation of complex expressions.

        Examples
        ========

        >>> from sympy.physics.secondquant import Commutator, F, Fd
        >>> from sympy import symbols
        >>> i, j = symbols('i,j', below_fermi=True)
        >>> a, b = symbols('a,b', above_fermi=True)
        >>> c = Commutator(Fd(a)*F(i),Fd(b)*F(j))
        >>> c.doit(wicks=True)
        0
        """
        a = self.args[0]
        b = self.args[1]

        if hints.get("wicks"):
            a = a.doit(**hints)
            b = b.doit(**hints)
            try:
                return wicks(a*b) - wicks(b*a)
            except ContractionAppliesOnlyToFermions:
                pass
            except WicksTheoremDoesNotApply:
                pass

        return (a*b - b*a).doit(**hints)
def doit ( self , * * hints ) : a = self . args [ 0 ] b = self . args [ 1 ] if hints . get ( "wicks" ) : a = a . doit ( * * hints ) b = b . doit ( * * hints ) try : return wicks ( a * b ) - wicks ( b * a ) except ContractionAppliesOnlyToFermions : pass except WicksTheoremDoesNotApply : pass return ( a * b - b * a ) . doit ( * * hints )