I am trying to evaluate $$\sum_{y=0}^{2^n-1}e^{2\pi iy(z-x)/2^n}$$ where $n\in\mathbb{Z}$ and $x,z\in\mathbb{Z}_{2^n}$.
Clearly, if $x=z$, then $\sum=2^n$. But I am unsure about when $x\neq z$. I believe it to be $=0$ as that would make my problem self-consistent.
We have two cases:
and