compute_eta_jets#

t3toolbox.backend.sampling_derivatives.compute_eta_jets(tt_cores, mu_jets, nu_jets)#
def compute_eta_jets(
        tt_cores:   typ.Sequence[NDArray],  # len=d, elm_shape=C+(rLi,ni,rR(i+1))
        mu_jets:    typ.Sequence[NDArray],  # len=d, elm_shape=(order+1,)+W+C+(rLi,)
        nu_jets:    typ.Sequence[NDArray],  # len=d, elm_shape=(order+1,)+W+C+(rR(i+1),)
) -> typ.Tuple[NDArray, ...]:               # eta_jets. len=d, elm_shape=(order+1,)+W+C+(ni,)

Combine the left and right jets at each free mode (order-scan convolution).

eta_i^(t) = sum_{r+s=t} C(t,r) mu_{i-1}^(r) . G_i . nu_i^(s). eta is a FULL convolution (both jets run 0..order): formed all at once, the spatial product mu . G has mode AND bond live at every order – an (order+1)*W*r^2 intermediate (d times that vectorized over the cores: 128 GB at r=128, W=32000, order 5). This scans the two small axes instead, so only one slice is ever live:

eta = sum_r (mu^(r)/r! . G) . sh^r nu, (sh x)^(t) = t x^(t-1),

  • xscan over the input order r (the convolution): forms mu^(r) . G one order at a time and folds in the whole right jet, whose binomial weights the carried sh^r nu supplies (sh^r is r! C(t, r) times the shift by r) – removes the (order+1) factor;

  • xmap over cores: removes the d factor.

The win requires the UNIFORM path (a stacked supercore), where xmap/xscan dispatch to the real jax.lax.map / jax.lax.scan – both sequential (lax.map is a scan, not a vectorizing vmap), so only one core+order intermediate is resident. On the RAGGED path xmap/xscan are Python loops that unroll under jit and keep everything co-resident. Uniform, both scans: measured 14-28x smaller XLA peak than the vectorized dense form and CONSTANT in order. The order loop being a real scan is what forces this – an unrolled loop does not. Equal to the dense binomial form (the test suite’s twin) to ~1e-16.

Parameters:
  • tt_cores (t3toolbox.backend.common.typ.Sequence[NDArray])

  • mu_jets (t3toolbox.backend.common.typ.Sequence[NDArray])

  • nu_jets (t3toolbox.backend.common.typ.Sequence[NDArray])

Return type:

t3toolbox.backend.common.typ.Tuple[NDArray, …]