Hydrogen passivation of defects and impurities in GaAs and InP