Theory of the Zeeman effect in semiconductor nanocrystals