cirq.CircuitDiagramInfo

class cirq.CircuitDiagramInfo(wire_symbols: Tuple[str, ...], exponent: Any = 1, connected: bool = True)[source]

Describes how to draw an operation in a circuit diagram.

__init__(wire_symbols: Tuple[str, ...], exponent: Any = 1, connected: bool = True) → None[source]
Parameters:
  • wire_symbols – The symbols that should be shown on the qubits affected by this operation. Must match the number of qubits that the operation is applied to.
  • exponent – An optional convenience value that will be appended onto an operation’s final gate symbol with a caret in front (unless it’s equal to 1). For example, the square root of X gate has a text diagram exponent of 0.5 and symbol of ‘X’ so it is drawn as ‘X^0.5’.
  • connected – Whether or not to draw a line connecting the qubits.

Methods