Ultrafast dynamics in semiconductor devices