View source on GitHub |
A diagrammable operation on qubits.
cirq.SupportsCircuitDiagramInfo(
*args, **kwargs
)
Methods
_circuit_diagram_info_
_circuit_diagram_info_(
args: cirq.CircuitDiagramInfoArgs
) -> Union[str, Iterable[str], cirq.CircuitDiagramInfo
]
Describes how to draw an operation in a circuit diagram.
This method is used by the global cirq.diagram_info
method. If this
method is not present, or returns NotImplemented, it is assumed that the
receiving object doesn't specify diagram info.
Args | |
---|---|
args
|
A DiagramInfoArgs instance encapsulating various pieces of information (e.g. how many qubits are we being applied to) as well as user options (e.g. whether to avoid unicode characters). |
Returns | |
---|---|
A DiagramInfo instance describing what to show. |