def from_pauli_strings(cls, terms: PauliString | list[PauliString]) -> PauliSum:
        """Returns a PauliSum by combining `cirq.PauliString` terms.

        Args:
            terms: `cirq.PauliString` or List of `cirq.PauliString`s to use inside
                of this PauliSum object.
        Returns:
            PauliSum object representing the addition of all the `cirq.PauliString`
                terms in `terms`.
        """
        if isinstance(terms, PauliString):
            terms = [terms]
        termdict: defaultdict[UnitPauliStringT, value.Scalar] = defaultdict(lambda: 0)
        for pstring in terms:
            key = frozenset(pstring._qubit_pauli_map.items())
            termdict[key] += pstring.coefficient
        return cls(linear_dict=value.LinearDict(termdict))
Returns a PauliSum by combining `cirq.PauliString` terms.

        Args:
            terms: `cirq.PauliString` or List of `cirq.PauliString`s to use inside
                of this PauliSum object.
        Returns:
            PauliSum object representing the addition of all the `cirq.PauliString`
                terms in `terms`.
        
cirq-core/cirq/ops/linear_combinations.py