sympy/sympy — pull request #874 by flacjacket (2011-12-21 20:26:45+00:00)
Title: Improved testing of arbitrary angular momentum coupling

This builds off pull #848 [1] to allow couple and uncouple act on linear combinations of states, which allows one to couple an expression that was generated by uncouple and ensure the same state is returned.

Other notable changes are:
* Change coupling parameters to specify all couplings, rather than implicitly handling the final coupling, as some sign errors can come up when this last coupling is handled differently (j1+j2=j vs j2+j1=j).
* Implementing default coupling scheme for uncouple of non-CoupledSpinStates.
* A bug fix in uncouple in determining the possible configurations.

[0] https://github.com/sympy/sympy/pull/848