def uncouple(expr, jn=None, jcoupling_list=None):
 a = expr.atoms(SpinState)
 for state in a:
  expr = expr.subs(state, _uncouple(state, jn, jcoupling_list))
 return expr

def uncouple ( expr , jn = None , jcoupling_list = None ) : a = expr . atoms ( SpinState ) for state in a : expr = expr . subs ( state , _uncouple ( state , jn , jcoupling_list ) ) return expr
uncouple a coupled spin state gives the uncoupled representation of a coupled spin state .