Carbon nanotubes are one dimensional and very narrow. These obvious facts i
mply that, under doping with boron and nitrogen, microscopic doping inhomog
eneity is much more important than for bulk semiconductors. We consider the
possibility of exploiting such fluctuations to create interesting devices.
Using the self-consistent tight-binding technique, we study heavily doped
highly compensated nanotubes, revealing the spontaneous formation of struct
ures resembling chains of random quantum dots, or nanoscale diodelike eleme
nts in series. We also consider truly isolated impurities, revealing simple
scaling properties of bound state sizes and energies.