  The Kohn-Sham (KS) system is an auxiliary system whose effective potential is
unknown in most cases. It is in principle determined by the ground state
density, and it has been found numerically for some low-dimensional systems by
inverting the KS equations starting from a given accurate density. For solids,
only approximate results are available. In this work, we determine accurate
exchange correlation (xc) potentials for Si and NaCl using the ground state
densities obtained from Auxiliary Field Quantum Monte Carlo calculations. We
show that these xc potentials can be rationalized as an ensemble of
environment-adapted functions of the local density. The KS band structure can
be obtained with high accuracy. The true KS band gap turns out to be larger
than the prediction of the local density approximation, but significantly
smaller than the measurable photoemission gap, which confirms previous
estimates. Finally, our findings show that the conjecture that very different
xc potentials can lead to very similar densities and other KS observables is
true also in solids, which questions the meaning of details of the potentials
and, at the same time, confirms the stability of the KS system.
