Consider the maximization problem
$$\text{maximize} \quad Q(x)= \sum_{i<j} \Big(\sum_{k} a_{ik}a_{jk}\Big) x_i x_j \quad \text{subject to} \quad \sum_{i}x_i^2=1,$$
and let $M$ be maximum value obtained by $Q$ under such constraint. Suppose that $a_{ij}=a_{ji}$ for all $i,j$ and that
$$ \begin{cases} a_{ij}=0 &\text{if $i+j\equiv 0\mod 2$,} \\ a_{ij}>0 & \text{if $i+j\equiv 1\mod 4$,} \\ a_{ij}<0 & \text{if $i+j\equiv 3\mod 4$.} \end{cases} $$
I was wondering if one could get an interesting upper bound on $M$ by using the above information on the signs of the $a_{ij}$'s. Namely, I am interested in a better upper bound than that provided by the Cauchy-Schwarz inequality, but still that does not require for every instance to use Lagrange multipliers (I am not interested in the precise value of $M$, nor in where the maximum is attained).