Skip to main content

program_detector_slices

Function program_detector_slices 

Source
pub fn program_detector_slices(
    program: &Bloq,
) -> Result<ProgramSlices, ProgramSliceError>
Expand description

Compute detector-slice regions for every quantum node of program.

Clones and flattens program (repeats unrolled — regions genuinely differ per iteration), then builds the executed-path tape and runs Layer 1 over it, spawning each non-executed region arm as its own tape. See the module docs for the tape model.

§Errors

See ProgramSliceError: plan materialization, flattening, a cyclic level, an unmergeable node’s instances, the tracker rejecting the (post-flatten) op stream, or a boundary-seeded break that cannot be placed because the tape has no moment, or a nonlinear observable record fold (SEM-FOLD).