a Laboratory for Shock Wave and Detonation Physics, Institute of Fluid Physics, China Academy of Engineering Physics, Mianyang 621900, China.
b State Key Laboratory for Environment-Friendly Energy
Materials, Southwest University of Science and Technology, Mianyang 621010, China.
c Key Laboratory for the Green Preparation and Application of Functional Materials Ministry of Education, Hubei Key
Laboratory of Polymer Materials, School of Materials Science and Engineering, Hubei University, Wuhan 430062, China.
Optical logic gates call for materials with giant optical nonlinearity to break the current performance bottleneck. Metal–organic frameworks (MOFs) provide an intriguing route to achieve superior optical nonlinearity benefitting from structural diversity and design flexibility. However, the potential of MOFs for optoelectronics has been largely overlooked and their applications in optical logic have not been exploited. Here, through temporally manipulating the nonlinear optical absorption process in porphyrin-based MOFs, we have successfully developed AND and XOR logic gates with an ultrafast speed approaching 1 THz and an on–off ratio above 90%. On this basis, all-optical information encryption is further demonstrated using transmittance as primary codes, which shows vast prospects in avoiding the disclosure of security information. To the best of our knowledge, this is the first exploration of MOFs for applications in ultrafast optical logic devices and information encryption.