Electronic structure of rectangular quantum dots