We present the first results from a major Hubble Space Telescope programme designed to investigate the cosmological evolution of quasar host galaxies from z \simeq 2 to the present day . Here we describe J and H -band NICMOS imaging of two quasar samples at redshifts of 0.9 and 1.9 respectively . Each sample contains equal numbers of radio-loud and radio-quiet quasars , selected to lie within the same narrow range of optical absolute magnitude ( -24 \geq M _ { V } \geq - 25 ) . Filter and target selection were designed to ensure that at each redshift the images sample the same part of the object ’ s rest-frame spectrum , longwards of 4000Å where starlight from the host galaxy is relatively prominent , but avoiding potential contamination by [ O iii ] \lambda 5007 and H \alpha emission lines . At z \simeq 1 we have been able to establish host-galaxy luminosities and scalelengths with sufficient accuracy to demonstrate that the hosts of both radio-loud and radio-quiet quasars lie on the same Kormendy relation described by 3CR radio galaxies at comparable redshift ( McLure & Dunlop 2000 ) . Taken at face value the gap between the host luminosities of radio-loud and radio-quiet objects appears to have widened from only \simeq 0.4 mag . at z \simeq 0.2 ( Dunlop et al . 2001 ) to \simeq 1 mag . at z \simeq 1 , a difference that can not be due to emission-line contamination given the design of our study . However , within current uncertainties , simple passive stellar evolution is sufficient to link these galaxies with the elliptical hosts of low-redshift quasars of comparable nuclear output , implying that the hosts are virtually fully assembled by z \sim 1 . At z \simeq 2 the hosts have proved harder to characterise accurately , and for only two of the nine z \simeq 2 quasars observed has it proved possible to properly constrain the scalelength of the host galaxy . However , the data are of sufficient quality to yield host-galaxy luminosities accurate to within a factor \simeq 2 . At this redshift the luminosity gap between radio-loud and radio-quiet quasars appears to have widened further to \simeq 1.5 mag . Thus while the hosts of radio-loud quasars remain consistent with a formation epoch of z > 3 , allowing for passive evolution implies that the hosts of radio-quiet quasars are \simeq 2 - 4 times less massive at z \simeq 2 than at z \simeq 0.2 . If the relationship between black-hole and spheroid mass is unchanged out to redshift z \simeq 2 , then our results rule out any model of quasar evolution which involves a substantial component of luminosity evolution ( e.g . Kauffmann & Haehnelt 2000 ) . Rather , this study indicates that at z \simeq 2 there is a substantial increase in the number density of active black holes , along with a moderate increase in the fueling efficiency of a typical observed quasar . The fact that this latter effect is not displayed by the radio-loud objects in our sample might be explained by a selection effect arising from the fact that powerful radio sources are only produced by the most massive black holes ( Dunlop et al . 2001 ; McLure & Dunlop 2000b ) .