e3x.so3.rotations.wigner_d

e3x.so3.rotations.wigner_d(rot, max_degree, cartesian_order=True)[source]

Wigner-D matrix corresponding to a given \(3\times3\) rotation matrix.

Transform \(3\times3\) rotation matrices to \((\mathrm{max\_degree}+1)^2 \times (\mathrm{max\_degree}+1)^2\) Wigner-D matrices that can be used to rotate irreducible representations of \(\mathrm{SO}(3)\).

Example

>>> import jax
>>> import jax.numpy as jnp
>>> import e3x
>>> r = jnp.asarray([0.3, -1.4, 0.7])
>>> rot = e3x.so3.random_rotation(jax.random.PRNGKey(0))
>>> wigner_d = e3x.so3.wigner_d(rot, max_degree=2)
>>> jnp.allclose(
... e3x.so3.spherical_harmonics(r, max_degree=2) @ wigner_d,
... e3x.so3.spherical_harmonics(r @ rot, max_degree=2),
... atol=1e-5)
Array(True, dtype=bool)
Parameters:
  • rot (<class 'Float[Array, '... 3 3']'>) – An Array of shape \((\dots, 3, 3)\) representing \(3\times3\) rotation matrices.

  • max_degree (int) – Maximum degree of the irreducible representations.

  • cartesian_order (bool, default: True) – If True, Cartesian order is assumed.

Return type:

<class 'Float[Array, '... (max_degree+1)**2 (max_degree+1)**2']'>

Returns:

An Array of shape \((\dots, (\mathrm{max\_degree}+1)^2,(\mathrm{max\_degree}+1)^2)\) representing Wigner-D matrices corresponding to the input rotations.

Raises:

ValueError – If rot does not have shape (…, 3, 3).