cgmatrix#
- torchspin.cgmatrix(S1, S2, Stot=None)[source]#
Transformation matrix between uncoupled and coupled spin representations.
- Parameters:
- Returns:
U2C (ndarray, shape (n, n)) – Transformation matrix with elements
<Stot,mStot|mS1,mS2>. Apply as:psi_c = U2C @ psi_u(uncoupled→coupled).Smtot (ndarray, shape (n, 2)) –
[Stot, mStot]for each coupled basis state.m12 (ndarray, shape (n, 2)) –
[mS1, mS2]for each uncoupled basis state.
- Return type:
Notes
Basis ordering matches EasySpin:
Uncoupled: descending mS1 (outer), descending mS2 (inner).
Coupled: descending Stot (outer), descending mStot (inner).
Uses
clebschgordan()to compute each matrix element.