ClusteringPartitioner
- class ClusteringPartitioner(block_size=3, num_points=8)[source]
Bases:
BasePass
The ClusteringPartitioner Pass.
This pass forms partitions in the circuit by placing points in the circuit and clustering the gates around them.
- __init__(block_size=3, num_points=8)[source]
Construct a ClusteringPartitioner.
- Parameters:
block_size (
int
) – Maximum size of partitioned blocks. (Default: 3)num_points (
int
) – Total number of points to place and clusters to form. (Default: 8)
- Raises:
ValueError – If block_size is less than 2.
ValueError – if num_points is nonpositive.
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.
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.