cuequivariance
cuequivariance: Groups, Irreps, and Segmented Polynomials
Purpose
cuequivariance (imported as cue) provides two core abstractions:
- Group theory:
Irrepsubclasses define irreducible representations of Lie groups (SO3, O3, SU2, or custom).Irrepsmanages collections with multiplicities. - Segmented polynomials:
SegmentedTensorProductdescribes tensor contractions over segments of varying shape, linked byPathobjects carrying Clebsch-Gordan coefficients.SegmentedPolynomialwraps multiple STPs into a polynomial with named inputs/outputs. Two higher-level wrappers attach group representations:EquivariantPolynomial— dense operands withIrrepsAndLayoutmetadataIrDictPolynomial— operands already split by irrep, with per-groupIrrepsmetadata for thedict[Irrep, Array]workflow
Inputs
Required inputs: requested operation, group, input irreps and multiplicities, output irrep types, layout, batch shapes, dtype, and weight ownership. Take explicit user requirements first, then existing project definitions; state defaults for unspecified values. Derive operand sizes and output block order from the descriptor. For custom groups, also establish the selection rules, generators, and Clebsch-Gordan coefficients. Optional inputs include test rotations and a framework backend.
Prerequisites
Use Python 3.10+ with cuequivariance and its NumPy, SciPy, opt_einsum, SymPy, and NetworkX dependencies. Reuse the project's interpreter and lockfile. If setup is needed outside an existing project, the bundled CPU requirements pin the source revision used by these examples; install them with that interpreter's pip. Core NumPy execution requires no GPU stack or API credentials. Check the installed version and API availability before using IrDictPolynomial with an older package.