Nanoscale optical modulators typically operate by manipulating the interaction between light and nanomaterials. For instance, graphene and other 2D materials can be used to achieve significant changes in optical properties with minimal input energy. These changes can be controlled via external stimuli like electric fields, magnetic fields, or temperature variations.