to the interface. The convergence of the total energy and total charge density has been checked with $k$-grids of up to $20\times20\times1$. Periodic copies are separated by $\sim$15 Å of vacuum. We also extend the vacuum to $30$ Å to check the convergence. The effect of the artifical electric fields in the vacuum due to the periodic boundary condition, which turns out to be quite small, is discussed in Appendix \[appendix-PBC-intrinsic\]. The force convergence threshold is 26 meV/Å. In some key results we reduce the threshold to 13 meV/Å to check the convergence.

In all our calculations, the interfaces are along the (001) direction so that the $z$ axis is perpendicular to the interface. The $x$ and $y$ directions of the simulation cell are subject to periodic boundary conditions and their lengths are fixed to the theoretical lattice constant of SrTiO$_3$ $a=3.85$ Å (1.5% smaller than the experimental value). The atomic coordinates are relaxed [^2] until every force component is smaller than the convergence threshold. The detailed configurations for different calculations are specified in each section below.

DFT results {#DFT}
===========

Symmetric double $n$-type and $p$-type superlattices {#DFT-symmetric}
----------------------------------------------------

The simplest approach to studying the $n$-type or $p$-type [SrTiO$_3$/LaAlO$_3$ ]{}interface 