View source on GitHub |
A wrapper for a value that doesn't compare equal to other instances.
cirq.contrib.Unique(
val: cirq.contrib.circuitdag.circuit_dag.T
) -> None
For example: 5 == 5 but Unique(5) != Unique(5).
Unique is used by CircuitDag to wrap operations because nodes in a graph
are considered the same node if they compare equal to each other. For
example, X(q0)
in one moment of a circuit, and X(q0)
in another moment
of the circuit are wrapped by cirq.Unique(X(q0))
so they are distinct
nodes in the graph.
Methods
__ge__
__ge__(
other,
NotImplemented=cirq.NamedTopology.graph
)
Return a >= b. Computed by @total_ordering from (not a < b).
__gt__
__gt__(
other,
NotImplemented=cirq.NamedTopology.graph
)
Return a > b. Computed by @total_ordering from (not a < b) and (a != b).
__le__
__le__(
other,
NotImplemented=cirq.NamedTopology.graph
)
Return a <= b. Computed by @total_ordering from (a < b) or (a == b).
__lt__
__lt__(
other
)
Return self<value.