def map_qubits(self, qubit_map: dict[raw_types.Qid, raw_types.Qid]) -> PauliStringPhasor:
        """Maps the qubits inside the PauliStringPhasor.

        Args:
            qubit_map: A map from the qubits in the phasor to new qubits.

        Returns:
            A new PauliStringPhasor with remapped qubits.

        Raises:
            ValueError: If the map does not contain an entry for all
                the qubits in the phasor.
        """
        if not set(self.qubits) <= qubit_map.keys():
            raise ValueError(
                "qubit_map must have a key for every qubit in the phasors qubits. "
                f"keys: {qubit_map.keys()} phasor qubits: {self.qubits}"
            )
        return PauliStringPhasor(
            pauli_string=self.pauli_string.map_qubits(qubit_map),
            qubits=[qubit_map[q] for q in self.qubits],
            exponent_neg=self.exponent_neg,
            exponent_pos=self.exponent_pos,
        )
Maps the qubits inside the PauliStringPhasor.

        Args:
            qubit_map: A map from the qubits in the phasor to new qubits.

        Returns:
            A new PauliStringPhasor with remapped qubits.

        Raises:
            ValueError: If the map does not contain an entry for all
                the qubits in the phasor.
        
cirq-core/cirq/ops/pauli_string_phasor.py