def equal_up_to_global_phase(self, other: PauliStringPhasor) -> bool:
        """Checks equality of two PauliStringPhasors, up to global phase."""
        if isinstance(other, PauliStringPhasor):
            return (
                self.exponent_relative == other.exponent_relative
                and self.pauli_string == other.pauli_string
                and self.qubits == other.qubits
            )
        return False
Checks equality of two PauliStringPhasors, up to global phase.
cirq-core/cirq/ops/pauli_string_phasor.py