1. Given distinct complex numbers $a$ and $b$ satisfying $a b \neq 0$, the set $\{a, b\}=\left\{a^{2}, b^{2}\right\}$. Then $a+b=$ $\qquad$ .
$-1 .-1$.
If $a=a^{2}, b=b^{2}$, by $a b \neq 0$, we get $a=b=1$, which is a contradiction. If $a=b^{2}, b=a^{2}$, by $a b \neq 0$, we get $a^{3}=1$.
Clearly, $a \neq 1$.
Thus, $a^{2}+a+1=0 \Rightarrow a=-\frac{1}{2} \pm \frac{\sqrt{3}}{2} \mathrm{i}$.
Similarly, $b=-\frac{1}{2} \mp \frac{\sqrt{3}}{2} \mathrm{i}$.
Therefore, $a+b=-1$.