Lanthanide-doped semiconductor nanocrystals: electronic structures and optical properties