  Niobium superconducting radiofrequency cavities enable applications in modern
accelerators and quantum computers. However, the surface resistance
significantly deteriorates the cavities performance. Nitrogen doping surface
treatment can consistently increase cavity performance by reducing surface
resistance, but the improvement mechanism is not fully understood. Herein, we
employed transmission electron microscopy and spectroscopy to uncover the
structural and chemical differences of the Nb-air interface between the
non-doped and nitrogen-doped cavities. The results indicate that nitrogen
doping passivates the Nb surface by introducing a compressive strain close to
the Nb/air interface, which impedes the oxygen diffusion and hydrogen atoms and
reduces surface oxide thickness.
