def __init__(
        self,
        *contents: cirq.PAULI_STRING_LIKE,
        qubit_pauli_map: dict[TKey, cirq.Pauli] | None = None,
        coefficient: cirq.TParamValComplex = 1,
    ):
        """Initializes a new `PauliString` operation.

        Args:
            *contents: A value or values to convert into a pauli string. This
                can be a number, a pauli operation, a dictionary from qubit to
                pauli/identity gates, or collections thereof. If a list of
                values is given, they are each individually converted and then
                multiplied from left to right in order.
            qubit_pauli_map: Initial dictionary mapping qubits to pauli
                operations. Defaults to the empty dictionary. Note that, unlike
                dictionaries passed to contents, this dictionary must not
                contain any identity gate values. Further note that this
                argument specifies values that are logically *before* factors
                specified in `contents`; `contents` are *right* multiplied onto
                the values in this dictionary.
            coefficient: Initial scalar coefficient or symbol. Defaults to 1.

        Raises:
            TypeError: If the `qubit_pauli_map` has values that are not Paulis.
        """
        if _compat.__cirq_debug__.get() and qubit_pauli_map is not None:
            for v in qubit_pauli_map.values():
                if not isinstance(v, pauli_gates.Pauli):
                    raise TypeError(f'{v} is not a Pauli')

        self._qubit_pauli_map: dict[TKey, cirq.Pauli] = qubit_pauli_map or {}
        self._coefficient: cirq.TParamValComplex | sympy.Expr = (
            coefficient if isinstance(coefficient, sympy.Expr) else complex(coefficient)
        )
        if contents:
            m = self.mutable_copy().inplace_left_multiply_by(contents).frozen()
            self._qubit_pauli_map = m._qubit_pauli_map
            self._coefficient = m._coefficient
Initializes a new `PauliString` operation.

        Args:
            *contents: A value or values to convert into a pauli string. This
                can be a number, a pauli operation, a dictionary from qubit to
                pauli/identity gates, or collections thereof. If a list of
                values is given, they are each individually converted and then
                multiplied from left to right in order.
            qubit_pauli_map: Initial dictionary mapping qubits to pauli
                operations. Defaults to the empty dictionary. Note that, unlike
                dictionaries passed to contents, this dictionary must not
                contain any identity gate values. Further note that this
                argument specifies values that are logically *before* factors
                specified in `contents`; `contents` are *right* multiplied onto
                the values in this dictionary.
            coefficient: Initial scalar coefficient or symbol. Defaults to 1.

        Raises:
            TypeError: If the `qubit_pauli_map` has values that are not Paulis.
        
cirq-core/cirq/ops/pauli_string.py