Skip to main content

align_moment_lanes

Function align_moment_lanes 

Source
pub fn align_moment_lanes(
    graph: &SubGraph,
    lanes: Vec<MomentLane>,
) -> Result<Vec<AlignedLayer>, MomentAlignmentError>
Expand description

Align raw node moments into deterministic concurrent layer batches.

Timeline-bearing nodes are cut after the cumulative logical-round ends in QuantumTimeline::layer_round_ends. Nodes without a timeline stay whole at crate::BloqNode::layer, except a temporal-Hadamard seam (and seam waits beside it), which is displayed on its lower/source block layer. Within a layer, qubit overlap or causal reachability forces separate serial batches; compatible lanes in one batch fold by decreasing length, using a shortest-common-supersequence alignment for each pair of moment-kind sequences.

§Errors

Returns MomentAlignmentError for invalid lanes, timelines, graph order, unsupported operations, or an alignment that exceeds its work bound.

§Panics

Panics only if a validated timeline index cannot fit the signed layer type.