  The optimal design for infrared second harmonic generation (SHG) is
determined for a GaAs-based quantum device using a recently developed genetic
approach. Both compositional parameters and electric field are simultaneously
optimized, and the quantum limit for SHG, set by the trade-off between large
dipole moments (favouring electron delocalization) and large overlaps
(favouring electron localization), is determined. Optimal devices are generally
obtained with an asymmetric double quantum well shape with narrow barriers and
a graded region sideways to the largest well. An electric field is not found to
lead to improved SHG if compositional parameters are optimized.
