**6. Discussions and Conclusions**

In this work, we have provided an overview of the advantages and implementation challenges of a time-resolved nonlinear ghost-imaging approach to THz single-pixel imaging. By combining nonlinear THz generation and single-pixel TDS detection, we demonstrated the high-resolution reconstruction of a semi-transparent sample with a subwavelength resolution (512 × 512 pixels). By providing a detailed analysis of the Walsh–Hadamard reconstruction scheme, we have shown how

a specific choice of patterns and the order of acquisition can play a beneficial role in speeding-up the reconstruction of the peak-field transmission from the sample. Remarkably, we have shown that less than 10% of the incident samples were required to achieve a high-fidelity reconstruction of the sample image in a general sequential reconstruction. Our approach, which is based on a lexicographical sorting of the incident patterns in terms of their spatial frequency (an approach we denoted as a "smart-Walsh" reconstruction), is general and image-independent and can be applied to reduce the overall reconstruction time for unknown samples. Interestingly, such a result could be further improved by considering that even a smaller percentage of incident patterns are required to reconstruct the sample: in our case, only 8% of the patterns were associated with an expansion coefficient exceeding 60dB. In practical terms, this would correspond to a 92% shorter acquisition time, corresponding to a 12.5× speed up of the image reconstruction process when compared to a full scan based on the Hadamard encoding scheme. These numbers suggest that the reconstruction process could be significantly sped up through the application of adaptive-basis-scan algorithms and deep-learning-enhanced imaging, which identify and predict the best set of scanning patterns in real time [40,49–51].

Interestingly, our results suggest that the nonlinear GI methodology is not limited by the numerical aperture of the optical system in a "conventional" sense. Said differently, it operates under the assumption of a very low numerical aperture to obtain a faithful spectral representation of the image. However, our results highlight that the image reconstruction is quite sensitive to the size and alignment of the pinhole function selecting the *kx*, *ky* = 0 components of the scattered field. Most importantly, in sharp contrast with previous literature on the topic, the reconstruction accuracy cannot simply be represented as a matter of effective "resolution". The drop in reconstruction fidelity, in fact, is not driven by the attenuation of high-frequency spatial components (i.e., blurring) as in standard imaging, but it can lead to the appearance of artefacts and spurious spatial frequencies. To the best of our knowledge, the reconstruction limits of single-pixel time-domain imaging have never been formalised elsewhere.

Finally, although thin emitters are a general requirement for this approach, TIMING exhibits relaxed constraints between the nonlinear interaction length and the image resolution. Yet, solutions for sub-micron-thick large-area terahertz generation are practically possible, enabling resolutions within the same scale or better. A promising platform to achieve this goal is narrow-bandgap semiconductor devices based on InAs or InSb platforms. These materials not only provide extremely high optical-to-terahertz conversion efficiency per unit length but they are also suitable for large-scale fabrication and deployment in real-world devices thanks to their established deployment in the electronic domain.

We believe that TIMING is a significant step forward in the development of terahertz micro-diagnostics based on hyperspectral imaging devices. Our approach also addresses fundamental criticalities in the imaging reconstruction process, which generally affect any high-resolution imaging domain where high temporal resolution is sought. As such, TIMING establishes a comprehensive theoretical and technological platform that paves the way for new generations of terahertz imaging devices satisfying the requirements for high-resolution and spectral sensitivity in real-world applications.
