  We describe the phase diagram of a 2+1 dimensional SU(2) gauge theory of
fluctuating incommensurate spin density waves for the hole-doped cuprates. Our
primary assumption is that all low energy fermionic excitations are gauge
neutral and electron-like, while the spin density wave order is fractionalized
into Higgs fields transforming as adjoints of the gauge SU(2). The confining
phase of the gauge theory is a conventional Fermi liquid with a large Fermi
surface (and its associated $d$-wave superconductor). There is a quantum phase
transition to a Higgs phase describing the `pseudogap' at lower doping.
Depending upon the quartic terms in the Higgs potential, the Higgs phase
exhibits one or more of charge density wave, Ising-nematic, time-reversal odd
scalar spin chirality, and $\mathbb{Z}_2$ topological orders. It is notable
that the emergent broken symmetries in our theory of fluctuating spin density
waves co-incide with those observed in diverse experiments. For the
electron-doped cuprates, the spin density wave fluctuations are at wavevector
$(\pi,\pi)$, and then the corresponding SU(2) gauge theory only has a crossover
between the confining and Higgs regimes, with an exponentially large
confinement scale deep in the Higgs regime. On the Higgs side, for both the
electron- and hole-doped cases, and at scales shorter than the confinement
scale (which can be infinite when $\mathbb{Z}_2$ topological order is present),
the electron spectral function has a `fractionalized Fermi liquid (FL*)' form
with small Fermi surfaces. We also describe the deconfined quantum criticality
of the Higgs transition in the limit of a large number of Higgs flavors, and
perturbatively discuss its coupling to fermionic excitations.
