Electrical and optical properties of semiconductor nanocrystals