A time-slice of operations within a circuit.Grouping operations into moments is intended to be a strong suggestion towhatever is scheduling operations on real hardware. Operations in the samemoment should execute at the same time (to the extent possible; not alloperations have the same duration) and it is expected that all operationsin a moment should be completed before beginning the next moment.Moment can be indexed by qubit or list of qubits:moment[qubit] returns the Operation in the moment which touches thegiven qubit, or throws KeyError if there is no such operation.moment[qubits] returns another Moment which consists only of thoseoperations which touch at least one of the given qubits. If thereare no such operations, returns an empty Moment.
__init__(*contents: cirq.OP_TREE) → None¶
Constructs a moment with the given operations.
operations – The operations applied within the moment. Will be flattened and frozen into a tuple before storing.
ValueError – A qubit appears more than once.
Determines if the moment has operations touching the given qubits.
Determines if the moment has operations touching the given qubit.
Returns the same moment, but with different qubits.
Returns an equal moment, but with the given op added.
Returns an equal moment, but without ops on the given qubits.