tensor_sph2cart#
- torchspin.tensor_sph2cart(T2)[source]#
Convert rank-2 spherical tensor components to a 3×3 Cartesian tensor.
Port of EasySpin’s
tensor_sph2cart.m. Inverse oftensor_cart2sph.- Parameters:
T2 (array_like, shape (5,)) – Spherical components
[T2m2, T2m1, T20, T2p1, T2p2](q = −2, −1, 0, +1, +2).- Returns:
T (ndarray, shape (3, 3)) – Symmetric traceless 3×3 Cartesian tensor (real if input is a real traceless tensor).
- Return type:
Notes
The rank-2 spherical components capture only the traceless part of a symmetric tensor (5 independent components). The isotropic (trace) part is not recoverable from T2 alone. The reconstruction assumes Tr(T) = 0.
Inverse formulae (derived from
tensor_cart2sphwith Tr(T)=0):Tzz = T20 * sqrt(6) / 4Txx = -Tzz/2 + Re(T2m2 + T2p2) / 2Tyy = -Tzz/2 - Re(T2m2 + T2p2) / 2Txy = Im(T2p2 - T2m2) / 2Txz = Re(T2m1 - T2p1) / 2Tyz = -Im(T2m1 + T2p1) / 2