bloqade.lanes.heuristics.physical.movement.make_physical_placement_strategy
functionmake_physical_placement_strategy¶source
bloqade.lanes.heuristics.physical.movement.make_physical_placement_strategy
Signature
def make_physical_placement_strategy(*, move_solutions_per_layer: int = 3, search_budget: int | None = 300, strategy: SearchStrategyName = 'entropy', arch_spec: ArchSpec | None = None, return_moves: bool = True) -> PlacementStrategyABCBuild a physical placement strategy from user-facing search knobs.
Uses NoHomePlacementStrategy
backed by the Rust NoHomeCzPlacement solver.
move_solutions_per_layer maps to k_candidates (candidate home
sites per qubit in the Hungarian assignment). search_budget maps to
max_expansions. lambda_lookahead is fixed at 0 because
palindrome return always moves atoms back to their original home position,
so future-layer proximity penalties carry no signal.
return_moves also selects mirrored solving: it wraps the strategy in
PalindromePlacementStrategy
and turns on backwards_search, since palindrome is what makes
mirroring sound (see below).
.. warning::
On the palindrome path (return_moves=True, the default) with a home
starting layout — atoms on their even/home words —
move_solutions_per_layer has no effect. It maps to
k_candidates, which feeds the no-home return assignment, and that
phase never runs under palindrome: solve_nohome skips it whenever
every atom already sits on a home site. Confirmed empirically —
sweeping move_solutions_per_layer over 1, 3, 8 and 20 produces
byte-identical move layers at 4, 6 and 8 atoms. The knob still applies
when return_moves=False, or when atoms start off their home words.
The wider consequence is that palindrome reduces
NoHomePlacementStrategyto a plain fixed-target router, so gamma, k_candidates,
top_bus_signatures and bus_reward_rho are all inert on that
path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
move_solutions_per_layer | int | 3 | |
search_budget | int | None | 300 | |
strategy | SearchStrategyName | 'entropy' | |
arch_spec | ArchSpec | None | None | |
return_moves | bool | True |
Returns
PlacementStrategyABC