  We resolve the host galaxies of seven gravitationally lensed quasars at
redshift 1.5 to 2.8 using observations with the Atacama Large (sub-)Millimetre
Array. Using a visibility-plane lens modelling technique, we create pixellated
reconstructions of the dust morphology, and CO line morphology and kinematics.
We find that the quasar hosts in our sample can be distinguished into two
types: 1) galaxies characterised by clumpy, extended dust distributions
($R_{\rm eff}\sim2$ kpc) and mean star formation rate surface densities
comparable to sub-mm-selected dusty star-forming galaxies ($\Sigma_{\rm
SFR}\sim3$ M$_{\odot}$ yr$^{-1}$ kpc$^{-2}$); 2) galaxies that have sizes in
dust emission similar to coeval passive galaxies and compact starbursts
($R_{\rm eff}\sim0.5$ kpc), with high mean star formation rate surface
densities ($\Sigma_{\rm SFR}=$ 400$-$4500 M$_{\odot}$ yr$^{-1}$ kpc$^{-2}$)
that may be Eddington-limited or super-Eddington. The small size of some quasar
hosts suggests that we observe them at a stage in their transformation into
compact spheroids, where a high density of dynamically unstable gas leads to
efficient star formation and black hole accretion. For the one system where we
probe the mass of the gas reservoir, we find a gas fraction of just $0.06 \pm
0.04$ and a depletion timescale of $50 \pm 40$ Myr, suggesting it is
transitioning into quiescence. In general, we expect that the extreme level of
star formation in the compact quasar host galaxies will rapidly exhaust their
gas reservoirs and could quench with or without help from active galactic
nuclei feedback.
