IterativeScanningGateRemovalPass
- class IterativeScanningGateRemovalPass(width_to_partition=5, block_size=3, *args, **kwargs)[source]
Bases:
PassAlias
The IterativeScanningGateRemovalPass class.
Starting from one side of the circuit, attempt to remove gates one-by-one. Repeat this until the circuit no longer changes. This will partition the circuit first if the circuit width is too large.
- __init__(width_to_partition=5, block_size=3, *args, **kwargs)[source]
Construct a IterativeScanningGateRemovalPass.
- Parameters:
width_to_partition (
int
) – Circuits at least as wide as this will be partitioned first.block_size (
int
) – If the circuit is partitioned, it will be partitioned into blocks of this width.*args (
Any
) – Arguments passed directly toScanningGateRemovalPass
.*kwargs (
Any
) – Keyword arguments passed directly toScanningGateRemovalPass
.
- Raises:
ValueError – If width_to_partition or block_size is nonpositive.
ValueError – If width_to_partition is less than or equal to block_size.
Attributes
The name of the pass.
Methods
execute
(*args, **kwargs)Map a function over iterable arguments in parallel.
get_connectivity
(_, data)Retrieve the current connectivity of the circuit.
get_model
(_, data)Retrieve the machine model from the data dictionary.
Return the passes to be run, see
PassAlias
for more.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.