Tuning the interaction between carbon nanotubes and dipole switches