e3j.core.Permutation

class e3j.core.Permutation(sigma: Array, axis: int = -1)

Base class for permutations on a given axis.

There are various possible implementations (sparse/dense matmul, indexing…), but this class is mostly intended to act (once and for all) on tensor product operators themselves, by reordering their coefficients.

It is therefore mostly useful for the E3-specific classmethod it provides.

Classmethods

Permutation.sort(rep_in) :

sort irreducible blocks by angular momentum and parity.

Methods

__call__(x)

Return x[...,σ[i]] for i <= x.shape[axis].

sort(source[, axis])

Sort irreducible blocks by angular momentum and parity.

Attributes

sigma_1

Inverse permutation.

__call__(x: Array) Array

Return x[...,σ[i]] for i <= x.shape[axis].

property sigma_1: Array

Inverse permutation.

classmethod sort(source: str | O3Space, axis: int = -1) str

Sort irreducible blocks by angular momentum and parity.

Note

The (l, p) pairs indexing O3-representations are sorted by:

  • increasing momentum l,
    • matching parities p = (-1)**l first,

    • pseudo-tensor parities p = -(-1)**l last.