Exponentiation $x^y$ is generally very tricky in complex numbers. You have to give up at least one of the following:
- That $x^y$ is a single-valued function.
- That $x^y$ is continuous
- That $x^y$ is defined for all $x,y, x\neq 0$.
If you keep (1), then you also have to give up $(x^y)^z = x^{yz}$ as a rule.
The best thing to do is define $x^y$ as a multivalued function. Specifically, define a multivalued $\log x$, and define $x^y = e^{y\log x}$.
If you have a multi-valued $x^y$ then one of the values of $1^{2\pi n i}$ is $e^{-4\pi^2n^2}$.
If $y$ is rational in reduced form $\frac{p}{q}$ with $p,q\in\mathbb Z$, then $x^y$ has $q$ possible values. In particular, if $y$ is an integer, then $x^y$ has one value.
This is related to the fact that we usually pick the positive square root, but, for example, we can see $4^{1/2}=\pm 2$. In complex numbers, there are four values of $\sqrt[4]{1}=1^{1/4}$, namely, $\pm1, \pm i$.
If $y$ is not a rational number, $x^y$ has infinitely many values.