“…Optical logic gates, the fundamental element of optical computing, have attracted much attention due to their ultrahigh process speed, high information capacity, and low power consumption [ 1 , 2 , 3 ]. Metamaterials and their two-dimensional (2D) equivalents metasurfaces, are the artificial metal or dielectric structures that can manipulate the amplitude, phase, and polarization of electromagnetic waves in the subwavelength scale [ 4 , 5 , 6 , 7 ], which have been applied in a wide range of fields, including negative refraction [ 8 ], beam steering [ 9 ], holography [ 10 ], perfect absorption effect [ 5 ], sensing [ 6 ], etc.…”