GeneralizedSabreLayoutPass
- class GeneralizedSabreLayoutPass(total_passes=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:
BasePass
,GeneralizedSabreAlgorithm
Uses the Sabre algorithm to layout the circuit.
See
GeneralizedSabreAlgorithm
for more info.- __init__(total_passes=1, 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 GeneralizedSabreLayoutPass.
- Parameters:
total_passes (
int
) – The amount of forward and backward passes to apply before finalizing the layout.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[, modify_circuit])Apply a forward pass of the Sabre 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.