cirq.Circuit.insert_into_range¶
-
Circuit.insert_into_range(operations: Union[cirq.ops.raw_types.Operation, Iterable[Any]], start: int, end: int) → int[source]¶ Writes operations inline into an area of the circuit.
Parameters: - start – The start of the range (inclusive) to write the given operations into.
- end – The end of the range (exclusive) to write the given operations into. If there are still operations remaining, new moments are created to fit them.
- operations – An operation or tree of operations to insert.
Returns: An insertion index that will place operations after the operations that were inserted by this method.
Raises: IndexError– Bad inline_start and/or inline_end.