  Powerful quasars can be seen out to large distances. As they reside in
massive dark matter haloes, they provide a useful tracer of large scale
structure. We stack Herschel-SPIRE images at 250, 350 and 500 microns at the
location of 11,235 quasars in ten redshift bins spanning $0.5 \leq z \leq 3.5$.
The unresolved dust emission of the quasar and its host galaxy dominate on
instrumental beam scales, while extended emission is spatially resolved on
physical scales of order a megaparsec. This emission is due to dusty
star-forming galaxies clustered around the dark matter haloes hosting quasars.
We measure radial surface brightness profiles of the stacked images to compute
the angular correlation function of dusty star-forming galaxies correlated with
quasars. We then model the profiles to determine large scale clustering
properties of quasars and dusty star-forming galaxies as a function of
redshift. We adopt a halo model and parameterize it by the most effective halo
mass at hosting star-forming galaxies, finding $\log(M_\mathrm{eff}/M_{\odot})
= 13.8^{+0.1}_{-0.1}$ at $z=2.21-2.32$, and, at $z=0.5-0.81$, the mass is
$\log(M_\mathrm{eff}/M_{\odot}) = 10.7^{+1.0}_{-0.2}$. Our results indicate a
downsizing of dark matter haloes hosting dusty star-forming galaxies between
$0.5 \leq z \leq 2.9$. The derived dark matter halo masses are consistent with
other measurements of star-forming and sub-millimeter galaxies. The physical
properties of dusty star-forming galaxies inferred from the halo model depend
on details of the quasar halo occupation distribution in ways that we explore
at $z>2.5$, where the quasar HOD parameters are not well constrained.
