QuickPartitioner

class QuickPartitioner(block_size=3)[source]

Bases: BasePass

A partitioner that iterates over circuit gates only once.

This pass forms partitions in the circuit by iterating over the operations in a topological order and binning them into blocks.

__init__(block_size=3)[source]

Construct a QuickPartitioner.

Parameters:

block_size (int) – Maximum size of partitioned blocks. (Default: 3)

Raises:

ValueError – If block_size is less than 2.

Attributes

name

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)

Partition gates in a circuit into a series of CircuitGates.