Abstract
In the domain of spectroscopy, miniaturization efforts frequently encounter notable challenges, particularly in achieving high spectral resolution and construction accuracy. Here, we introduce a computational spectrometer powered by a nonlinear photonic memristor featuring a WSe2 homojunction. This innovation overcomes traditional limitations, such as constrained Fermi level tunability, persistent dark current depression, and limited photoresponse dimensionality, by leveraging dynamic energy band modulation via palladium (Pd) ion migration. This approach engenders pronounced nonlinearities in the spectral response, significantly enhancing spectral resolution and measurement precision. By integrating this system with a bespoke nonlinear neural network, our spectrometer achieves unprecedented peak wavelength accuracy (0.18 nm) and spectral resolution (2 nm) over a comprehensive 400–800 nm bandwidth. This development heralds a paradigm shift towards compact, highly efficient spectroscopic instruments and establishes a versatile framework for their application across a broad spectrum of material systems.