View source on GitHub |
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.
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.
|