(e)
return e.subs(subs_list)
Take a sympy expression with operators and states and apply the operators.

    Examples
    ========

    >>> from sympy.physics.secondquant import apply_operators
    >>> from sympy import sympify
    >>> apply_operators(sympify(3)+4)
    7
Take a sympy expression with operators and states and apply the operators.
Take a sympy expression with operators and states and apply the operators .
def apply_operators(e):
    """
    Take a sympy expression with operators and states and apply the operators.

    Examples
    ========

    >>> from sympy.physics.secondquant import apply_operators
    >>> from sympy import sympify
    >>> apply_operators(sympify(3)+4)
    7
    """
    e = e.expand()
    muls = e.atoms(Mul)
    subs_list = [(m, _apply_Mul(m)) for m in iter(muls)]
    return e.subs(subs_list)
def apply_operators ( e ) : e = e . expand ( ) muls = e . atoms ( Mul ) subs_list = [ ( m , _apply_Mul ( m ) ) for m in iter ( muls ) ] return e . subs ( subs_list )