Run the Collect2qBlocks pass on dag.
The blocks contain “op” nodes in topological sort order such that all gates in a block act on the same pair of qubits and are adjacent in the circuit. the blocks are built by examining predecessors and successors of 2q gates in the circuit.
After the execution,
property_set['block_list']is set to a list of tuples of “op” node labels.