A digitally generated ultrafine optical frequency comb for spectral measurements with 0.01-pm resolution and 0.7-s response time Supplementary Information S1. Working principle of digital generation of ultrafine optical frequency combs Figure S1 elucidates the procedures of UFOFC generation. The computer generates a data train Dinput F and conducts the inverted fast Fourier transform (IFFT). Here F refers to the domain used in the data train. The post-IFFT data then undergo digitalto-analog conversion (DAC) to change into the electrical waveform E EO t . This waveform is applied to an electric-to-optical (E/O) modulator to modulate the narrowlinewidth continuous-wave laser into the optical waveform EUFOFC t . The laser has initially a single frequency f0. After the E/O modulation, it is changed into a frequency comb. Computer EEO t 01010110 Dinput F t DAC IFFT Narrow-linewidth tunable laser Frequency comb f0 f E/O EUFOFC t Figure S1. Generation of the ultrafine optical frequency comb using the digital data process by the inverted fast Fourier transform (IFFT). To find the proper expression of Dinput F for a targeted frequency comb EUFOFC t , we can derive retrospectively. For simplicity, here we neglect the influence of conversions between digital and analog. Assume the targeted frequency comb can be expressed in the frequency domain as S1 UFOFC f Eq expj q f f q N (S1a) q1 here Eq, q and fq are the amplitude, phase and frequency of the qth comb line, respectively; and it has f q f 0 qf , where f0 is the carrier frequency of the laser source, f is the constant comb spacing, q is an integer with q = 1, 2, …, N, and N is the number of comb lines. In the time domain, the corresponding waveform of the frequency comb can written as EUFOFC t 1 2 exp j 2 f 0 qf t j q N E q1 q (S1b) Therefore, the electrical waveform E EO t that is applied to the E/O modulator should have the form of E EO t 1 2 N E q 1 q exp j 2 qf t j q (S2) Compared with the UFOFC electrical expression EUFOFC t , the signal E EO t takes away the carrier frequency f0 of the laser source. To get the electrical signal E EO t after the IFFT process, the input signal from the computer should satisfy Dinput F FFT E EO 1 2 N E q 1 q exp j q FFT exp j 2 qf t E q exp j q F 2qf N (S3) q 1 E q exp j q F Fq N q 1 here Fq 2qf . Based on Equation (S3), the data train generated by the computer is essentially a comb in the data domain F, which has the value E q exp j q at each data point F Fq . By comparing Equations (S1a) and (S3), one can see that they have very similar form of expression. The only difference is that Equation (S1a) is in the optical frequency domain, whereas Equation (S3) is in the data domain. Such a similarity significantly simplies the generation of data train in the computer. S2 S2. Additional experimental data of the generated ultrafine optical frequency comb Additional UFOFC data in the time and the frequency domain are shown below. Figure S2 shows the overview and the close-up of time-domain waveforms of the generated UFOFC. In the enlarged view over the time range of 10 s, the waveform is periodic with the period of 0.7 s. Within one period, there are many peaks, with the peak-to-average power ratio (PAPR) of 3.7. This is different from the typically optically-generated frequency combs (e.g., by the femto-second lasers), which has very short pulses separated periodically by relative long intervals (determined by the repetition rate) and thus very high PAPR ( repetition period/pulse width, typically > 103). The reason is because the pseudo-random relationship among the phases of frequency comb lines we choose intentionally (see Materials and Methods). Without the randomization of phase, saying if the phases of all the comb lines are the same, the PAPR of the UFOFC would reach 3.2 106. From the experiment’s point of view, a low PAPR is desirable as it eases the requirements to the intensity modulator and the photodetector. This is the rationale for the choice of pseudo-random phase relationship and is also one distinctive feature of the UFOFC as Normalized power compared to the optically-generated frequency combs. 1 0.8 0.6 0.4 0.2 0 0 10 20 30 40 50 60 70 80 90 100 26 27 28 29 30 Normalized power Time (μs) 1 0.8 0.6 0.4 0.2 0 20 21 22 23 24 25 Time (μs) Figure S2. Time-domain waveform of the generated frequency comb in the range of 100 s, and the enlarged view over the time range of 10 s. S3 Figure S3(a) plots the overlapped power spectra of the UFOFC of 100 measurements, and Figure S3 (b) and (c) show the enlarged views. The sampling interval is 1 s. It is seen in Figure S3 (c) that the frequency peaks present almost no shift in either the position or intensity, and only the foot parts show slight variation. This well shows the frequency and intensity stability of the generated UFOFC. Frequency Comb Frequency Comb -90 (a) Power [dBm] Power [dBm] -90 -100 -110 -120 25 50 Frequency [MHz] 75 (b) -100 -110 -120 -1.7 Frequency Comb 0 Frequency [MHz] 1.7 -90 Power [dBm] (c) -100 -110 -120 -0.12 0 Frequency [MHz] 0.12 Figure S3. Overlapped power spectra of 100 measurements of the generated ultrafine optical frequency comb. The measurement interval is 1 s. S3. Derivation of equations of phase shift and peak wavelength shift in the unbalanced Mach-Zehnder interferometer In the sensing unit of Mach-Zehnder interferometer (MZI) as shown in Figure 4, the two arms have unequal arm lengths. In fact, the sensing arm is longer than the reference arm. The optical path difference OPD consists of two parts, OPD nL OPDi 0 (S4) S4 here n is the refractive index of the sample, and L is the physical length of the sample along the optical axis. The first term nL in Equation (S4) is the contribution of liquid sample and the second term OPDi0 includes all the other parts (fibers and collimators of the sensing arm, the reference arm, etc.). When the temperature of the sample is changed, the first term on the right side of Equation (S5) varies whereas the second term remains a constant. The total phase difference due to the optical path length can be expressed as 2 OPD 2 nL 2 OPDi 0 (S5) here is the wavelength. (A) Phase shift of the UFOFC method For the UFOFC method that measures the phase, the phase shift UFOFC varies with the temperature change T by the relationship UFOFC 2L n (S6) Therefore, the thermo-optic coefficient (TOC) can be calculated by dn dn dUFOFC dUFOFC dT dUFOFC dT 2L dT (S7) here dUFOFC dT can be obtained from the slope of measured curve UFOFC versus T (see Figure 6). (B) Spectral shift of the OSA method For the OSA-based method, according to Equation (S5), the peak wavelength m of the mth mode should satisfy m 2 m nL 2 m OPLi 0 m2 (S8) here m is an integer. When the sample is subjected to a temperature change T, the peak is shifted by , but the total phase should remain to be m2. Therefore, m T m 0 T (S9) S5 According to Equations (S7) and (S8), there are m 2L dn T m 0 dT (S10a) m 2 2 2 n0 L OPDi 0 2 OPD0 m 0 m 0 (S10b) here n0, m0 and OPD0 are all the initial values before the temperature change. Substitute Equations (S10a) and (S10b) into Equation (S9), it gives dn OPD0 dm dT m 0 L dT (S11a) and thus m m 0 L OPD0 n (S11b) here dm dT can be obtained from the slope of measured curve m versus T using the OSA (see Figure 6). From the measured transmission spectra of the MZI sensing unit shown in Figure 5, the period is F = 5.4961 GHz. Then, the initial optical path difference is calculated to be OPD0 c 2.9979 108 0.05455 m F 5.4961 109 (S12) here c =3.0 108 m/s is the speed of light in vacuum. In this example, the cuvette is filled with ethanol. S4. Calculation of resolutions and UFOFC response time Table 1 lists the resolutions of the OSA method and the UFOFC method to different parameters. Below shows how these values are calculated. In the OSA method, the OSA (Yokogawa AQ6370B) has the best spectral resolution OSA = 0.002 nm. The other parameters are m0 = 1551.220 nm, L = 5.01 mm and OPD0 = 0.05455 m. From Equation (S11b) (or Equation (3)), the resolution of the refractive index change nOSA can be estimated as nOSA OPD0 0.05455 OSA 0.002 10 9 1.4 10 5 (S13) 9 3 m 0 L 1551.220 10 5.01 10 S6 and the corresponding resolution of the temperature change T is TOSA nOSA TOCethanol 1.4 105 0.033 C 4.28 10 4 (S14) here TOCethanol is the thermo-optic coefficient of ethanol at 25 oC. It takes the value of -4.2810-4 o -1 C as measured by us using the Fresnel reflection method (see Supplementary section S6). In the UFOFC method, the comb spacing fUFOFC = 1.46 MHz determines the resolution of the spectral shift UFOFC. UFOFC 2 c fUFOFC 1550.129 10 1.46 10 0.01 pm 3.0 10 9 2 6 8 (S15) For the resolution of phase change UFOFC, it can be read from Figure 5 that a frequency change of F corresponds to a phase change of 2, therefore it has UFOFC 2 2 fUFOFC 1.46 106 0.0017 rad F 5.4961 109 (S16) From Equation (S6), it has nUFOFC 1550.129 109 UFOFC 0.0017 8.4 108 3 2L 2 5.01 10 (S17) and then, TUFOFC nUFOFC TOC ethanol 8.4 10 8 2.0 10 4 C 4 4.277 10 (S18) The ratio of resolutions between the OSA method and the UFOFC method is OSA nOSA TOSA 167 UFOFC nUFOFC TUFOFC (S19) This shows clearly that the UFOFC method is 167 time finer than the OSA method in terms of the resolutions of wavelength shift, refractive index change and temperature variation. The dynamic response of the UFOFC method can be estimated as below. To calculate the phase shift in the UFOFC method, it needs 8192 sampling points. As the sampling rate of the AWG is 12 GSamples/s, the time for one data generation cycle is 8192 0.7 μs 12 109 (S20) When the coherent receiver and the data calculation in the computer are fast enough, the time for one measurement cycle is just 0.7 s. S7 S5. Estimation of thermo-optic coefficients of ethanol For the OSA-based method, the slope of linear fit in Figure 6 is -0.071 ± 0.032 nm/oC. From Equation (S11a), it has dn OPL0 dm dT m 0 L dT 0.05455 0.07106 0.03187 10 9 9 3 1551.22 10 5.01 10 4.99 2.24 10 4 C -1 (S21a) After the deduction of the influence of TOC of the quartz cuvette (see Supplementary section S7), the TOC of ethanol is corrected to be dn 4.99 2.24 10 4 - 0.0494 10 4 dT 4.9 2.2 10 4 C -1 (S21b) 2.2 45% 4.9 (S21c) The error percentage For the UFOFC method, the data points are fitted to a straight line using the least square fitting method (see Figure 6). The slope is -8.885 ± 0.018 rad/oC. From Equation (S7), it gets dn dUFOFC 1550.129 109 8.885 0.018 dT 2L dT 2 5.01 10 3 4.377 0.009 10 4 C-1 (S22a) Similarly, the deduction of the influence of quartz cuvette corrects the TOC of ethanol to be (see Supplementary section S7) dn 4.377 0.009 10 4 - 0.0494 10 4 dT 4.328 0.009 10 4 C -1 (S22b) 0.009 0 .2 % 4.328 (S22c) 45% 225 0.2% (S23) The error percentage The ratio of the error percentages is This shows that the UFOFC is more accurate than the OSA method by a factor of 225. S8 LED Optical circulator 1 3 Optical power meter 2 Thermometer Reflection at fiber end nf Liquid samples n1 Water bath Figure S4. Schematic of the Fresnel reflection method for refractive index measurement. S6. Measurement of thermo-optic coefficient of ethanol using the Fresnel reflection method As a reference of the TOC value, we conducted another experiment using the Fresnel reflection method [S1]. The working principle is illustrated in Figure S4. A broadband light (central wavelength 1550 nm, bandwidth 20 nm) from a light emitting diode (LED) enters port 1 of an optical circulator and goes out from port 2, which is connected to a single-mode optical fiber (Corning SMF-28e). The other end of the fiber is cleaved and immerged into the liquid sample, whose temperature is controlled by a water bath and is monitored by a thermometer. When the light hits the fiber/liquid interface (see the inset of Figure S4), it undergoes a Fresnel reflection under normal incidence. The reflected light goes back to port 2 of the optical circulator and then passes to port 3, whose power is measured by an optical power meter. The Fresnel reflection at the fiber/liquid interface is given by n f n1 R n n f 1 2 (S24) here nf is the refractive index of optical fiber and n1 is that of liquid sample. To offset the influence of fiber connection and temperature-dependence of fiber refractive index, we first used the air as the sample and measured the reflected power at different temperatures, and then used these data as the reference. The S9 processed refractive index of ethanol is plotted in Figure S5 over the temperature range of 15 – 56 oC. Every data point represents 5 measurements, and the error bars indicate the standard deviation of 5 measurements. From the slope of linear fit, the TOC of ethanol is (-4.28 ± 0.08) 10-4 oC-1. Refractive index n 1.360 Measured by Fresnel reflection 1.355 Slope: (-4.277 ± 0.080)x10-4 oC-1 1.350 1.345 1.340 20 30 40 50 60 Temperature T [oC] Figure S5. Refractive index of ethanol as a function of temperature as measured by the Fresnel reflection method. S7. Correction of thermo-optic coefficient after considering the influence of quartz cuvette (A) Thermo-optic coefficient of quartz From the Sellmeier equation in Eq. (3.29) of Ref. [S2], the TOC of optical materials is 2n dn GR HR 2 dT (S25) here n is the refractive index,dn/dT is the TOC,G and H are coefficients,the parameter R is defined as R 2 2 2g (S26) here is the wavelength,g denotes the wavelength that corresponds to the bandgap by the relationship g 1.24 E g , Eg is the bandgap in the unit of eV, and g in m. S10 Based on the data in pp. 136 of Ref. [S2], the parameters of quartz (-SiO2) at room temperature are listed in Table S1. According to Equation (S25), the TOCs at 1550 nm are calculated to be -5.598610-6 oC-1 and -6.774910-6 oC-1 for the ordinary ray and the extraordinary ray, respectively. On average, the TOC of quartz at room temperature and 1550 nm is dn/dT = -6.186710-6 oC-1. Table S1 Parameters for thermo-optic coefficient of quartz from Ref. [S2]. Ordinary ray Extraordinary ray Bandgap Eg (eV) 8.9 8.9 Refractive index n 1.515 1.520 G (oC-1) -61.1840 10-6 -70.1182 10-6 H (oC-1) 43.9990 10-6 49.2985 10-6 Lq Liquid n Optical beam nq Quartz sidewall of cuvette Liquid L Figure S6. Diagram of the optical beam passing through the quartz cuvette sidewalls and the liquid sample. (B) Correction to the TOC of liquid sample using the quartz’s TOC It can be seen from Figure S6 that the optical path length (OPL) of the beam passing through the quartz cuvette is given by OPL nL nq ( 2 Lq ) (S27) here n and L are the refractive index and the physical length of the liquid sample along the optical axis, respectively, nq is the refractive index of quartz,Lq is the thickness of quartz wall. Here the term 2Lq is to account for the two sidewalls of cuvette. When the quartz’s TOC is not considered, all the changes of OPL are attributed to the nominal refractive index change n of liquid sample, that is, S11 OPL nL (S28a) OPL nL 2nq Lq (S28b) From Equation (S27), it has Comparing Equations (S28a) and (S28b) yields n n 2 Lq nq (S29) dn dn 2 Lq dnq dT dT L dT (S30) L Therefore, the correction to the TOC is given by For the quartz cuvette used in experiment, it has L = 5.01 mm, Lq = 2 mm, and dnq/dT = -6.1867 10-6 oC-1. Then it has dn dn 2 2 6.1867 10 6 dT dT 5.01 dn 0.0494 10 4 dT (S31) here the term 0.0494 10-4 oC-1 is the correction term. For ethanol, the nominal TOC measured by the OSA method is dn 4.99 2.24 10 4 C-1 (see Supplementary section S5), after correction it dT becomes dn 4.94 2.24 10 4 C-1 . For the nominal TOC measured by the dT UFOFC method dn 4.377 0.009 10 4 C-1 , after correction it changes to dT dn 4.328 0.009 10 4 C-1 (see also Supplementary section S5). dT Reference: [S1] Shlyagin, M. G., Manuel, R. M. & Esteban, Ó. Optical-fiber self-referred refractometer based on Fresnel reflection at the fiber tip. Sens. Actuators B 178, 263–269 (2013). [S2] Ghosh, G. Handbook of Thermo – Optic Coefficients of Optical Materials with Applications (Academic, 1998). S12