clebsch_gordan#

cuequivariance.clebsch_gordan(
rep1: Irrep,
rep2: Irrep,
rep3: Irrep,
) ndarray#

Compute the Clebsch-Gordan coefficients.

The Clebsch-Gordan coefficients are used to decompose the tensor product of two irreducible representations into a direct sum of irreducible representations. This method computes the Clebsch-Gordan coefficients for the given input representations and returns an array of shape (num_solutions, dim1, dim2, dim3), where num_solutions is the number of solutions, dim1 is the dimension of rep1, dim2 is the dimension of rep2, and dim3 is the dimension of rep3.

The Clebsch-Gordan coefficients satisfy the following equation:

\[C_{ljk} X^1_{li} + C_{ilk} X^2_{lj} = X^3_{kl} C_{ijl}\]
Parameters:
  • rep1 (Irrep) – The first irreducible representation (input).

  • rep2 (Irrep) – The second irreducible representation (input).

  • rep3 (Irrep) – The third irreducible representation (output).

Returns:

An array of shape (num_solutions, dim1, dim2, dim3).

Return type:

np.ndarray

Examples

>>> rep1 = cue.SO3(1)
>>> rep2 = cue.SO3(1)
>>> rep3 = cue.SO3(2)
>>> C = clebsch_gordan(rep1, rep2, rep3)
>>> C.shape
(1, 3, 3, 5)
>>> C
array([[[[ 0.  ...]]]])

If there is no solution, the output is an empty array.

>>> C = clebsch_gordan(cue.SO3(1), cue.SO3(1), cue.SO3(3))
>>> C.shape
(0, 3, 3, 7)