apply_layer

Function apply_layer 

Source
pub fn apply_layer<const W: usize, C, T>(
    input: &PauliSum<W>,
    channel: &C,
    policy: &T,
) -> PauliSum<W>
where C: Channel<W> + ?Sized, T: TruncationPolicy<W> + ?Sized,
Expand description

Apply a single channel to a PauliSum, producing the next layer.

Implements the three-phase pipeline:

  1. Scann_in × MAX_FANOUT data-parallel channel applications.
  2. 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).
  3. Merge — segmented reduction; keep_term integration arrives in Phase 7.