Atomic-scale physics of single-photon sources.