Quantum mechanical calculation of the carrier distribution and the thickness of the inversion layer of a MOS field-effect transistor