I am faced with the variant of the quadratic Gauss sum which has just half the usual exponent (a $\pi$ in place of $2\pi$). Explicit computer checks suggest that $$ k \in 2 \mathbb{N}_{>0} \;\;\;\;\;\;\;\; \overset{?}{\Rightarrow} \;\;\;\;\;\;\;\; \sum_{n=0}^{k-1} e^{ \tfrac{\pi \mathrm{i}}{k} n^2 } \;=\; \sqrt{k} \, (-1)^{1/4} \,, $$ but what would be a proof?
More generally, is there an evaluation formula for the generalized quadratic Gauss sum with half the usual exponent: $$ \sum_{n=0}^{k-1} e^{ q \tfrac{\pi \mathrm{i}}{k} n^2 } \;\; \in \;\; \mathbb{C} \,, \;\;\;\;\;\;\;\;\;\;\text{where}\;\; (k,q) \in \mathbb{N}_{>0} \times \mathbb{Z} \;\;\;\text{with}\;\;\; k q \in 2\mathbb{Z} \,, $$ or at least a criterion (on $k,q$) for this to be non-vanishing? (The latter is maybe easy by the usual route of computing instead the square?)