def can_merge_with(self, op: PauliStringPhasor) -> bool:
        """Checks whether the underlying PauliStrings can be merged."""
        return (
            self.pauli_string.equal_up_to_coefficient(op.pauli_string) and self.qubits == op.qubits
        )
Checks whether the underlying PauliStrings can be merged.
cirq-core/cirq/ops/pauli_string_phasor.py