  Optical spectroscopy plays an essential role across scientific research and
industry for non-contact materials analysis1-3, increasingly through in-situ or
portable platforms4-6. However, when considering low-light-level applications,
conventional spectrometer designs necessitate a compromise between their
resolution and sensitivity7,8, especially as device and detector dimensions are
scaled down. Here, we report on a miniaturizable spectrometer platform where
light throughput onto the detector is instead enhanced as the resolution is
increased. This planar, CMOS-compatible platform is based around metasurface
encoders designed to exhibit photonic bound states in the continuum9, where
operational range can be altered or extended simply through adjusting geometric
parameters. This system can enhance photon collection efficiency by up to two
orders of magnitude versus conventional designs; we demonstrate this
sensitivity advantage through ultra-low-intensity fluorescent and astrophotonic
spectroscopy. This work represents a step forward for the practical utility of
spectrometers, affording a route to integrated, chip-based devices that
maintain high resolution and SNR without requiring prohibitively long
integration times.
