  The Nekrasov partition function in supersymmetric quantum gauge theory is
mathematically formulated as an equivariant integral over certain moduli spaces
of sheaves on a complex surface. In ``Seiberg-Witten Theory and Random
Partitions'', Nekrasov and Okounkov studied these integrals using the
representation theory of ``vertex operators'' and the infinite wedge
representation. Many of these operators arise naturally from correspondences on
the moduli spaces, such as Nakajima's Heisenberg operators, and Grojnowski's
vertex operators.
  In this paper, we build a new vertex operator out of the Chern class of a
vector bundle on a pair of moduli spaces. This operator has the advantage that
it connects to the partition function by definition. It also incorporates the
canonical class of the surface, whereas many other studies assume that the
class vanishes. When the moduli space is the Hilbert scheme, we present an
explicit expression in the Nakajima operators, and the resulting combinatorial
identities.
  We then apply the vertex operator to the above integrals. In agreeable cases,
the commutation properties of the vertex operator result in modularity
properties of the partition function and related correlation functions. We
present examples in which the integrals are completely determined by their
modularity, and their first few values.
