Theory and characterization of random defect formation and its implication in variability of nanoscale transistors