cirq.contrib.Unique
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__
View source
__lt__(
other
)
Return self<value.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-06-27 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."]]