Two-dimensional \chem{YSi_2} or \chem{ErSi_2} layers on
\chem{Si(111)} surface present two surface states in the vicinity
of the Fermi level and form a two-dimensional surface electron
gas. We have performed density functional theory (DFT)
calculations of a realistic one-dimensional nanostructure of
\chem{YSi_2} on \chem{Si(111)} to study confinement effects of
this electron gas. The calculated square modulus of the wave
function shows complex modulations related to the quantum
interference patterns observed by scanning tunneling microscopy
(STM). For each quantised state, the modulation involves at least
three components consistent with the scattering of Bloch waves. A
Fourier analysis of the real space modulations is used to
construct the surface states dispersion curves. They are compared
to the direct calculation of the ideal \chem{YSi_2/Si(111)}
surface electronic structure and to the E(k) curves deduced
from conductance images in STM experiments