cirq.google.XmonDevice.can_add_operation_into_moment¶
-
XmonDevice.can_add_operation_into_moment(operation: cirq.ops.raw_types.Operation, moment: cirq.circuits.moment.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.