e3j.O3Space¶
- class e3j.O3Space(blocks: str | Iterable[tuple[int, O3Irrep | tuple[int, int] | str]])¶
Representation of O3, direct sum of irreducible blocks.
O3-Spaces yield pairs
(mul, irrep)when iterated through, wheremuldenotes the multiplicity of the irreducible subspaceirrep. Eachirrepmay also be given as a pair of integers(l, p).In e3nn-notation, subspaces are separated with
"+"and multiplicities act on irreducibles with"x", e.g.>>> space = e3j.Space("16x0e + 8x1o + 8x2e") >>> space = e3j.Space([(16, "0e"), (8, "1o"), (8, "2e")]) >>> space = e3j.Space([(16, (0, 1)), (8, (1, -1)), (8, (2, 1))])
Methods
__init__(blocks)Parse blocks and layout.
__iter__()Yield (mul, ir) pairs of irreducible spaces with multiplicity.
action(matrix)Return the Wigner D matrix of a 3x3 rotation matrix.
otimes(other, target_filter[, sort])Tensor product representation, decomposed in irreducibles by CG rules.
regroup([sort])Sort and regroup irreducible blocks with same degree and parity.
slices()Slice of indices spanning each sub-block.
sort([return_inverse])Sort irreducible blocks by degree and parity.
Attributes
- __init__(blocks: str | Iterable[tuple[int, O3Irrep | tuple[int, int] | str]])¶
Parse blocks and layout.
There are multiple ways a
Spaceinstance can be described and initialized:as a string of the form
"8x0e + 4x1o",- as a list of length-2 or length-3 tuples of the form
[(8, O3Irrep("0e"), (4, O3Irrep("1o"))][(8, "0e"), (8, "1o")][(8, 0, 1), (4, 1, -1)]
- action(matrix: Array) Array¶
Return the Wigner D matrix of a 3x3 rotation matrix.
This is the action of a Lie-group matrix element of O3 on the representation.
- property dim: int¶
Dimension of the representation.
- property l_max: int¶
Maximal degree of irreducible representations.
- otimes(other: Self | str, target_filter: Self | str, sort: bool = False) O3Space¶
Tensor product representation, decomposed in irreducibles by CG rules.
Clebsch-Gordan (CG) rules yield an explicit isomorphism between the tensor product of two irreducible blocks of degrees l1 and l2, as a direct sum of irreducible blocks of degrees L in \(\{ |l1-l2|, \ldots, l1+l2 \}\).
The product of two O3-spaces can be decomposed by developing the tensor product space in products of irreducibles. The isomorphism of course depends on an arbitrary ordering of irreducible blocks, and basis function choices on the irreducible blocks (e.g. real vs. complex harmonics, Condon-Shortley phase convention…)
- regroup(sort: bool = True) Self¶
Sort and regroup irreducible blocks with same degree and parity.
This method yields the most compact description of the representation.
In some cases, one may however wish to keep distinct groups of same degree and parity, e.g. to learn linear maps that do not mix all channels, but respect a given partition.
- slices() list[slice]¶
Slice of indices spanning each sub-block.
- sort(return_inverse: bool = False) Self | tuple[Self, ndarray]¶
Sort irreducible blocks by degree and parity.
Note that parities are sorted so that
p = (-1)**lcomes first. This choice agrees with e3nn.