pub fn apply_layer<const W: usize, C, T>(
input: &PauliSum<W>,
channel: &C,
policy: &T,
) -> PauliSum<W>Expand description
Apply a single channel to a PauliSum, producing the next layer.
Implements the three-phase pipeline:
- Scan —
n_in × MAX_FANOUTdata-parallel channel applications. - Sort — stable lex sort of the populated prefix (Phase 6 placeholder for the bucket-scatter optimization deferred to Phase 11; see slice plan §6.2).
- Merge — segmented reduction;
keep_termintegration arrives in Phase 7.