FourParamGenerator.count_outer_cnots

FourParamGenerator.count_outer_cnots(circuit, edge)[source]

Count how many uninterrupted 4-param cnot blocks are on edge.

This will count backwards from the right-side of the circuit and stop when a cnot is encountered including other qudits.