Functionalization of single-walled carbon nanotubes with optically switchable spiropyrans