cirq.circuit_diagram_info
Requests information on drawing an operation in a circuit diagram.
cirq.circuit_diagram_info(
val: Any,
args: Optional[cirq.CircuitDiagramInfoArgs
] = None,
default=RaiseTypeErrorIfNotProvided
)
Calls _circuit_diagraminfo on val
. If val
doesn't have
_circuit_diagraminfo, or it returns NotImplemented, that indicates that
diagram information is not available.
Args |
val
|
The operation or gate that will need to be drawn.
|
args
|
A CircuitDiagramInfoArgs describing the desired drawing style.
|
default
|
A default result to return if the value doesn't have circuit
diagram information. If not specified, a TypeError is raised
instead.
|
Returns |
If val has no _circuit_diagraminfo method or it returns
NotImplemented, then default is returned (or a TypeError is
raised if no default is specified).
Otherwise, the value returned by _circuit_diagraminfo is returned.
|
Raises |
TypeError
|
val doesn't have circuit diagram information and default was
not specified.
|
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.
[[["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."],[],[]]