def __init__()

in src/braket/circuits/quantum_operator.py [0:0]


    def __init__(self, qubit_count: Optional[int], ascii_symbols: Sequence[str]):
        """
        Args:
            qubit_count (int, optional): Number of qubits this quantum operator acts on.
                If all instances of the operator act on the same number of qubits, this argument
                should be ``None``, and ``fixed_qubit_count`` should be implemented to return
                the qubit count; if ``fixed_qubit_count`` is implemented and an int is passed in,
                it must equal ``fixed_qubit_count``, or instantiation will raise a ValueError.
                An int must be passed in if instances can have a varying number of qubits,
                in which case ``fixed_qubit_count`` should not be implemented,
            ascii_symbols (Sequence[str]): ASCII string symbols for the quantum operator.
                These are used when printing a diagram of circuits.
                Length must be the same as `qubit_count`, and index ordering is expected
                to correlate with target ordering on the instruction.
                For instance, if CNOT instruction has the control qubit on the first index and
                target qubit on the second index. Then ASCII symbols would have ["C", "X"] to
                correlate a symbol with that index.

        Raises:
            TypeError: `qubit_count` is not an int
            ValueError: `qubit_count` is less than 1, `ascii_symbols` are `None`,
                ``fixed_qubit_count`` is implemented and and not equal to ``qubit_count``,
                or ``len(ascii_symbols) != qubit_count``
        """

        fixed_qubit_count = self.fixed_qubit_count()
        if fixed_qubit_count is NotImplemented:
            self._qubit_count = qubit_count
        else:
            if qubit_count and qubit_count != fixed_qubit_count:
                raise ValueError(
                    f"Provided qubit count {qubit_count}"
                    "does not equal fixed qubit count {fixed_qubit_count}"
                )
            self._qubit_count = fixed_qubit_count

        if not isinstance(self._qubit_count, int):
            raise TypeError(f"qubit_count, {self._qubit_count}, must be an integer")

        if self._qubit_count < 1:
            raise ValueError(f"qubit_count, {self._qubit_count}, must be greater than zero")

        if ascii_symbols is None:
            raise ValueError("ascii_symbols must not be None")

        if len(ascii_symbols) != self._qubit_count:
            msg = (
                f"ascii_symbols, {ascii_symbols},"
                f" length must equal qubit_count, {self._qubit_count}"
            )
            raise ValueError(msg)
        self._ascii_symbols = tuple(ascii_symbols)