def _with_exponent(self, exponent: value.TParamVal) -> EigenGate:
        """Return the same kind of gate, but with a different exponent.

        Child classes should override this method if they have an __init__
        method with a differing signature.
        """
        if self._global_shift == 0:
            return type(self)(exponent=exponent)
        return type(self)(exponent=exponent, global_shift=self._global_shift)
Return the same kind of gate, but with a different exponent.

        Child classes should override this method if they have an __init__
        method with a differing signature.
        
cirq-core/cirq/ops/eigen_gate.py