  We demonstrate an absolute magnetometer immune to temperature fluctuation and
strain inhomogeneity, based on quantum beats in the ground state of
nitrogen-vacancy centers in diamond. We apply this technique to measure
low-frequency magnetic field noise using a single nitrogen-vacancy center
located within 500 nm of the surface of an isotopically-pure (99.99% C12)
diamond. The photon-shot-noise limited sensitivity achieves 38 nT/Hz^1/2 for
4.45 s acquisition time, a factor of 2^1/2 better than the implementation which
uses only two spin levels. For long acquisition times (>10 s), we realize up to
a factor of 15 improvement in magnetic sensitivity, which demonstrates the
robustness of our technique against thermal drifts. Applying our technique to
nitrogen-vacancy center ensembles, we eliminate dephasing from longitudinal
strain inhomogeneity, resulting in a factor of 2.3 improvement in sensitivity.
