  We study the cross-correlation between quasars and galaxies by embedding
models for the formation and evolution of the two populations in cosmological
N-body simulations. We adopt the quasar evolution model of Kauffmann & Haehnelt
(2000), in which supermassive black holes are formed and fuelled during major
mergers. We define the `bias' parameter b_QG as the ratio of the
cross-correlation function xi_QG to the galaxy auto-correlation function xi_GG.
On scales larger than 1 h^{-1} Mpc, the values of b_QG predicted by our models
at low redshift depend very little on galaxy selection. They measure the
characteristic mass of the dark matter halos that host quasars and can be used
to estimate the typical quasar lifetime. In current redshift surveys, such
measurements will constrain the lifetimes of low z quasars more accurately than
measurements of the quasar auto-correlation function, because galaxies have
much higher space densities than quasars. On scales smaller than 1 h^{-1} Mpc,
the main contribution to xi_QG comes from quasar/galaxy pairs in the same dark
matter halo. The amplitude of xi_QG depends both on the location of the host
galaxy and on the density profile of other galaxies within the halo. As a
result, measurements on these scales yield information about the processes
responsible for fuelling super- massive black holes. At high redshifts, our
models predict that quasars of fixed luminosity are located in less massive
halos than at low redshift. They are therefore less biased relative to galaxies
of given luminosity or stellar mass. We have used the simulations to calculate
the evolution of the quasar auto- correlation function. We find that models
with quasar lifetimes in the range 10^6-10^7 years provide a good match to the
results of the 2dF QSO survey.
