PAMLayoutPass
- class PAMLayoutPass(total_passes=1, gate_count_weight=0.3, 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
Layout algorithm using permutation-aware mapping.
- __init__(total_passes=1, gate_count_weight=0.3, decay_delta=0.001, decay_reset_interval=5, decay_reset_on_gate=True, extended_set_size=20, extended_set_weight=0.5)[source]
Construct a PAMLayoutPass.
- Parameters:
total_passes (
int
) – The amount of forward and backward passes to apply before finalizing the layout.gate_count_weight (
float
) – SeePermutationAwareMappingAlgorithm
for info. (Default: 0.3)decay_delta (
float
) – SeeGeneralizedSabreAlgorithm
for info. (Default: 0.001)decay_reset_interval (
int
) – SeeGeneralizedSabreAlgorithm
for info. (Default: 5)decay_reset_on_gate (
bool
) – SeeGeneralizedSabreAlgorithm
for info. (Default: True)extended_set_size (
int
) – SeeGeneralizedSabreAlgorithm
for info. (Default: 20)extended_set_weight (
float
) – SeeGeneralizedSabreAlgorithm
for info. (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.