Similar to their macroscopic counterparts, nanoscale diodes rely on the junction between two different types of semiconductor materials: p-type and n-type. When these materials are combined, they form a p-n junction that facilitates the flow of electrons. At the nanoscale, quantum mechanical effects become significant, affecting the diode's electrical characteristics.