cirq.Moment¶

class
cirq.
Moment
(operations: Iterable[cirq.ops.raw_types.Operation] = ())[source]¶ A simplified timeslice of operations within a sequenced circuit.
Note that grouping sequenced circuits into moments is an abstraction thatmay not carry over directly to the scheduling on the hardware or simulator.Operations in the same moment may or may not actually end up scheduled tooccur at the same time. However the topological quantum circuit orderingwill be preserved, and many schedulers or consumers will attempt tomaximize the moment representation.
operations
¶
A tuple of the Operations for this Moment.

qubits
¶
A set of the qubits acted upon by this Moment.

__init__
(operations: Iterable[cirq.ops.raw_types.Operation] = ()) → None[source]¶ Constructs a moment with the given operations.
Parameters: operations – The operations applied within the moment. Will be frozen into a tuple before storing. Raises: ValueError
– A qubit appears more than once.
Methods
operates_on
(qubits)Determines if the moment has operations touching the given qubits. operates_on_single_qubit
(qubit)Determines if the moment has operations touching the given qubit. transform_qubits
(func, cirq.ops.raw_types.Qid])with_operation
(operation)Returns an equal moment, but with the given op added. without_operations_touching
(qubits)Returns an equal moment, but without ops on the given qubits. 