  The electronic structure of electron-doped polycrystalline
Mg$_{1-x}$Al$_{x}$(B$_{1-y}$C$_{y}$)$_2$ was examined by electron energy-loss
spectroscopy (EELS) in a scanning transmission electron microscope (STEM) and
first-principle electronic structure calculations. We found significant changes
in the boron $K$ edge fine structure, suggesting the two bands of the B $K$
edge, the $\sigma$ and the $\pi$ band are being simultaneously filled as the
electron doping concentration of Mg$_{1-x}$Al$_{x}$(B$_{1-y}$C$_{y}$)$_2$ was
increased. Our density-functional theory calculations confirm the filling of
the $\sigma$ band states close to the Fermi level, which is believed to cause
the loss of superconductivity in highly doped MgB$_2$, since the
electron-phonon coupling of these states is thought to be responsible for the
high superconducting transition temperature. Our results do not show
significant differences in the electronic structure for electron doping on
either the Mg or the B site, although many superconducting properties, such as
$T_c$ or H$_{c_2}$ differ considerably for C- and Al- doped \MB. This behavior
can not be satisfactorily explained by band filling alone, and effects such as
interband scattering are considered.
