Abstract: Quantum field theories appear both on spaces with Riemannian metric (euclidean quantum field theory) and on space-time with a pseudo-Riemannian metric. The former can be described by the partition function, a map from metrics on compact spaces of given dimension to the positive real numbers. Quantum field theory can be understood as the theory of smooth partition functions, with fields as the corresponding derivatives. When conformal covariance is imposed for dimension 2, the partition function for genus one is given by familiar modular forms like the Rogers-Ramanujan functions. For higher genus they lift to automorphic forms of the mapping class group, a largely unexplored area of mathematics.