  We present a beam-directed chemical technique for controlling the charge
states of near-surface luminescence centers in semiconductors. Specifically, we
fluorinate the surface of H-terminated diamond by electron beam irradiation in
the presence of NF3 vapor. The fluorination treatment acts as a local chemical
switch that alters the charge state of nitrogen-vacancy luminescence centers
from the neutral to the negative state. The electron beam fluorination process
is highly localized and can be used to control the emission spectrum of
individual nanodiamonds and surface regions scanned by the electron beam
