IrrepsAndLayout#
- class cuequivariance.IrrepsAndLayout(
- irreps: Irreps | str,
- layout: IrrepsLayout | None = None,
A group representation (
Rep
) made from the combination ofIrreps
andIrrepsLayout
into a single object.This class inherits from
Rep
:Rep <--- Base class for all representations ├── Irrep <--- Base class for all irreducible representations ├── SU2 ├── SO3 ├── O3 ├── IrrepsAndLayout <--- This class IrrepsLayout <--- Enum class with two values: mul_ir and ir_mul Irreps <--- Collection of Irrep with multiplicities
- Parameters:
irreps (Irreps or str) – Irreducible representations and their multiplicities.
layout (optional, IrrepsLayout) – The data layout (
mul_ir
orir_mul
).
Examples
Let’s create rotations matrices for a 2x1 representation of SO(3) using two different layouts:
>>> angles = np.array([np.pi, 0, 0])
Here we use the
ir_mul
layout:>>> with cue.assume("SO3", cue.ir_mul): ... rep = cue.IrrepsAndLayout("2x1") >>> R_ir_mul = rep.exp_map(angles, np.array([]))
Here we use the
mul_ir
layout:>>> with cue.assume("SO3", cue.mul_ir): ... rep = cue.IrrepsAndLayout("2x1") >>> R_mul_ir = rep.exp_map(angles, np.array([]))
Let’s see the difference between the two layouts:
>>> R_ir_mul.round(1) + 0.0 array([[ 1., 0., 0., 0., 0., 0.], [ 0., 1., 0., 0., 0., 0.], [ 0., 0., -1., 0., 0., 0.], [ 0., 0., 0., -1., 0., 0.], [ 0., 0., 0., 0., -1., 0.], [ 0., 0., 0., 0., 0., -1.]])
>>> R_mul_ir.round(1) + 0.0 array([[ 1., 0., 0., 0., 0., 0.], [ 0., -1., 0., 0., 0., 0.], [ 0., 0., -1., 0., 0., 0.], [ 0., 0., 0., 1., 0., 0.], [ 0., 0., 0., 0., -1., 0.], [ 0., 0., 0., 0., 0., -1.]])
- algebra() ndarray #
Algebra of the Lie group
The algebra of the Lie group is defined by the following equation:
\[[X_i, X_j] = A_{ijk} X_k\]where \(X_i\) are the continuous generators and \(A_{ijk}\) is the algebra.
- Returns:
An array of shape
(lie_dim, lie_dim, lie_dim)
.- Return type:
np.ndarray
- continuous_generators() ndarray #
Generators of the representation
The generators of the representation are defined by the following equation:
\[\rho(\alpha) = \exp\left(\alpha_i X_i\right)\]Where \(\rho(\alpha)\) is the representation of the group element corresponding to the parameter \(\alpha\) and \(X_i\) are the (continuous) generators of the representation, each of shape
(dim, dim)
.- Returns:
An array of shape
(lie_dim, dim, dim)
.- Return type:
np.ndarray