PAMRoutingPass
- class PAMRoutingPass(gate_count_weight=0.1, decay_delta=0.001, decay_reset_interval=5, decay_reset_on_gate=True, extended_set_size=20, extended_set_weight=0.5)[source]
Bases:
PermutationAwareMappingAlgorithm
,BasePass
- __init__(gate_count_weight=0.1, decay_delta=0.001, decay_reset_interval=5, decay_reset_on_gate=True, extended_set_size=20, extended_set_weight=0.5)
Construct a PermutationAwareMappingAlgorithm.
- Parameters:
gate_count_weight (
float
) – The weight on block gate count versus mapping score when selecting a permutation.decay_delta (
float
) – The amount to adjust the decay factor by each time a swap is applied. Set to zero to disable decay. (Default: 0.001)decay_reset_interval (
int
) – The amount of swaps to apply before reseting the decay factors. (Default: 5)decay_reset_on_gate (
bool
) – If true, reset decay factors when a logical gate is applied. (Default: True)extended_set_size (
int
) – The size of the look-ahead or extended set. Set to zero to disable look ahead. (Default: 20)extended_set_weight (
float
) – The weight on the extended set term when scoring potential swaps. (Default: 0.5)
Attributes
The name of the pass.
Methods
backward_pass
(circuit, pi, cg)Apply a backward pass of the Sabre algorithm to pi.
execute
(*args, **kwargs)Map a function over iterable arguments in parallel.
forward_pass
(circuit, pi, cg, perm_data[, ...])Apply a forward pass of the PAM algorithm to pi.
get_connectivity
(_, data)Retrieve the current connectivity of the circuit.
get_model
(_, data)Retrieve the machine model from the data dictionary.
get_placement
(_, data)Retrieve the logical to physical qubit map from the data dictionary.
get_target
(_, data)Retrieve the target from the data dictionary.
in_parallel
(data)Return true if pass is being executed in a parallel.
run
(circuit, data)Perform the pass's operation, see
BasePass
for more.