The Chemistry of single carbon nanotube optics and electronics