in the left column of Fig. \[fig:potdos\], the $xy$ planar average electrostatic potential [@Baldereschi-PRL-1988] and the associated macro-averaged smoothed potential along the direction perpendicular to the interface for the $np$-type geometry. The $xy$ planar average potential is obtained by averaging the raw three-dimensional total potential over the interface plane. The associated macro-averaged smoothed potential is to convolute the $xy$ planar average potential with a Gaussian function using the filting width $\simeq 0.6$Å. As the figure shows, the macro-averaged smoothed potential in SrTiO$_3$ is flat, indicating that there is no internal electric field through the SrTiO$_3$ ([*i.e.*]{}, it is nonpolar). In the LaAlO$_3$ layers, the macro-averaged smoothed potential is increasing and lifts up the valence band edge of the capping SrTiO$_3$. The energy difference between the O-$p$ states of the SrTiO$_3$ capping layer and those of the SrTiO$_3$ substrate increases with increasing LaAlO$_3$ film thickness. The right column of Fig. \[fig:potdos\] shows the corresponding density of states (DOS). As the upper panel shows, since the potential increase by 1 unit cell of LaAlO$_3$ is not large enough to overcome the band gap of SrTiO$_3$, the system is still insulating. In the lower panel, the potential increase by 3 unit cells of 