bloqade.lanes.heuristics.physical.movement.RustPlacementTraversal
← Module overview
class
classRustPlacementTraversal¶source
bloqade.lanes.heuristics.physical.movement.RustPlacementTraversal
Config for the Rust search engine (``TargetSolver``).
Signature
class RustPlacementTraversal(strategy: SearchStrategyName = 'entropy', max_movesets_per_group: int = 3, max_goal_candidates: int = 3, max_expansions: int | None = 300, restarts: int = 1, lookahead: bool = False, collect_entropy_trace: bool = False, seed: int = 0, completion_bound: str | None = None, block_spectators: bool = True)restarts and lookahead are now exposed and threaded into
SolveOptions; per-strategy entropy knobs (max_movesets_per_group,
max_goal_candidates, collect_entropy_trace) feed EntropyOptions
via _move_search_from_traversal.
Not yet exposed (Rust defaults used): weight, deadlock_policy,
w_t. These will be threaded through once validated via Rust-only
benchmarking.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
strategy | SearchStrategyName | 'entropy' | |
max_movesets_per_group | int | 3 | |
max_goal_candidates | int | 3 | |
max_expansions | int | None | 300 | |
restarts | int | 1 | |
lookahead | bool | False | |
collect_entropy_trace | bool | False | |
seed | int | 0 | |
completion_bound | str | None | None | |
block_spectators | bool | True |
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
strategy | SearchStrategyName | 'entropy' | |
max_movesets_per_group | int | 3 | |
max_goal_candidates | int | 3 | |
max_expansions | int | None | 300 | |
restarts | int | 1 | |
lookahead | bool | False | |
collect_entropy_trace | bool | False | |
seed | int | 0 | |
completion_bound | str | None | None | Admissible completion bound for branch-and-bound pruning. ``None`` (default) prunes a branch only once its accumulated cost alone reaches the incumbent's. ``"weighted_distance"`` additionally prunes when ``g + h`` reaches it, where ``h`` is the max objective-weighted distance over unresolved atoms. Affects which subtrees are explored, never candidate generation, and never returns a worse plan. Only consulted by the entropy strategy, and ignored for loose-goal (CZ pair) solves where the bound is not admissible. |
block_spectators | bool | True | Scope each CZ solve to the participating qubits. When ``True`` (default), qubits not in the CZ's ``controls``/``targets`` are treated as blocked obstacles for that solve rather than free atoms to route. This keeps the search effort independent of how many unrelated qubits share the same merged ``StaticPlacement`` block (under ``always_merge`` every CZ would otherwise search over all block qubits, inflating ``nodes_expanded``). Set ``False`` to let each CZ route over all block qubits. Note: blocking spectators removes routing freedom, so for some strategies it can change (sometimes increase) move counts (e.g. DFS may relocate a spectator to shorten a participant's path); the search-effort reduction is not always move-count-free. |