View source on GitHub |
Default symbol resolver implementation.
Inherits From: SymbolResolver
Takes information from circuit_diagram_info, if unavailable, returns information representing an unknown symbol.
Methods
resolve
resolve(
operation: cirq.Operation
) -> Optional[cirq_web.circuits.symbols.SymbolInfo
]
Checks for the _circuit_diagram_info attribute of the operation, and if it exists, build the symbol information from it. Otherwise, builds symbol info for an unknown operation.
Args | |
---|---|
operation
|
the cirq.Operation object to resolve |
__call__
__call__(
operation: cirq.Operation
) -> Optional[cirq_web.circuits.symbols.SymbolInfo
]
Call self as a function.