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