Maximum number of vectors with upper bound on pairwise inner products

This is an interesting twist on the usual question.

Relevant results are due to Welch, Kabatianski, Levenshtein, Sidelnikov. Welch's applies to arbitrary vectors, real or complex. The others apply to vectors constructed from complex roots of unity of some finite order. Welch's bound states (I will apply it to $\pm 1$ valued vectors).

Let $e\geq 1$ be an integer and let $a_1,\ldots,a_k$ be distinct vectors in $\mathbb{C}^n.$ Then the following inequalities hold (assuming $k\geq n$): $$ \sum_{i=1}^k \sum_{j=1}^k \left| \langle a_i, a_j \rangle \right|^{2e} \geq \frac{\left(\sum_{i=1}^k \lVert a_i \rVert^{2e}\right)^2}{\binom{n+e-1}{e}}, $$

In this case $e=1,$ gives the nontrivial bound. Substituting $\langle a_i,a_j \rangle=c \log n$ for distinct pairs yields

$$ k n^2 + \binom{k}{2} (c \log n)^2 \geq \frac{k^2 n^2}{n} = k^2n $$ or $$ k n^2 + c'(k^2-k)(\log n)^2 \geq k^2n $$

eventually giving the inequality $k\leq n+c' \log^2 n.$

Edit: As in the apt comment by @JukkaKohonen, one can double the number of vectors if the original bound is not on the absolute value. Thanks for all the other comments as well and sorry for the typos.

References:

V.M. Sidelnikov, On mutual correlation of sequences, Soviet Math Dokl. 12:197-201, 1971.

V.M. Sidelnikov, Cross correlation of sequences, Problemy Kybernitiki, 24:15-42, 1971 (in Russian)

Welch, L.R. Lower Bounds on the Maximum Cross Correlation of Signals. IEEE Transactions on Information Theory. 20 (3): 397–399, 1974.

Kabatianskii, G. A.; Levenshtein, V. I. Bounds for packings on the sphere and in space. (Russian) Problemy Peredači Informacii 14 (1978), no. 1, 3–25. (A version of this might be available in English translation, in Problems of Information Transmission)