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 of tensor_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:

ndarray

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_cart2sph with Tr(T)=0):

  • Tzz  = T20 * sqrt(6) / 4

  • Txx  = -Tzz/2 + Re(T2m2 + T2p2) / 2

  • Tyy  = -Tzz/2 - Re(T2m2 + T2p2) / 2

  • Txy  = Im(T2p2 - T2m2) / 2

  • Txz  = Re(T2m1 - T2p1) / 2

  • Tyz  = -Im(T2m1 + T2p1) / 2