def with_qubits(self, *new_qubits: cirq.Qid) -> PauliString:
        """Returns a new `PauliString` with `self.qubits` mapped to `new_qubits`.

        Args:
            new_qubits: The new qubits to replace `self.qubits` by.

        Returns:
            `PauliString` with mapped qubits.

        Raises:
            ValueError: If `len(new_qubits) != len(self.qubits)`.
        """
        if len(new_qubits) != len(self.qubits):
            raise ValueError(
                f'Number of new qubits: {len(new_qubits)} does not match '
                f'self.qubits: {len(self.qubits)}.'
            )
        return PauliString(
            qubit_pauli_map=dict(zip(new_qubits, (self[q] for q in self.qubits))),
            coefficient=self._coefficient,
        )
Returns a new `PauliString` with `self.qubits` mapped to `new_qubits`.

        Args:
            new_qubits: The new qubits to replace `self.qubits` by.

        Returns:
            `PauliString` with mapped qubits.

        Raises:
            ValueError: If `len(new_qubits) != len(self.qubits)`.
        
cirq-core/cirq/ops/pauli_string.py