Skip to content

bloqade.lanes.pipeline.logical.LogicalPipeline

← Module overview

classLogicalPipelinesource

bloqade.lanes.pipeline.logical.LogicalPipeline

Compile a logical squin kernel to the move dialect.

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

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.

Parameters

NameTypeDefaultDescription
arch_specArchSpecget_logical_arch_spec()
layout_heuristiclayout.LayoutHeuristicABC | NoneNone
placement_strategyplacement.PlacementStrategyABC | NoneNone
place_opt_typetype[passes.Pass]SequentialPlacePass
transversal_rewriteboolFalse
simulationboolTrue

Attributes

NameTypeDefaultDescription
arch_specArchSpecfield(default_factory=get_logical_arch_spec)
layout_heuristiclayout.LayoutHeuristicABC | NoneNone
placement_strategyplacement.PlacementStrategyABC | NoneNone
place_opt_typetype[passes.Pass]field(default=SequentialPlacePass)
transversal_rewriteboolFalse
simulationboolTrue

propertyresolved_layout_heuristicsource

bloqade.lanes.pipeline.logical.LogicalPipeline.resolved_layout_heuristic

resolved_layout_heuristic: layout.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.

source

propertyresolved_placement_strategysource

bloqade.lanes.pipeline.logical.LogicalPipeline.resolved_placement_strategy

resolved_placement_strategy: placement.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.

source

methodemitsource

bloqade.lanes.pipeline.logical.LogicalPipeline.emit

def emit(mt: Method, no_raise: bool = True) -> Method

Parameters

NameTypeDefaultDescription
mtMethodrequired
no_raiseboolTrue

Returns

Method

source