cirq.Circuit.findall_operations_with_gate_type

Circuit.findall_operations_with_gate_type(gate_type: Type[T_DESIRED_GATE_TYPE]) → Iterable[Tuple[int, cirq.ops.gate_operation.GateOperation, T_DESIRED_GATE_TYPE]][source]

Find the locations of all gate operations of a given type.

Parameters:gate_type – The type of gate to find, e.g. XPowGate or MeasurementGate.
Returns:An iterator (index, operation, gate)’s for operations with the given gate type.