In his 2002 thesis, Zwegers defines theta functions associated with definite and indefinite quadratic forms. For example, if $Q:\mathbb{R}^r\to \mathbb{R}$ is a positive definite quadratic form with associated bilinear form $B(x,y) = Q(x+y)-Q(x)-Q(y)$ then the theta series associated with $Q$ is
$$\Theta(z;\tau):=\sum_{n\in \mathbb{Z}^r}e^{2\pi i(Q(n)\tau+B(n,z))}=\sum_{n\in\mathbb{Z}^r}q^{Q(n)+B(n,z)}.$$
$\Theta(0,\tau)$ is a modular form of weight $r/2$.
On the other hand, Ono defines theta functions in terms of Dirichlet characters, and cites a theorem of Serre and Stark that such theta functions form a basis for a space of weight 1/2 cusp forms. For example, if $\chi_0$ is the trivial character then
$$\theta_0(z)=\theta(\chi_0,0,z):=\sum_{n\in \mathbb{Z}}q^{n^2} = \sum_{n\in\mathbb{Z}}e^{2\pi in^2z}.$$
Is there a connection between the quadratic form definition and the Dirichlet character definition for theta functions? Is there, for example, a sort of dictionary which allows you to pass from the Dirichlet definition for a theta function to the quadratic form definition?
Edit: The definition Ono gives for a theta function $\theta$ in terms of a Dirichlet character $\psi$ is the following:
- If $\psi$ is even, then $\theta(\psi,0,z):=\sum_{n\in\mathbb{Z}}\psi(n)q^{n^2}.$
- If $\psi$ is odd, then $\theta(\psi,1,z):=\sum_{n\in\mathbb{Z}}\psi(n)nq^{n^2}.$
The theta function attached to the trivial character is the theta function attached to the one dimensional lattice $\Bbb Z$ equipped with the usual quadratic form $q(z) = z^2$.
These are, of course, modular forms of half integral weight, which are automorphic forms on the metaplectic group.
To avoid this complication, a simpler example is to look at an imaginary quadratic field $K$ and an order $\mathcal O \subseteq K$, e.g. the ring of integers of $K$.
We can then attach to any ideal of $\mathcal O$ a theta function, which is given by viewing the ideal as a lattice, equipped with the quadratic form $N_{K/\Bbb Q}$.
If $\chi$ is any ring class character of order $\mathcal O$, then the theta series attached to $\chi$ is in fact a finite linear combination of the various theta series attached to the ideals (one for each ideal class).
Conversely, any theta function attached to a lattice can also be written as a linear combination of theta series attached to characters.
If you are interested in a more general setting of theta series (for $\operatorname{GL}_2$), then you should have a look at the Weil representation. All the local Weil representations pack together to an adelic Weil representation, which then automatically gives rise to theta functions.