Lanthanide compounds generally have significant photoluminescent and magnetic properties, which arise from the characteristics of the localized 4f open‐shell electrons. This chapter discusses the electronic structure of diatomics containing lanthanide atoms. It also discusses the method used in the calculations. The chapter gives the Mulliken gross atomic populations (GAOP) of the respective molecular spinors in terms of the spherical harmonics. It investigates the electronic structure of the ground states for CeO, CeF, and GdF. Analysis of the electronic structure of CeO yields significant information about lanthanide chemistry, because CeO is the first lanthanide oxide that contains 4f electrons. The excited states of CeO below 0.56 eV have been investigated by restricted active space configuration interaction (RASCI) calculations. The general open‐shell CI (GOSCI) calculations were performed for GdF, for which transition dipole moments were also calculated.