View source on GitHub |
Identifies an operation by gate and (optionally) target qubits.
cirq.OpIdentifier(
gate_type: Type['cirq.Gate'], *qubits
)
Used in the notebooks
Used in the tutorials |
---|
Attributes | |
---|---|
gate_type
|
|
qubits
|
Methods
is_proper_subtype_of
is_proper_subtype_of(
op_id: 'OpIdentifier'
)
Returns true if this is contained within op_id, but not equal to it.
If this returns true, (x in self) implies (x in op_id), but the reverse implication does not hold. op_id must be more general than self (either by accepting any qubits or having a more general gate type) for this to return true.
__contains__
__contains__(
item: Union[cirq.Gate
, cirq.Operation
]
) -> bool
__eq__
__eq__(
other: _SupportsValueEquality
) -> bool
__ne__
__ne__(
other: _SupportsValueEquality
) -> bool