Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

API

Everything below is imported from the top-level package, e.g. from natto import get_extraction_operators.

Operators

Every operator builder returns exact operators: sums of products of Kronecker deltas and Levi-Civita symbols with rational coefficients, which print in that notation. The one exception is the orthonormal basis, whose coefficients are floats. get_gram_matrices returns exact rational matrices instead. The reduction builders key their operators by (ell, p), the weight and the channel of that weight.

functionreturnssee
get_extraction_operators(n, ell=None, symmetry=None, basis="dual")the operators taking a rank-n tensor to its ICTsExtraction and embedding
get_embedding_operators(n, ell=None, symmetry=None, basis="dual")the operators taking each ICT back to its part of the tensorExtraction and embedding
get_reduction(n, ell=None, symmetry=None, basis="dual")both, as {(ell, p): {"embedding": ..., "extraction": ...}}Reduction
get_composed_operators(n, ell=None, symmetry=None)the two composed, a rank-2n operator per channelcomposed operator
get_gram_matrices(n, ell=None, symmetry=None)the exact Gram matrix of each weight, keyed by ellGram matrix
get_natural_projector(ell)the natural projector of weight ellnatural projector
get_coupling_operator(l1, l2, l3, normalize="legendre")the coupling operator of a weight tripleCoupling
get_harmonic_operator(n, normalize="legendre")the harmonic operator of rank nCartesian harmonics

The arguments shared by the reduction builders:

Applying operators

functionreturnssee
evaluate(operator)(array, rule): the operator as an array, with the einsum rule that applies itarrays and einsum rules
act(operator, *arrays)the operator applied to one array per input grouparrays and einsum rules

The array has its output indices first, and the rule contracts one array into each input group of the operator, with a leading ellipsis on every operand for batches: act(operator, *arrays) is numpy.einsum(rule, array, *arrays). The inputs are the tensor of an extraction operator and of the natural projector, the ICT of an embedding operator, X and Y of a coupling operator, and each copy of the unit vector of a harmonic operator.