cirq.Circuit.batch_insert_into¶
-
Circuit.batch_insert_into(insert_intos: Iterable[Tuple[int, cirq.ops.raw_types.Operation]]) → None[source]¶ Inserts operations into empty spaces in existing moments.
If any of the insertions fails (due to colliding with an existingoperation), this method fails without making any changes to the circuit.Parameters: insert_intos – A sequence of (moment_index, new_operation) pairs indicating a moment to add a new operation into. - ValueError:
- One of the insertions collided with an existing operation.
- IndexError:
- Inserted into a moment index that doesn’t exist.