  We propose a general theoretical framework, using two layers of ancilla
qubits, for deconfined criticality between a Fermi liquid with a large Fermi
surface, and a pseudogap metal with a small Fermi surface of electron-like
quasiparticles. The pseudogap metal can be a magnetically ordered metal, or a
fractionalized Fermi liquid (FL*) without magnetic order. A critical 'ghost'
Fermi surface emerges (alongside the large electron Fermi surface) at the
transition, with the ghost fermions carrying neither spin nor charge, but
minimally coupled to $(U(1) \times U(1))/Z_2$ or $(SU(2) \times U(1))/Z_2$
gauge fields. The $(U(1) \times U(1))/Z_2$ case describes simultaneous Kondo
breakdown and onset of magnetic order: the two gauge fields induce nearly equal
attractive and repulsive interactions between ghost Fermi surface excitations,
and this competition controls the quantum criticality. Away from the transition
on the pseudogap side, the ghost Fermi surface absorbs part of the large
electron Fermi surface, and leads to a jump in the Hall co-efficient. We also
find an example of an "unnecessary quantum critical point" between a metal with
spin density wave order, and a metal with local moment magnetic order. The
ghost fermions contribute an enhanced specific heat near the transition, and
could also be detected in other thermal probes. We relate our results to the
phases of correlated electron compounds.
