Polarity-dependent nonlinear optics of nanowires under electric field