Skip to content

Index

LogicalPipeline dataclass

LogicalPipeline(
    arch_spec: ArchSpec = get_logical_arch_spec(),
    layout_heuristic: LayoutHeuristicABC | None = None,
    placement_strategy: PlacementStrategyABC | None = None,
    place_opt_type: type[Pass] = SequentialPlacePass,
    transversal_rewrite: bool = False,
    simulation: bool = True,
)

Compile a logical squin kernel to the move dialect.

Includes Clifford/measurement/no-cloning validation and the full logical initialization sequence (InsertInitialize for LogicalQubits).

arch_spec is the single source of truth: when layout_heuristic or placement_strategy are None (the default), they are constructed in emit using self.arch_spec, guaranteeing consistency. Pass explicit instances only when you need a fully custom heuristic or strategy; in that case the caller is responsible for arch-spec consistency.

resolved_layout_heuristic property

resolved_layout_heuristic: LayoutHeuristicABC

Return the active layout heuristic, constructing it from arch_spec if unset.

Emits a warning if an explicit heuristic is set whose arch_spec differs from the pipeline's arch_spec.

resolved_placement_strategy property

resolved_placement_strategy: PlacementStrategyABC

Return the active placement strategy, constructing it from arch_spec if unset.

Emits a warning if an explicit strategy is set whose arch_spec differs from the pipeline's arch_spec.

PhysicalPipeline dataclass

PhysicalPipeline(
    arch_spec: ArchSpec = get_physical_arch_spec(),
    layout_heuristic: LayoutHeuristicABC | None = None,
    placement_strategy: PlacementStrategyABC | None = None,
    place_opt_type: type[Pass] = SequentialPlacePass,
)

Compile a physical squin kernel to the move dialect.

Qubits are lowered to place.NewPinnedQubit; no logical initialization sequence is inserted. Validates that the kernel has exactly one terminal measure covering all allocated qubits (post-unroll).

arch_spec is the single source of truth: when layout_heuristic or placement_strategy are None (the default), they are constructed in emit using self.arch_spec, guaranteeing consistency. Pass explicit instances only when you need a fully custom heuristic or strategy; in that case the caller is responsible for arch-spec consistency.

resolved_layout_heuristic property

resolved_layout_heuristic: LayoutHeuristicABC

Return the active layout heuristic, constructing it from arch_spec if unset.

Emits a warning if an explicit heuristic is set whose arch_spec differs from the pipeline's arch_spec.

resolved_placement_strategy property

resolved_placement_strategy: PlacementStrategyABC

Return the active placement strategy, constructing it from arch_spec if unset.

Emits a warning if an explicit strategy is set whose arch_spec differs from the pipeline's arch_spec.