Solution (source code)

= Solution

Remove the <quadratic phase> by setting
$$
g(x)=f(x)\omega^{-x^2}.
$$
The phase around the parallelogram is
$$
-x^2+(x-a)^2+(x-b)^2-(x-a-b)^2=-2ab,
$$
so the hypothesis says exactly that $\|g\|_{U^2}^4\geq c$, with harmless negative choices of the increments. The Fourier identity for the <Gowers U2 norm> and the <Parseval identity> now give
$$
c\leq\sum_r|\widehat g(r)|^4
\leq\left(\max_r|\widehat g(r)|^2\right)\sum_r|\widehat g(r)|^2
=\left(\max_r|\widehat g(r)|^2\right)\mathbb E_x|g(x)|^2
\leq\max_r|\widehat g(r)|^2,
$$
where the last inequality uses $\|f\|_\infty\leq1$. Thus the <Quadratic phase detection by the Gowers U2 norm> supplies an $r\in\mathbb Z_N$ such that
$$
\boxed{\left|\mathbb E_xf(x)\omega^{-rx-x^2}\right|=|\widehat g(r)|\geq c^{1/2}.}
$$