mqt.ionshuttler.linear.search¶
Find Linear schedules with quality-oriented or exact search settings.
Module Contents¶
- search(initial_state: State, gate_order: Sequence[int], gates: Mapping[int, GateAction], architecture: Architecture, predecessors: Mapping[int, frozenset[int]] | None = None, config: LinearCompilerConfig | None = None, *, action_types: tuple[type[Action], ...] = DEFAULT_ACTION_TYPES, gate_zone: Mapping[int, str] | None = None, zone_site_pairs: Mapping[str, tuple[tuple[int, int], ...]] | None = None) CompilationResult[source]¶
Compile a circuit using the configured global or rolling search.
- Returns:
The schedule, completion status, and state reached by the search.
- exhaustive_search(initial_state: State, architecture: Architecture, gate_order: Sequence[int], gates: Mapping[int, GateAction], *, predecessors: Mapping[int, frozenset[int]] | None = None, config: LinearCompilerConfig | None = None, action_types: tuple[type[Action], ...] = DEFAULT_ACTION_TYPES, gate_zone: Mapping[int, str] | None = None, zone_site_pairs: Mapping[str, tuple[tuple[int, int], ...]] | None = None) CompilationResult[source]¶
Search the complete circuit at once.
- Returns:
The best complete schedule, or the best partial schedule if search stops early.
- rolling_horizon_search(initial_state: State, architecture: Architecture, gate_order: Sequence[int], gates: Mapping[int, GateAction], *, predecessors: Mapping[int, frozenset[int]] | None, config: LinearCompilerConfig, action_types: tuple[type[Action], ...] = DEFAULT_ACTION_TYPES, gate_zone: Mapping[int, str] | None = None, zone_site_pairs: Mapping[str, tuple[tuple[int, int], ...]] | None = None) CompilationResult[source]¶
Plan a limited number of upcoming gates at a time.
- Returns:
The combined schedule from every completed planning window.
- Raises:
ValueError – If the configuration does not select a rolling horizon.