def _equal_up_to_global_phase_(
        self, other: Any, atol: float = 1e-8
    ) -> NotImplementedType | bool:
        """Default fallback for gates that do not implement this protocol."""
        try:
            return protocols.equal_up_to_global_phase(
                protocols.unitary(self), protocols.unitary(other), atol=atol
            )
        except TypeError:
            # Gate has no unitary protocol
            return NotImplemented
Default fallback for gates that do not implement this protocol.
cirq-core/cirq/ops/raw_types.py