Let us define this sum as a function of $z \in \mathbb{C}$ with some positive parameter $a$
$$
f(z; a) = \sum\limits\_{n = 0}^{\infty}\frac{|z|^{2n}}{n!}e^{-ian^2}.
$$
Probably, it can be expressed (or somehow related) in terms of theta-function.



Can the following sum be counted or expressed in terms of special functions?
Probably the answer is negative. Your series is a restriction of the analytic function in two complex variables:
$$F(\zeta,q)=\sum\_{n=0}^\infty\frac{q^{n^2}}{n!}\zeta^n,\quad |q|\leq1,$$
obtained by setting $q=\exp(-ia)$ and $\zeta=|z|^2>0$. Function $F$ is continuous, entire with respect to $\zeta$ and analytic for $|q|<1$.


This important function has been studied much recently, see
[lectures of Alan Sokal](http://www.maths.qmul.ac.uk/~pjc/csgnotes/sokal/) for a survey of known results; as Sokal says himself, there are many conjectures and almost no theorems, and there is no indication of its expression in terms of standard special functions. (Except the trivial observation that it is the "Hadamard product" of the "partial theta-function'' with the exponential, or Borel's transform of the partial theta function, but this [partial theta-function](https://arxiv.org/abs/1504.01524) is itself outside of the set of
common special functions, and its properties make a current research subject.)


The case when your $a$ is real, that is $|q|=1$ is especially difficult and mysterious; all these points are singular for $q\mapsto F(\zeta,q)$.


