  The vector valued theta series of a positive-definite even lattice is a
modular form for the Weil representation of $\mathrm{SL}_2(\mathbb{Z})$. We
show that the space of cusp forms for the Weil representation is generated by
such functions. This gives a positive answer to Eichler's basis problem in this
case. As applications we derive Waldspurger's result on the basis problem for
scalar valued modular forms and give a new proof of the surjectivity of the
Borcherds lift based on the analysis of local Picard groups.
