lgatr.primitives.linear

Linear operations on multivectors, in particular linear basis maps.

Functions

equi_linear(x, coeffs, *, config)

Pin-equivariant linear map f(x) = sum_{a,j} coeffs_a W^a_ij x_j.

grade_involute(x)

Compute the grade involution of a multivector.

grade_project(x)

Project a multivector onto its individual grades.

reverse(x)

Compute the reversal of a multivector.

lgatr.primitives.linear.equi_linear(x, coeffs, *, config)[source]

Pin-equivariant linear map f(x) = sum_{a,j} coeffs_a W^a_ij x_j.

The \(W^a\) are 5 or 10 pre-defined, Lorentz-equivariant basis elements (10 for the connected subgroup, 5 for the full Lorentz group; selected via the subgroup option in PrimitivesConfig).

Parameters:
  • x (Tensor) – Input multivector of shape (..., in_channels, 16).

  • coeffs (Tensor) – Coefficients for the basis elements of shape (out_channels, in_channels, num_basis_elements), where num_basis_elements is 10 (connected subgroup) or 5 (full Lorentz group).

  • config (PrimitivesConfig) – LGATr primitives configuration.

Returns:

Result of shape (..., out_channels, 16).

Return type:

outputs

lgatr.primitives.linear.grade_involute(x)[source]

Compute the grade involution of a multivector.

The grade involution preserves the scalar, bivector, and pseudoscalar components and flips the sign of the vector and axialvector components.

Parameters:

x (Tensor) – Input multivector of shape (..., 16).

Returns:

Output multivector of shape (..., 16).

Return type:

outputs

lgatr.primitives.linear.grade_project(x)[source]

Project a multivector onto its individual grades.

The result is a single tensor with a new grade dimension.

Parameters:

x (Tensor) – Input multivector of shape (..., 16).

Returns:

Output multivector of shape (..., 5, 16). The second-to-last dimension indexes grades.

Return type:

outputs

lgatr.primitives.linear.reverse(x)[source]

Compute the reversal of a multivector.

The reversal preserves the scalar, vector, and pseudoscalar components and flips the sign of the bivector and axialvector components.

Parameters:

x (Tensor) – Input multivector of shape (..., 16).

Returns:

Output multivector of shape (..., 16).

Return type:

outputs