cirq.Device.can_add_operation_into_moment¶
-
Device.can_add_operation_into_moment(operation: cirq.Operation, moment: cirq.Moment) → bool[source]¶ Determines if it’s possible to add an operation into a moment.
For example, on the XmonDevice two CZs shouldn’t be placed in the samemoment if they are on adjacent qubits.Parameters: - operation – The operation being added.
- moment – The moment being transformed.
Returns: Whether or not the moment will validate after adding the operation.