Ultra-high-resolution software-defined photonic terahertz spectroscopy

Ultra-high-resolution software-defined photonic terahertz spectroscopy Rodolfo I. Hermans,1,2 James Seddon,2,* Haymen Shams,2 Lalitha Ponnampalam,2 Alwyn J. Seeds,2 AND Gabriel Aeppli3,4 LondonCentre for Nanotechnology, University College London, 17-19Gordon Street, LondonWC1H 0AH, UK Department of Electronic and Electrical Engineering, University College London, Torrington Place, LondonWC1E 7JE, UK Departments of Physics, ETH Zürich, CH-8093 Zürich, Switzerland and École Polytechnique Fédérale de Lausanne (EPFL), CH-1015 Lausanne, Switzerland Photon Science Division, Paul Scherrer Institute, CH-5232, Villigen, Switzerland *Corresponding author: a.seeds@ucl.ac.uk


INTRODUCTION
The terahertz (THz) electromagnetic band (0.1 THz to 10 THz) lies in the technically challenging spectral gap between infrared light and microwave radiation [1,2]. Specialized technology for the generation, manipulation, and detection of so-called "T-rays" has come later than for other frequency bands and is still an active area of development. The THz regime offers many opportunities. For example, THz radiation is mainly innocuous to live tissue [3], making it attractive for medical diagnostics and material identification for safety and security. Despite the significant absorption of THz radiation by the atmosphere, existing transmission windows also allow useful applications in astronomy [4] and telecommunications [5]. Finally, various THz excitations in solids offer promise for quantum measurement and control [6], if compact coherent sources could be realized.
Astronomy has been a key driving force in the development of THz sources for observations of the C I, C II, CO, and, O I spectral lines, which all lie in the THz region. Heterodyne mixers are the most commonly deployed technology in several astrophysics missions where Schottky diode multipliers are used as the local oscillator (LO) to drive Schottky diode mixers [7], superconductor-insulator-superconductor mixers [8][9][10], and hot electron bolometer mixers [11][12][13]. Ultranarrow-linewidth multiplier sources have been demonstrated for high-resolution spectroscopy of molecular species [14]. The phase noise of multiplier sources is primarily dependent on the number of multiplication steps N in the multiplier chain, adding a 20 log 10 (N) penalty to the phase noise of the source generator. The tuning range of frequency multiplier sources is also limited to discrete frequency bands of less than one octave, set by the rectangular waveguides the multiplier diodes are commonly packaged in.
Direct THz frequency-domain spectroscopy is comparatively less technologically mature, with few commercial systems produced [19]. Typically, these systems make use of free-running lasers, where the optically generated THz linewidth, and hence spectral resolution, is limited by the convolution of the two free-running laser spectral functions [20].
A spectroscopically measured absorbance curve depends on the convolution of the sample absorption and the spectrometer response. Deconvolution is possible, but in most cases, it is desirable to resolve the sample response without relying on noise-limited deconvolution processes [21]. Resolving a narrow spectral feature normally requires even sharper discrimination in the instrumentation illumination and detection. Analysis of the spectral line shape (SLS) provides information on the broadening mechanisms in both solid-state and gaseous samples. This is typically carried out through curve fitting of the measured spectrum using line shape models, which can introduce systematic errors particularly in the case of overlapping or closely spaced spectral lines [22,23].
Here we achieve four milestones. First, we demonstrate an ultra-high-resolution low-noise CW spectrometer. Second, we introduce a new platform for spectroscopy, where by software control of the illumination SLS, we can enhance the performance of a high-resolution CW spectrometer to reveal the details of closely spaced spectral peaks, with the potential to overcome the noise limits of conventional curve fitting. We achieve this enhancement by confirming the absorbance SLSs indirectly, not by their apparent shape but by analyzing the FWHM trend. Third, we demonstrate the technique by high-resolution spectroscopy on LiYF 4 :Ho 3+ , a material of interest for quantum science and technology, where we discriminate between inhomogeneous Gaussian and homogeneous Lorentzian contributions to absorption lines near 0.2 THz. And last, we generalize the concept to introduce the new idea of software-defined spectroscopy, enabled by the optical telecommunications toolbox [24], containing a large variety of readily available and low-cost photonic components.
The introduction of ultra-fast photodiodes such as the unitraveling-carrier photodiodes (UTC-PDs) [25,26], initially for high-speed telecommunications, has allowed the generation of THz signals through photo-mixing. UTC-PDs mitigate the transit time response limited bandwidth of P-I-N photodiodes through blocking hole injection and facilitating the injection of hot electrons to the sweep-out layer. UTC-PD frequency response is limited only by the electron transit time and the time constant associated with the product of the load resistance and junction capacitance of the photodiode.
Early UTC-PD devices were vertically illuminated structures with a trade-off between optical responsivity and bandwidth [27]. In this geometry, the transit time response is improved by reduction of the absorber layer thickness. The reduction comes at the cost of reduced optical absorption in the photodiode absorption layer. There have been several structures that attempt to resolve this through the introduction of optical cavities [27] at the expense of more challenging fabrication.
Alternatively, the bandwidth/responsivity trade-off can be mitigated through the integration of the UTC-PD structure within an optical waveguide coupled photodiode [28]. In this case, the photodiode is evanescently coupled to a passive optical waveguide where the optical absorption and carrier transit direction are perpendicular to each other. This enables a thinner absorber layer to be used without a reduction in optical responsivity. Waveguide to chip coupling can be improved using optical mode converters to further enhance the optical responsivity of such edge coupled devices [29].
In this work, optical heterodyne generation of THz signals is achieved by the mixing of two optical tones f 1 and f 2 in a highspeed photodetector such as a UTC-PD. The resulting THz signal includes a strong component at the heterodyne frequency | f 2 − f 1 | with a SLS given by the convolution of the two freerunning laser emission spectral functions. The THz signal can be tuned by varying f 1 , f 2 or both. Typical semiconductor lasers have a significant linewidth due to fluctuations of the effective cavity length. Linewidths generally vary from 100 kHz for widely tunable external cavity diode lasers [30] to 2 MHz for distributed feedback (DFB) lasers [20].
To achieve the spectrally pure signals needed to resolve details such as SLS of electro-nuclear hyperfine absorption lines in solids and gases, we can exploit an optically phase correlated source for optical heterodyne generation of THz signals. This can be achieved through the use of an optical frequency comb (OFC), which generates a series of phase correlated lines with discrete frequency spacing.
Several methods have been proposed for the generation of OFCs, for example, Kerr combs using micro-resonators [31,32], mode-locked lasers [33], and fiber optic modulators. OFCs employing lithium niobate modulators [34][35][36] are attractive as comb sources due to the tunability of the center wavelength, and exact definition of the line spacing using a supplied microwave reference frequency. Use of such a modulator in a recirculating fiber loop with an erbium-doped fiber amplifier (EDFA) permits comb spans of over 2.7 THz [37]. Narrow-span combs with maximum flatness have also been achieved, initially through cascaded Mach-Zehnder and phase modulators [36,38].
Comb generation can be achieved in a more compact form by the use of a dual-drive Mach-Zehnder modulator, with comb spans up to 0.23 THz being demonstrated [39]. In this case, the construction of the comb is particularly compact and uses offthe-shelf telecommunications wavelength components while achieving a comb span suitable for accessing the region and resolution of interest for the lower-lying crystal field excitations (around 0.2 THz) in rare-earth salts such as LiYF 4 :Ho 3+ .
Demonstrations of CW spectroscopy based on OFC synthesis have been reported previously. In [40], a spectroscopic measurement is made of a gas sample using a super-continuum OFC. However, continuous constant power tuning was not achieved due to limitations of the fixed wavelength filtering used to select comb lines.
Other examples of THz synthesis for CW THz gas spectroscopy are reported in [41,42] and rely on the systems reported in [43,44]. In both of these reports, the system is based on phase locking of multiple external cavity lasers to multiple commercial reference OFCs based on mode-locked fiber lasers, making the system complex. Further, the linewidths of the synthesized THz signals are reported to be in the hundreds of kilohertz range, with frequency tuning steps of hundreds of kilohertz to megahertz, which limits the spectral resolution of the system. There are also many reports in the literature that demonstrate THz synthesis making use of OFCs that make no demonstration of the application of the system for THz spectroscopy as in [45]. The system described in [45] is capable of semi-continuous tuning due only to the limitations in the bandwidth of the components used, and the stability of the optical injection locking. The examples above have been summarized in Table 1 and help to illustrate the importance of both comb generation systems and comb line filtering in the realization of a fully tunable highresolution spectroscopy system. We will show how off-the-shelf telecommunications components and programmable filters can be used to synthesize THz signals with software-defined line shapes, high spectral purity, and continuous tunability, limited only by the minimum tuning step size of the comb reference synthesizer, which can be 1 Hz.
There are many interesting solids, gases, and liquids with optical transitions in the THz region. There are also examples of engineered materials where a high spectral resolution is required to resolve high Q factor resonances. These include asymmetric splitring resonances that support sharp Fano type resonances [48], and defect or guided modes in dielectric photonic crystal slabs [49,50]. Additionally, high Q factor resonances associated with bound states in the continuum observed in dielectric metamaterials as in [51][52][53] would also benefit from enhanced spectral resolution. Beyond direct measurement of high Q resonances, it is interesting to sense shifts in the frequency of the resonances from the introduction of either thin dielectric films [54] or bio-molecules [55].
To demonstrate the capabilities of our novel spectrometer, we have selected a material in the LiYREF 4 family, which has long fascinated the optics and quantum condensed matter communities in a variety of roles, from laser gain media [56] to platforms for fundamental research on Ising magnetism [57], coherent driven spin oscillations and many-body localization [58,59], entangled quantum states [60], and quantum phase transitions [61,62].
Rare-earth (RE)-doped materials have also been identified as candidates for quantum information applications [63][64][65][66]. There is particular interest in systems where electronuclear qubits can be read using optical transitions [67].
Single crystal yttrium lithium fluoride (YLF, LiYF 4 ) features a scheelite-structure, tetragonal space group C 6 4h . RE dopant substituting Y 3+ at sites with S 4 symmetry causes insignificant crystalline structure perturbation [68]. The 4 f 10 electronic configuration of Ho 3+ , a particularly popular dopant, is split into three by the Coulomb field and into five by spin-orbit coupling. We focus on the lower spin-orbit state 5 I 8 , which is further split by the crystal field. Karayianis identified this lowest level as a 3,4 doublet and the two first excited states as 2 singlets corresponding to absorption lines at 0.2 THz (7 cm −1 ) and 0.7 THz (23 cm −1 ) [69]. Electron-paramagnetic-resonance (EPR) experiments by Magariño determined the matrix elements coupling them [68,70]. We investigate the 0.2 THz transition from the 3,4 doublet ground state to the first excited 2 state. This work complements the study carried out by Matmon et al. [71], which was unable to measure the first excited state in the 5 I 8 manifold due to limitations in the spectral range of the instrument used.

PROGRAMMABLE SPECTROSCOPY
We introduce the concept of software-defined spectroscopy as the exploitation of fast modulation of optical or RF signals to create illumination with bespoke spectral curves optimized to extract specific features of the sample optical response. Specific modulation patterns applied to simpler signals exploit common telecommunications technology to allow new and inexpensive approaches to access physical parameters that are difficult to determine with conventional spectroscopic techniques. Formally, as shown in Fig. 1, the mixing diode adds two optical communication inputs A 1 (t), A 2 (t), one modulated by the pattern generator a 2 (t), to produce THz radiation. Thus, The photocurrent generated in the UTC-PD is proportional to the intensity I(t) ∝ |A(t)| 2 , implying an output spectrum for the UTC-PD: where , and δ is the Dirac delta function.
The dominant current oscillation frequency is ω = ω 1 − ω 2 , as higher frequency components are filtered by the limited carrier speed. The spectrum measured at the detector M(ω) is then simply the convolution of I(ω) and the transmission spectrum T (ω) of the sample and has the squared amplitude Equation (3) is the mathematical expression of the simplest type of software-defined spectroscopy that can be performed with our experimental arrangement.
The generation of the specific modulation patterns a 2 (t) was achieved through an inexpensive fiber optic intensity modulator (bandwidth <10 GHz) placed in one of the filtered comb line paths. There is very large flexibility in the choice of modulator. For example, replacing the intensity modulator with an in-phase quadrature-phase (IQ) modulator would allow a software-defined scan of transmission spectra using single-sideband suppressedcarrier modulation [72], without adjusting any other element (e.g., frequency comb) of the instrument. However, this would be limited by the maximum achievable modulator bandwidth. Another example is random on-off keying (OOK) modulation, which allows arbitrary broadening of the laser tone. The resulting spectrum can be approximated as a Gaussian broadening of the spectrum with a width defined by the time-base of the pulse pattern.
A more generalized broadening can be achieved when the OOK is defined as a two-state discrete Markov stochastic process defined by the transition matrix M and probability p: We derive in Supplement 1 the exact analytical form of the spectra for a Markov OOK by calculating the correlation function and using the Wiener-Khintchin-Einstein theorem [73]. We recognize three cases that are of particular interest. Consider first 0 < p < 1/2 with delaying correlation exp(log(1 − 2 p)t/τ ) and an exact Lorentzian power spectral density function (PSD); second, an unbiased pseudo-random bit sequence corresponding to a Markov process with p = 1/2 well approximated by a Gaussian PSD, with σ = √ 6/τ ; and finally, the case 1/2 < p < 1 with oscillatory correlation exp(log(1 − 2 p)t/τ ) cos(πt/τ ) featuring a side peak. By this technique, the modulated signal will be broadened and shifted by convolution with a spectrum that depends not only on the pattern time-base but also the digitally defined OOK defined by a state transition probability.
The digital OOK pattern is not limited to a Markovian process but could be any arbitrary bit sequence pattern. Here we focus only on exploiting the ability to generate both Gaussian and Lorentzian SLSs, achieved by tuning the value of p defining the Markovian OOK.
The corresponding FWHMs are where the last equation is the Olivero's Voigt width approximation [75]. Equations (6a)-(6c) and Fig. 2 reveal three distinguishable FWHM trends: a linear behavior for Lorentzian, root mean square (RMS) for Gaussian, and a more complex expression in between the former two for Voigt [76]. This observation opens possibilities of identifying a SLS that is not directly visible by examining the FWHM as a function of control parameters of the illumination SLS. Expected FWHM for three different convolution tuples. The convolution of two Lorentzians curves is also a Lorentzian with FWHM equal to the sum of its components and therefore appears as a linear curve (red). The convolution of two Gaussians is also a Gaussian curve with FWHM given by the RMS (blue). The convolution of Gaussian and Lorentzian curves gives a Voigt profile with FWHM in between (green). Figure 1 shows the experimental arrangement. Frequency synthesis was carried out using an OFC generator detailed by Shams et al. [77]. The comb is formed via modulation of a single 15 kHz linewidth laser signal at 1553.7 nm (RIO Orion Series). The modulator is a dual-drive Mach-Zehnder, driven by a microwave synthesizer, Rohde&Schwarz SMP04 40 GHz, which generates an optical comb spectrum with a flat response [39]. Comb line selection is achieved using a multi-port programmable optical filter (Finisar Waveshaper 4000S) with insertion loss 4.5 ± 0.1 dB, resulting in transmission of two coherent lines with 30 dB suppression of adjacent comb lines.

METHODS
The two selected comb lines are amplified using an EDFA with a band-pass filter placed after the EDFA to reduce the noise contributions from amplified spontaneous emission (ASE). To achieve high-resolution tuning, the microwave synthesizer frequency is tuned across the frequency span between comb lines followed by sequentially shifting the programmable optical filtering band. A pause is introduced after changing filter settings, with a settling time of 500 ms. Figure 3(a) shows the synthesized OFC spectrum with a comb span of 0.27 THz, a comb line spacing of 17.25 GHz and two selected comb lines for a beat frequency of 207 GHz.
The UTC-PDs used in this study were grown by gas source molecular beam epitaxy by III-V laboratory; the epitaxial structure of the devices is detailed in [78]. The device geometry was a 3 × 15 µm 2 with a 3 dB bandwidth of 90 GHz, and optical responsivity of 0.2 A/W. The UTC-PD was integrated with a co-planar waveguide, and the THz signal was extracted using a Cascade Microtech air co-planar (ACP) probe with a bandwidth of 140 GHz to 220 GHz. Flann 20 dB standard gain horn antennas (145 GHz to 220 GHz bandwidth) formed the free-space path within which the sample was placed. The THz signal was down-converted using a sub-harmonic mixer (VDI WR5.1 SHM) with a bandwidth of 140 GHz to 220 GHz, driven by a ×6 frequency multiplier (OML S10MS-AG), supplying a LO signal between 70 GHz and 110 GHz. The LO frequency multiplier was driven by an Agilent E8257D 67 GHz signal generator. The THz signal was down-converted to a 15 GHz intermediate frequency (IF) and recorded on an Agilent 8565 E spectrum analyzer. A common 10 MHz reference clock is supplied to the LO signal generator and spectrum analyzer from the comb line reference synthesizer. Figure 2 shows the down-converted IF signal at a resolution bandwidth of 100 Hz. For resolution bandwidths <100 Hz, signal instabilities were noted. These can be attributed to frequency/phase-induced intensity noise arising from the unmatched optical path lengths traversed by the two optical tones before being heterodyned at the UTC-PD (Fig. 1). A significant improvement in signal stability can be achieved by active matching of the two optical path lengths, enabling signal stability at sub-hertz resolution bandwidths [37] to be maintained. Such resolution, however, was not required for the measurements reported here.
The sample of LiYF 4 :Ho 3+ was commercially provided by UAB ALTECHNA at 1% Ho 3+ concentration, with custom dimensions of 10 mm × 10 mm × 2.18 mm. The crystals were cut and optically polished with the c axis parallel to one of the short side lengths. The test sample was mounted on the cold finger of a continuous-flow liquid helium cryostat, and masks were inserted such that THz radiation could not be transmitted around the sample. The THz transmission through the sample was linearly polarized with the electrical field along the c crystalline axis. The cooled sample was illuminated through thin polypropylene windows, liquid helium was pulled by a diaphragm vacuum pump, and the sample temperature was maintained at 4 K or 200 K by an Oxford ITC4 controlling a resistive heater.   At 200 K, absorption peaks are no longer measurable as higher states are thermally populated, and the weak absorption peaks have been flattened by Doppler broadening. We observe eight absorption lines in the range between 189 GHz and 220 GHz with linearly decreasing spacing ranging from 5.2 GHz to 3.75 GHz, with slope −219 ± 20 MHz [ Fig. 4(b)]. We attribute the spacing variation to the second-order hyperfine shift {Eq. (10) in [71]}.

RESULTS
The absorption line appears broader than the experimental resolution, an effect that we next examine quantitatively.
We use Gaussian broadening applied to the THz signal by the optical modulator and measure the FWHM of the estimated absorbance curves as a function of the illumination linewidth. Figure 5 shows three representative cases for source linewidths of 100 Hz, 650 MHz, and 2000 MHz and the respective Gaussian fits; the artificial broadening of the illumination SLS allows us to observe a nonlinear FWHM trend featuring a narrow 99% confidence band for the RMS fit. The FWHM increases with the illumination broadening, revealing an RMS trend as expected for convolutions of two Gaussian SLSs [Eq. (5a)].
The trend shows an excellent RMS fit (w m = w 2 i + w 2 s ) of the absorbance FWHM as a function of illumination FWHM (w i ), yielding a sample linewidth w s = 0.907 ± 0.017 GHz. The trend in Fig. 6 is characteristic of the convolution of two Gaussian SLSs. This implies an intrinsically Gaussian line shape caused by inhomogeneous broadening, ruling out state lifetime as a significant contributor to the absorption linewidth. Consistent with this result, an attempt to fit the data in Fig. 6 with the Voigt result Eq. (6c) reveals a negligible Lorentzian contribution (FWHM = 2γ = 0.0004 ± 10.3 MHz), corresponding to an excited state lifetime bounded from below by 30 ns. Furthermore, if the observed 0.907 GHz FWHM were to be attributed to a purely Lorentzian hypothesis, the expected FWHM curve would show a considerable departure from the identity asymptote and the observed linewidth, as shown in Fig. 6 (black line). The curve instead follows the Gaussian form indicated by the blue line in Fig. 2, or equivalently, a Voigt trend but with a negligible offset (and therefore Lorentzian contribution) from the blue line. For comparison of our novel modulator-based spectroscopy to traditional methodology, we have performed numerically intensive fitting to a Voigt line shape of the simple unmodulated absorption measured with our ultra-high-resolution spectrometer. The "best" fits using conventional analysis are obtained for the Lorentzian (χ 2 = 1.1) rather than Gaussian limit (χ 2 = 1.5), a finding influenced by the selection of the weighting factors for the multi-peak spectrum and the details of the data between peaks and therefore not a robust estimation of the underlying physics. Concomitantly, visual inspection reveals a negligible difference between Gaussian and Lorentzian descriptions and the data, while the dependence of the unbiased (by choices of weighting) FWHM on the modulatorintroduced Gaussian broadening incontrovertibly shows that the correct Voigt description is dominated by the Gaussian term.

PERFORMANCE COMPARISON
A key benefit of coherent THz generation demonstrated here is an improvement in the spectral purity of the incoming THz signal. In this experiment, low-phase-noise synthesizers have been used to drive the OFC generator, and to provide the LO for down-conversion. As discussed in the Methods section, the measured IF FWHM linewidth was <100 Hz, implying a quality factor Q of >2 × 10 9 . The linewidth measurement was limited by low-frequency noise observed at resolution bandwidths <100 Hz.
The measured noise of each of the synthesizers and the downconverted IF signal were −104 dBc and −78 dBc at 10 kHz offset, respectively (Fig. 7). The measured noise of the downconverted signal represents the overall system noise as described in [37], which includes the scaled phase noise of the comb reference synthesizer [S1 + 20 log 10 (N1)] (dBc/Hz) and the LO [S2 + 20 log 10 (N2)] (dBc/Hz) contribution from the comb/heterodyne system and the spectrum analyzer. S1 and S2 are the phase noise of the reference synthesizer and LO, respectively, at the fundamental frequencies of −104 dBc and −105.75 dBc for S1 and S2, and N1 and N2 are the frequency multiplication factors. The spacing between the optical lines used to generate the heterodyne frequency of 207 GHz is equal to 12 comb line spacings (N1 = 12). Further, a second-harmonic mixer with a ×6 frequency multiplier (Virginia Diodes WR5.1 SHM) was used to down-convert the signal, N2 = 12. Hence, the increase in the composite noise of ∼26 dB in the down-converted signal is due predominantly to the frequency multiplication factor 20 log 10 (12), and the composite noise contribution from the comb/heterodyne system is estimated to be −89.5 dBc at 10 kHz offset. High-performance vector network analyzers (VNAs) are sometimes used for high-resolution spectroscopy in the sub-THz regime [79,80] and for verification of TDS data [81].
The phase noise level achieved through optical synthesis at 207 GHz is better than high-performance commercial network analyser systems with frequency extenders for the equivalent frequency band, as shown in Fig. 7. The comparison points (green and cyan markers) are derived from the specified phase noise of the network analyzer and the multiplication factor of the extender only, without allowance for excess noise from system integration and are therefore best-case estimates. It should, however, be noted that frequency extenders can deliver milliwatt-level output powers compared to microwatt-level output powers from the UTC-PD used in this work, so they are better suited to spectroscopy of samples at high temperatures (i.e., where beam heating is not a problem). Frequency extender sources also do not offer the software-defined line shape capabilities of the photonically generated THz sources such as UTC-PDs, and have limited tuning ranges less than one octave when compared to antenna integrated UTC-PDs with substrate integrated lenses, which can be multioctave [82]. We observe a signal-to-noise ratio (SNR) of 50 dB for the 207 GHz signal down-converted to an IF of 15 GHz.
Besides the frequency precision, our system is capable of highfrequency accuracy, by referencing the microwave synthesizer to primary frequency standards via global positioning system (GPS) disciplined sources. Low-power monochromatic illumination also allows minimum perturbation of the state of the sample, with negligible heating and perturbation of the population of the states.
Some of the existing experimental limitations derive from compromises for flexibility at the research stage, and no attempts to improve acquisition rates were performed. At the same time, they set a well-defined agenda for future development. The unpackaged UTC-PD required a fiber launcher to couple the focused laser beams into the device, making it susceptible to drift. Continuous monitoring of the photocurrent allowed continuous optimization of the alignment and normalization of the observed curve for the small fluctuations observed. The output power available from UTC-PDs is limited primarily by thermal effects, while the bandwidth is limited by electron transit time and RC constraints. In addition to these bandwidth constraints, additional limitations are imposed on the device by the electronic circuitry connected to the device. For this experiment, we utilized a UTC-PD integrated with a co-planar waveguide. To extract the THz signals from the device, we used an ACP probe with a WR-5 waveguide, along with a standard gain horn antenna. Such probes and antennas have a discrete bandwidth limitation imposed by the cut-off frequencies of the waveguide geometry. These limitations can be better managed through the use of devices integrated with planar broadband antennas, which remove the need for external probes to extract the THz signals [83,84]. In this experiment, only the amplitude of the power transmitted was recorded. The system could be extended by exploiting a photonically generated LO. Utilizing a self-heterodyne configuration such as that of Hisatake et al. [85] where one of the coherent lines is shifted in frequency and then used to down-convert to a low-frequency IF would enable the recovery of both amplitude and phase information from the spectrometer. Also, it would eliminate additional linewidth broadening introduced by the LO frequency multiplication step. The reference signal for spectrum normalization neglects small changes in the sample reflections as a consequence of temperature variations of the sample refraction index.

CONCLUSION
We have demonstrated a novel software-defined, photonic CW THz spectrometer that offers continuous tuning and sub-100 Hz linewidth. The system has the potential to reach sub-hertz resolution with an electronic feedback loop to actively match the heterodyne optical path lengths. The capabilities of the new approach are illustrated by high-resolution spectroscopy of LiYF 4 :Ho 3+ at 4 K, which complements measurements by Matmon et al. [71] for a band unreachable by FTIR with conventional sources. The spectral features of the transitions in the 5 I 8 spin-orbit state have been resolved to reveal the magnitude of the second-order hyperfine splitting (−0.22 ± 0.02 GHz) by direct optical observation. The spacing between adjacent hyperfine lines is shown to vary linearly through the octet, revealing the magnitude of the second-order hyperfine shift [Eq. (10) in [71]}. Furthermore and more importantly, we demonstrate the use of the software-defined spectroscopy technique to determine that the absorbance SLS is predominantly Gaussian and as such, likely due to inhomogeneous broadening; therefore, the intrinsic state lifetimes are much longer than the inverse linewidth. We estimate a lower bound on the excited state lifetime of τ > 30 ns from the Lorentzian contribution of the Voigt fitting (FWHM = 2γ = 0.0004 ± 10.3 MHz). We conclude that the deliberate control of the instrument line shape via a key component of the optical communications toolbox-the modulator-enables reliable determination of spectral shapes. The technique depends on the underlying physics rather than on the fitting of model parameters, and can be applied much more generally to identifying specific spectral features because it allows the construction of sequences of essentially arbitrary illumination spectra (i.e., basis functions) for their optimal isolation. For example, illumination spectra with multiple peaks at variable positions could be used as "rulers" to measure sideband positions in absorption spectra.