bloqade.lanes.heuristics.logical.placement.LogicalPlacementStrategyNoHome
classLogicalPlacementStrategyNoHome¶source
bloqade.lanes.heuristics.logical.placement.LogicalPlacementStrategyNoHome
Bases: LogicalPlacementMethods, PlacementStrategyABC
Signature
class LogicalPlacementStrategyNoHome(arch_spec: ArchSpec = get_arch_spec(), H_lookahead: int = 4, gamma: float = 0.85, lambda_lookahead: float = 0.5, K_candidates: int = 8, large_cost: float = 1000000000.0, lane_move_overhead_cost: float = 0.0, top_bus_signatures: int = 6, bus_reward_rho: float = 0.7)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
arch_spec | ArchSpec | get_arch_spec() | |
H_lookahead | int | 4 | |
gamma | float | 0.85 | |
lambda_lookahead | float | 0.5 | |
K_candidates | int | 8 | |
large_cost | float | 1000000000.0 | |
lane_move_overhead_cost | float | 0.0 | |
top_bus_signatures | int | 6 | |
bus_reward_rho | float | 0.7 |
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
arch_spec | ArchSpec | field(default_factory=get_arch_spec) | |
H_lookahead | int | 4 | |
gamma | float | 0.85 | |
lambda_lookahead | float | 0.5 | |
K_candidates | int | 8 | |
large_cost | float | 1000000000.0 | |
lane_move_overhead_cost | float | 0.0 | |
top_bus_signatures | int | 6 | |
bus_reward_rho | float | 0.7 |
methodcompute_moves¶source
bloqade.lanes.heuristics.logical.placement.LogicalPlacementStrategyNoHome.compute_moves
Signature
def compute_moves(state_before: ConcreteState, state_after: ConcreteState) -> tuple[tuple[LaneAddress, ...], ...]Parameters
| Name | Type | Description |
|---|---|---|
state_before | ConcreteState | |
state_after | ConcreteState |
Returns
tuple[tuple[LaneAddress, ...], ...]
methodchoose_return_layout¶source
bloqade.lanes.heuristics.logical.placement.LogicalPlacementStrategyNoHome.choose_return_layout
Signature
def choose_return_layout(state_before: ConcreteState, controls: tuple[int, ...], targets: tuple[int, ...], lookahead_cz_layers: tuple[tuple[tuple[int, ...], tuple[int, ...]], ...] = ()) -> tuple[ConcreteState, tuple[tuple[LaneAddress, ...], ...]]Parameters
| Name | Type | Default | Description |
|---|---|---|---|
state_before | ConcreteState | required | |
controls | tuple[int, ...] | required | |
targets | tuple[int, ...] | required | |
lookahead_cz_layers | tuple[tuple[tuple[int, ...], tuple[int, ...]], ...] | () |
Returns
tuple[ConcreteState, tuple[tuple[LaneAddress, ...], ...]]
methodcz_placements¶source
bloqade.lanes.heuristics.logical.placement.LogicalPlacementStrategyNoHome.cz_placements
Signature
def cz_placements(state: AtomState, controls: tuple[int, ...], targets: tuple[int, ...], lookahead_cz_layers: tuple[tuple[tuple[int, ...], tuple[int, ...]], ...] = ()) -> AtomStateParameters
| Name | Type | Default | Description |
|---|---|---|---|
state | AtomState | required | |
controls | tuple[int, ...] | required | |
targets | tuple[int, ...] | required | |
lookahead_cz_layers | tuple[tuple[tuple[int, ...], tuple[int, ...]], ...] | () |
Returns
AtomState
methodsq_placements¶source
bloqade.lanes.heuristics.logical.placement.LogicalPlacementStrategyNoHome.sq_placements
Signature
def sq_placements(state: AtomState, qubits: tuple[int, ...]) -> AtomStateParameters
| Name | Type | Description |
|---|---|---|
state | AtomState | |
qubits | tuple[int, ...] |
Returns
AtomState
methodmeasure_placements¶source
bloqade.lanes.heuristics.logical.placement.LogicalPlacementStrategyNoHome.measure_placements
Signature
def measure_placements(state: AtomState, qubits: tuple[int, ...]) -> AtomStateParameters
| Name | Type | Description |
|---|---|---|
state | AtomState | |
qubits | tuple[int, ...] |
Returns
AtomState