theta functions from fock space Is it possible to get theta functions from free fermions?  I'm looking for proof of identity
\[  \sum_{n = -\infty}^\infty (-1)^n q^{n^2} = \prod_{j=1}^\infty \frac{1-q^j}{1+q^j} \]
maybe as a matrix element or trace in a Fock space.
 A: You can derive this identity from boson-fermion correspondence, once you correct the bounds on the sum, and fiddle with the right side.  If you multiply both sides by $\prod_{j = 1}^\infty (1-q^{2j})^{-1}$, you get the character of the lattice vertex operator algebra on the left, and the character of the charged free fermions on the right.  These VOAs are isomorphic, so their characters are equal.  There is a treatment in chapter 5 of Frenkel and Ben-Zvi's Vertex algebras and algebraic curves, but you have to fiddle with the grading a bit to get the identity you want instead of the Jacobi triple product formula.
Edit: Okay, here is how it works: On the bosonic side, you have a Heisenberg VOA $\pi_0$, which as a graded vector space is isomorphic to the polynomial ring $\mathbb{C}[b_{-1}, b_{-2}, \ldots]$, where $b_{-i}$ has degree $i$ - it is an induced module of the Heisenberg Lie algebra.  If we choose the convention of $Tr(q^{2L_0})$ for characters, the VOA has character $\prod_{j > 0} (1-q^{2j})^{-1}$.  For each complex number $\lambda$, you have an irreducible module $\pi_\lambda$ of the VOA, also an induced module of the Lie algebra, and it has character $q^{\lambda^2} \prod_{j > 0} (1-q^{2j})^{-1}$.  If you assemble modules for $\lambda \in \mathbb{Z}$, you get a bosonic Fock space that is a super VOA whose character is $\prod_{j = 1}^\infty (1-q^{2j})^{-1} \sum_{n \in \mathbb{Z}} q^{n^2}$.  If you take the trace of parity, you get:
$$\prod_{j = 1}^\infty (1-q^{2j})^{-1} \sum_{n \in \mathbb{Z}} (-1)^n q^{n^2}.$$
If you multiply by $\prod_{j = 1}^\infty 1-q^{2j}$, you get $\sum_{n \in \mathbb{Z}} (-1)^n q^{n^2}$, which is what the left side of your equation ought to be.
On the fermionic side, the Fock space is a Clifford representation generated by vectors $\psi_n$ and $\psi^\dagger_n$ for $n \in \mathbb{Z}_{<0} + \frac12$.  You can think of it as a polynomial ring in odd (i.e., anticommuting, square zero) variables.  For each half-integer $n$, the operator $\psi_n$ contributes weight $n$.  The character is then $\prod_{j > 0} (1+q^{2j+1})^2$.  The trace of parity is:
$$\prod_{j > 0} (1-q^{2j+1})^2 = \prod_{j > 0} \frac{(1-q^j)^2}{(1-q^{2j})^2} = \prod_{j > 0} \frac{1}{(1+q^j)^2}.$$
If you multiply by $\prod_{j = 1}^\infty 1-q^{2j}$, you get $\prod_{j = 1}^\infty \frac{1-q^j}{1+q^j}$, which is the right side of your equation.
You can also see this identity (with signs on the left) as part 2 of exercise 12.4 in Kac's Infinite Dimensional Lie algebras.  This is no coincidence - I think it follows from twisting the Frenkel-Kac construction.
A: Here is another point of view inspired by conformal field theory. If rewritten as   
$$\prod_{n=1}^\infty \frac{1+q^n}{(1-q^n)} \sum_{j \in \mathbb{Z}} (-1)^j q^{j^2}=1$$ 
this identity (I think) follows as a consequence of a BGG-type resolution of the trivial representation for the N=1 (Ramond) superconformal algebra.
Similarly, famous Euler's pentagonal number theorem
$$\frac{\sum_{j \in \mathbb{Z}} (-1)^j q^{j(3j-1)/2}}{\prod_{n=1}^\infty (1-q^n)}=1$$
follows from a similar resolution for the Virasoro algebra. 
