This question is a follow-up of this question.
Let $\mathbb{F}_2=\{0,1\}$ be the field with two elements, and suppose that $n$ is odd.
Question: Can we compute the exact minimum $$A:= \min_{u:\mathbb{F}_2^n\rightarrow \mathbb{F}_2} \sum_{a\neq 0}\left(\sum_{x}(-1)^{u(x)+u(x+a)}\right)^2 \, \,? $$
Here is a lower bound, which I don't know if can attained (see derivation below):
$$ A \ge \max\{1,\frac{f^2(n)}{2^n-1}\}, $$ where $$ f(n):=\min \{\,\, |k| \,\,\, | \,\,\, k+2^n \,\,\,\text{is a square of an integer}\}. $$
Motivation: This question arose while I was trying to derive a lower bound on the approximate multiplicativity of Boolean functions.
Lower bound derivation:
Set $s(x,a)=(-1)^{u(x)+u(x+a)}$, $g(a):=\sum_xs(x,a)$, $r=\sum_{a \neq 0} g(a)$.
Since $g(0)=2^n$, $$ \tag{1} \mathbb{E}_{\mathbf{x},\mathbf{a}}[s(x,a)]=\frac{1}{2^{2n}}\sum_a g(a)=\frac{2^n+r}{2^{2n}}. $$
Now, we also have \begin{equation*} \tag{2} \left(\mathbb{E}_{\mathbf{x}}[(-1)^{u(\mathbf{x})}]\right)^2=\mathbb{E}_{\mathbf{x}}[(-1)^{u(\mathbf{x})}]\mathbb{E}_{\mathbf{y}}[(-1)^{u(\mathbf{y})}]=\mathbb{E}_{\mathbf{x},\mathbf{y}}[(-1)^{u(\mathbf{x})+u(\mathbf{y})}]=\mathbb{E}_{\mathbf{x},\mathbf{a}}[(-1)^{u(\mathbf{x})+u(\mathbf{x}+\mathbf{a})}]=\mathbb{E}_{\mathbf{x},\mathbf{a}}[s(x,a)], \end{equation*}
$\mathbb{E}_{\mathbf{x}}[(-1)^{u(\mathbf{x})}]$ is an integer multiple of $1/2^n$, so we may write $\mathbb{E}_{\mathbf{x}}[(-1)^{u(\mathbf{x})}]=\frac{m}{2^n}$.
Combining this with equations $(1),(2)$, we get $$ \frac{2^n+r}{2^{2n}}=\frac{m^2}{2^{2n}}, $$ or $$ 2^n+r=m^2. $$ Thus $|r| \ge f(n)$, by the definition of $f$.
Now using Cauchy-Schwartz: $$ f(n) \le |r| = |\sum_{a \neq 0} g(a)| \le \sum_{a \neq 0} |g(a)| \le \sqrt{\sum_{a \neq 0} g^2(a)}\sqrt{2^n-1}. $$
Equality happens when all the $g(a)=t \in \mathbb{Z}$, and so $$ f(n)=|r|=|\sum_{a \neq 0} g(a)|=(2^n-1)|t|$$
Since $f(n) \le 2^n$, this implies $$ (2^n-1)|t| \le 2^n, $$ so $|t|=1$. Is it possible that indeed $|g(a)|=1$ for every $a \neq 0$?