cirq.Circuit.batch_remove

Circuit.batch_remove(removals: Iterable[Tuple[int, cirq.ops.raw_types.Operation]]) → None[source]

Removes several operations from a circuit.

Parameters:removals – A sequence of (moment_index, operation) tuples indicating operations to delete from the moments that are present. All listed operations must actually be present or the edit will fail (without making any changes to the circuit).
ValueError:
One of the operations to delete wasn’t present to start with.
IndexError:
Deleted from a moment that doesn’t exist.