fn channel_pullback<M: Copy + Sync, const N: usize, E: Fn(M, [f64; 3]) -> [Jet<N>; 2]>(
basis: &Basis<M>,
polarizations: &[u8],
cotangent: &DMatrix<Complex>,
entries: impl Fn(usize, usize) -> Result<E> + Sync,
add_q: impl Fn(&mut [f64; 2], &[Complex; N]) + Sync,
) -> Result<ChannelGradient>Expand description
Reverse the shared matrix assembly in fixed column, side and multipole order. Each column writes its own transverse gradient; only the shared gradients enter the ordered reduction. Construct channels before skipping zero-weight entries, preserving validation and avoiding evaluation of unused, possibly overflowing jets.