{'fraction_non_alphanumeric': 0.03570027461749706, 'fraction_numerical': 0.018373218255525042, 'mean_word_length': 4.676192243458898, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Complex Attosecond Waveform Synthesis at FEL FERMI

Free-electron lasers (FELs) can produce radiation in the short wavelength range extending from the extreme ultraviolet (XUV) to the X-rays with a few to a few tens of femtoseconds pulse duration. These facilities have enabled significant breakthroughs in the field of atomic, molecular, and optical physics, implementing different schemes based on two-color photoionization mechanisms. In this article, we present the generation of attosecond pulse trains (APTs) at the seeded FEL FERMI using the beating of multiple phase-locked harmonics. We demonstrate the complex attosecond waveform shaping of the generated APTs, exploiting the ability to manipulate independently the amplitudes and the phases of the harmonics. The described generalized attosecond waveform synthesis technique with an arbitrary number of phase-locked harmonics will allow the generation of sub-100 as pulses with programmable electric fields.


Introduction
Electron dynamics on the atomic scale occurs on an attosecond time scale as dictated by quantum mechanics. Routinely, two-color photoionization schemes with XUV attosecond pulses obtained by high-order harmonic generation (HHG), driven by table-top laser sources, and a phase-locked near-infrared (NIR) dressing field are employed to investigate the dynamics with attosecond temporal resolution [1]. These experiments demand a subcycle synchronization between the XUV pump and the NIR dressing fields to probe the electron dynamics. The temporal characterization of the attosecond pulses used in the two-color schemes is a fundamental prerequisite for their application in pump-probe experiments. Attosecond pulse trains (APTs) and the isolated attosecond pulses generated in the HHG process are usually characterized using the reconstruction of attosecond bursts by the interference of two-photon transitions (RABBITT) and streaking techniques, respectively [2,3]. Often, both the RABBITT and streaking approaches, initially developed as characterization schemes, are utilized for investigating different processes such as photoionization dynamics in atoms and molecules [4,5]. However, a few limitations of the HHG process restrict their application. Apart from the very low conversion efficiency of the HHG process, the harmonics generated are hard to manipulate in phase, amplitude, and polarization, thus limiting the pulse-shaping capability [6,7].
Free-electron lasers (FELs) are sources of radiation spanning the XUV and X-ray spectral ranges, characterized by durations ranging from a few femtoseconds to tens of femtoseconds and by unprecedented peak intensities [8][9][10]. The advent of FELs led to the inception of schemes to determine the structural properties of single macromolecules exploiting the high number of photons interacting with the sample [11]. The ultrashort pulse duration of the radiation bursts, on the other hand, led to several experiments investigating time-resolved studies of various molecular dynamics [12][13][14][15]. However, performing two-color experiments at the FEL facilities presents the formidable challenge of actively controlling the delay stability between the XUV and the external laser fields. Presently, the delay jitter between the two colors at various FEL facilities is found to be much higher than that needed for attosecond time-resolved experiments [16,17].
Until recently, the generation of attosecond pulses at the FEL facilities has been restricted to theoretical schemes [18][19][20][21]. Only in 2020, isolated attosecond pulses were produced at the LCLS [22], and attosecond pulse train generation was observed at the FEL FERMI [23]. The methods employed for the experimental observation of the attosecond pulses at these facilities differ significantly. The attosecond pulses generated at the LCLS suffer from shot-to-shot fluctuating spectral properties, which corresponds to a varying temporal structure of the attosecond pulses. This is the result of the self-amplified spontaneous emission (SASE) process, which calls for a pulse characterization technique able to provide pulse characteristics on a single-shot basis. On the contrary, at FERMI, the seeding mechanism ensures that the spectral properties are reproducible from shot-to-shot, and a multishot technique can be implemented for the temporal characterization of the XUV radiation. Moreover, while the technique demonstrated at the LCLS closely follows the attosecond streaking approach adopted for the characterization of isolated attosecond pulses, the method demonstrated at FERMI was inspired by the RABBITT technique used in the attosecond community for the characterization of attosecond pulse trains.
In this article, we present the generation of APTs and their shaping at the FEL FERMI using the beating of multiple phase-locked harmonics, which is similar to the scheme proposed to generate subfemtosecond waveforms using multiple table-top lasers [24]. In particular, we describe the complex waveform synthesis using a harmonic comb containing three and four harmonics. The method described allows the generation of attosecond pulses with energies as high as tens of microjoules and with pulse durations as short as tens to hundreds of attoseconds.
The contents of the article are as follows: In Section 2, the experimental setup used to generate the harmonic comb is discussed. Section 3 describes the construction of the correlation plots and their evolution in a phase scan to extract the phases required for attosecond pulse reconstruction. The reconstruction of the attosecond pulses and complex wave shaping is demonstrated in Section 4, providing an analytic form of the intensity profile for an attosecond waveform using an arbitrary number of harmonics in the harmonic comb (Section 5).

Experimental Setup
FERMI is a seeded FEL, where the harmonics of an ultraviolet seed laser of frequency ω UV are produced using the high-gain harmonic generation (HGHG) scheme [10]. The seed laser itself is created by frequency tripling the pulses from an NIR laser of central frequency ω NIR (ω UV = 3ω NIR ). The harmonics generated using the technique of HGHG are phase-locked to the seed laser and possess very stable spectral properties on a shotto-shot basis and a high degree of coherence, both transverse and longitudinal [10,25]. FERMI is equipped with six undulators (U i , i = 1 − 6); a phase shifter (PS i , i = 1 − 5) is situated between each pair of consecutive undulators. Each PS is a magnetic chicane used to match the phase between the radiation emitted by the undulators upstream and downstream of it by delaying the electron bunch. The harmonics are focused in the experimental chamber using a Kirkpatrick-Baez (KB) mirror setup. The NIR and the XUV are propagated collinearly using a drilled mirror, and are recombined after the KB mirror setup. A detailed experimental scheme has been presented elsewhere [23,26].
Our study used a harmonic comb consisting of either three (H 7 , H 8 , and H 9 ) or four (H 7 , H 8 , H 9 , and H 10 ) harmonics, where H q is the qth harmonic of the seed laser. The undulator configuration for generating three and four harmonics is shown in Sections 3 and 4. In the three-harmonic case, each harmonic is generated using two adjacent undulators with the phase difference between the generated harmonics controlled using the phase shifter PS 2 or PS 4 . In the four-harmonic case, each undulator generated a harmonic, and the last two undulators were left open, not generating any radiation. For the phase manipulation, phase shifters PS 2 and PS 3 were utilized. The RABBITT scheme generally used to characterize the APTs cannot be directly implemented at FERMI due to a delay jitter of ±3 fs between the XUV and NIR fields that is much higher than that required to observe the sideband oscillations [16]. As the delay randomly varies on a shot-to-shot basis, a method independent of the delay stability between the XUV and the NIR fields is required.

Sidebands and Their Correlation Analysis
In the experiment, reconstruction of the generated APTs was accomplished using the technique of correlation-based reconstruction of attosecond pulses (CoBRA) inspired by the RABBITT scheme. For the implementation, neon was used as the target gas for the twocolor photoionization scheme. A significant difference between the RABBITT and CoBRA schemes is the number of sidebands between consecutive harmonics. In our scheme, due to the frequency relation between the seed laser and the NIR laser, between each pair of consecutive harmonics, two sidebands were found, whose intensities are given by: where ϕ q is the phase of harmonic H q , τ is the delay between the APT and the NIR fields, q,q+1 are coefficients depending on the photoelectron energy and the intensity of the two harmonics and of the NIR field, while + (−) corresponds to the sideband with higher (lower) energy. Each sideband (S (±) q,q+1 ) is a result of the interference of two pathways, each resulting from the ionization by the harmonic H q (H q+1 ) and absorption (emission) of a different number of NIR photons. As a result of the different number of exchanged photons reaching a particular sideband (S (±) q,q+1 ), the final states reached via the two pathways present the same final energy, but a different parity. The interference between the two pathways, therefore, does not lead to a variation of the total intensity of the sidebands when the relative phase between the two paths is changed (as in the RABBITT case), but to an asymmetric emission of the sideband photoelectrons. The strong-field approximation (SFA) [27] on which Equation (1) is derived, confirms a complete cancellation of the oscillations of the sideband intensities if the signals are integrated over the total solid angle of 4π sr. In the experiment, the photoelectron spectra were acquired by a magnetic bottle electron spectrometer (MBES) configured to collect the photoelectrons in 2π sr. This detection configuration allows one to observe oscillations of the sideband intensities upon changing the relative phase of the two pathways (i.e., upon changing the relative delay between the XUV and NIR fields). From the definition of the intensity of the sidebands, an oscillating component of the sidebands (P q,q+1 ) is constructed, using the definition: where α q,q+1 is a coefficient obtained with the approximations a q,q+1 ). In the correlation plots, we use the oscillating component of the sidebands to visually represent the different degree of correlation between the sidebands.

Evolution of the Correlation Plots
The amplitudes and phases of the harmonics H q−1 , H q , and H q+1 are needed to reconstruct the APTs. The correlation plot of the oscillating components (P q−1,q , P q,q+1 ) is constructed using the single-shot intensities to extract the phase differences. The amplitudes are extracted from the photoelectron spectra acquired in the absence of the NIR dressing field. The correlation between two random variables refers to how the two signals behave with respect to each other. Using Equation (2), it can be easily seen that the analytical form of the correlation plot of the oscillating components P q−1,q and P q,q+1 describes an ellipse aligned at an angle to the P q−1,q axis, with the length of the major and minor axes depending on the phase difference ∆ϕ q−1,q,q+1 , defined as: where ϕ q,q+1 is the relative phase between the harmonics H q+1 and H q . The overall shape of the ellipse varies as the phase difference ∆ϕ q−1,q,q+1 is changed. When ∆ϕ q−1,q,q+1 approaches zero, the ellipse collapses to a straight line aligned at an angle tan(β) = P q,q+1 P q−1,q , and at ∆ϕ q−1,q,q+1 ≈ π, the ellipse collapses to a straight line aligned at an angle tan(β) = − P q,q+1 P q−1,q . The correlation distribution is periodic as a function of ∆ϕ q−1,q,q+1 with periodicity 2π, implying the generation of the same correlation distribution by increasing or decreasing the phase by 2π. Therefore, from the shape of the correlation distribution of the oscillating components, the phase difference ∆ϕ q−1,q,q+1 can be extracted. By definition, ∆ϕ q−1,q,q+1 is proportional to the group-delay dispersion (GDD) of the harmonic spectrum.
The shape of the correlation distribution is a good indicator of a phase difference, but only qualitatively. To quantitatively understand the variation of the phase difference, the so-called correlation coefficient is introduced. The method of associating the correlation coefficient with the shape of the correlation plots and phase difference extraction was presented in [23,26].
In Figure 1, the undulator configuration to generate a harmonic comb with three harmonics is presented. In the CoBRA scheme, the phase difference ∆ϕ 7,8,9 is extracted using the evolution of the correlation distributions of the oscillating components. The evolution is achieved by varying the phase difference between the harmonics using either the phase shifter PS 2 or PS 4 (shown in red). The variation in the phase difference ∆ϕ 7,8,9 by the delay introduced by the two phase shifters is given by: Figure 1. Undulator configuration for the three harmonics' generation. Each harmonic is generated using a pair of undulators. The harmonics H 9 , H 8 , and H 7 are generated by the undulators U 1 and U 2 , U 3 and U 4 , and U 5 and U 6 , respectively. The phase shifters used to conduct a phase scan are indicated in red.
q is the initial phase of the harmonic H q and τ si is the delay introduced by the phase shifter PS i . The evolution of the shape of the correlation distribution of the oscillating components P 7,8 and P 8,9 as a function of the delay introduced by phase shifter PS 4 for a fixed phase shifter PS 2 (τ * s2 ) is shown in Figure 2. A noticeable change in shape can be observed in the different panels.
A delay of 13.76 as was added in each step. Assuming a phase difference ∆ϕ (a) 7, 8,9 attributed to Panel a , the addition of nine delay steps results in the shape of the correlation distribution in Panel j. The total delay accounts for 123.84 as, corresponding to a phase change of 6.21 rad ≈ 2π, making the phase difference ∆ϕ 7,8,9 = ∆ϕ (a) 7,8,9 -6.21 rad (from Equation (4)). As a consequence, Panels a and j present a very similar distribution. Similarly, the evolution of the distribution from Panels a (f) to e (j) suggests a change in phase of ≈π rad. This is consistent with the observation that the phase difference between the two panels is 2.76 rad. The exact value of ∆ϕ (a) 7,8,9 can be extracted from the calibration of the evolution of the correlation coefficient as a function of the delay introduced. The evolution of the correlation plots follows the pattern and periodicity as expected; however, it is important to establish that the phase scan did not affect the amplitudes of the individual harmonics. In Figure 3a, the energy spectrum of the harmonics is presented for different phases in a phase scan without the NIR dressing field. Panels b-d display the distribution of the shot-to-shot amplitudes of the individual harmonics for a fixed delay of PS 2 and PS 4 . The amplitudes are evaluated as the square root of the area under the corresponding peaks. For the reconstruction, it is sufficient to consider the relative amplitudes of the harmonics, and hence, we normalized the distributions of the harmonics with the mean value of the H 8 amplitude. The mean (µ) and the standard deviation (σ) of the harmonic amplitudes are displayed in the panels showing the distribution of the harmonics H 9 (b), H 8 (c), and H 7 (d). The evolution of the correlation plots in a phase scan and a negligible effect of phase variation on the harmonic amplitudes suggest the possibility of a more advanced complex attosecond waveform synthesis.

Attosecond Pulse Trains with Four Harmonics
The undulator configuration for generating a harmonic comb with four harmonics is shown in Figure 4. Undulator configuration for the four harmonics' generation. Each harmonic is generated using one undulator. H 10 is generated by the undulator U 1 ; H 9 is generated by the undulator U 2 ; H 8 is generated by the undulator U 3 ; H 7 is generated by the undulator U 4 . The phase shifters used to conduct a phase scan are indicated in red.
Each harmonic is generated in one undulator, and the last two undulators are not used for harmonic generation (shown in grey). In the configuration presented, phase scans were carried out with either PS 2 or PS 3 (indicated in red). The presence of four harmonics requires the analysis of two pairs of the correlation plots: (P 7,8 , P 8,9 ) and (P 8,9 , P 9,10 ). As a consequence, two phase differences ∆ϕ 7,8,9 and ∆ϕ 8,9,10 are available for manipulation, each of them affected in a different way by the delays introduced by the phase shifters PS 2 and PS 3 . The variation of the phase difference terms ∆ϕ 7,8,9 and ∆ϕ 8,9,10 as a function of the delay introduced is given by: ∆ϕ 8,9,10 is dependent only on the delay introduced by the phase shifter PS 2 and independent of the phase shifter PS 3 , and ∆ϕ 7,8,9 varies as either of the phase shifters PS 2 or PS 3 is changed. Hence, using the phase shifter PS 2 will affect both the phase difference terms ∆ϕ 7,8,9 and ∆ϕ 8,9,10 . The variation corresponds to an evolution of the correlation plots of the oscillating components pair (P 7,8 , P 8,9 ) and (P 8,9 , P 9,10 ). In Sections 4.1 and 4.2, the evolution of the correlation plots along with the reconstructed attosecond pulse trains for the case of a phase scan with PS 2 and PS 3 are presented.

Complex Waveform Synthesis Using the Phase Shifter PS 2
A phase scan was conducted by introducing the delay using the phase shifter PS 2 . The evolution of the oscillating components (P 7,8 , P 8,9 ) and (P 8,9 , P 9,10 ) are presented in Figure 5. A delay of 31.45 as was introduced between one panel and the next. The delay 31.45 as corresponds to a phase increment of 2.02 rad for ∆ϕ 7,8,9 and a phase decrement of 1.80 rad for ∆ϕ 8,9,10 . The periodicity of correlation distributions (P 7,8 , P 8,9 ), (P 8,9 , P 9,10 ) based on ∆ϕ 7,8,9 , ∆ϕ 8,9,10 can be easily established from the evolution of the correlation plots. Considering the evolution of the correlation plot of (P 8,9 , P 9,10 ) from Panels a to d, the total phase variation corresponds to a value 5.40 rad, which is close to 2π, and hence, the corresponding distributions are very similar. Similarly, for the evolution of the correlation plot of (P 7,8 , P 8,9 ) from Panels j (k) to m (n), the total phase added is equal to 6.06 rad, reproducing a correlation plot in close similarity to Panel j (k). The phase differences ∆ϕ 7,8,9 and ∆ϕ 8,9,10 were obtained following the method described in [23,26]. From the amplitudes of the harmonics (F q ) obtained from the photoelectron spectra in the absence of the dressing NIR field, the intensity profile of the attosecond pulse trains is calculated using the equation: where F q , f (t) are the amplitude and envelope of the harmonic H q . Phase χ (=(ϕ 10 − ϕ 7 )/3) introduces a temporal shift of the intensity profile of the attosecond waveforms with respect to the envelope of the single harmonic and does not affect the shape of the individual attosecond pulses within the pulse train. Reconstructed attosecond pulses corresponding to Figure 5 are displayed in Figure 6. The pulse duration ( f (t)) for each harmonic is considered equal and taken to be 50 fs FWHM [28]. From the equation, the shortest attosecond pulses result when both the phase difference terms ∆ϕ 7,8,9 and ∆ϕ 8,9,10 are ≈0. Panel d displays the shortest attosecond pulses with a pulse duration of 216 ± 7 as FWHM with the error in the pulse duration calculated from the error in the extracted phase differences and the obtained amplitudes of the harmonics. As expected from the equation of the intensity profile, the shortest waveforms (Figure 6d) result when the correlation plots of the oscillating components present a correlation distribution close to a straight line with a positive slope. When the distribution of both the correlation plots presents a nearly straight line inclined at a negative slope, a double structure is observed in the attosecond waveform (Figure 6c,f). The values of the phase differences and the harmonic amplitudes used for the reconstruction are provided in Table A1 of Appendix A.

Complex Waveform Synthesis Using the Phase Shifter PS 3
A phase scan conducted using the phase shifter PS 3 has an immediate effect, and as the phase altered does not affect the phase difference ∆ϕ 8,9,10 , the correlations plots of the oscillating components (P 8,9 , P 9,10 ) should not show any change as a function of phase. However, the phase difference ∆ϕ 7,8,9 varies, and hence, the evolution of the correlation plots of the oscillating components (P 7,8 , P 8,9 ) is expected.
In Figure 7, the correlation plots of the two pairs of oscillating components corresponding to different phase difference values are displayed. Panels a-g (i-n) show the evolution of the correlation distribution of the oscillating components P 8,9 and P 9,10 (P 7,8 and P 8,9 ). The phase scan was carried out at a fixed PS 2 value corresponding to Figure 5d. The delay τ s3 introduced in each step was 31.45 as, corresponding to a reduction of 1.57 rad in each step. The correlation plots of the oscillating components (P 8,9 , P 9,10 ) do not show a variation in the correlation distribution as the delay τ s3 is varied. An addition of four delay steps corresponds to a reduction of 6.28 rad in ∆ϕ 7,8,9 . From Panels h-n, a periodic repetition of the correlation distribution for every four panels can be observed. These results demonstrate the possibility to selectively manipulate the phase difference ∆ϕ 7,8,9 in waveform shaping. The power of attosecond waveform synthesis to vary the phase of the harmonics of the harmonic comb independently allows the investigation of different dynamics dependent on the phase of the input radiation. (a-g) Evolution of the correlation plots of the oscillating components of the sidebands (P 8,9 , P 9,10 ) for increasing values of the delay τ s3 introduced by the phase shifter PS 3 . (h-n) Evolution of the correlation plots of the oscillating components of the sidebands (P 7,8 , P 8,9 ) for increasing values of the delay τ s3 introduced by the phase shifter PS 3 . The delay τ s3 introduced by the phase shifter PS 3 affects only the phase of the harmonic H 7 , resulting in fixed correlation plots of (P 8,9 , P 9,10 ) (a-g). The color scale indicates the density of single-shot experimental points normalized to unity for each panel. Figure 8 presents the reconstructed attosecond waveforms for the different values of ∆ϕ 7,8,9 as the delay τ s3 is varied. The shortest attosecond waveform is produced when the phase difference ∆ϕ 7,8,9 ≈ 0, corresponding to a correlation distribution of (P 7,8 , P 8,9 ) close to a straight line. The reconstructed waveform displayed in Figure 8b presenting the shortest pulse duration of 210 ± 5 as corresponds to the correlation plots presented in Panels b,i of Figure 7. An attosecond waveform with double or multiple peaks results when ∆ϕ 7,8,9 ≈ π, producing a distribution close to a straight line with a negative slope. The correlation plots in Figure 7d,k and the reconstructed waveform in Figure 8d represent such a scenario. Moreover, the variation of ∆ϕ 7,8,9 demonstrates the generation of waveforms that differ significantly from one another. The values of the phase differences and the harmonic amplitudes used for the reconstruction are provided in Table A2 of Appendix A.

Attosecond Pulse Shaping with an Arbitrary Number N of Phase-Locked Harmonics
In the previous sections, attosecond waveform synthesis with three and four harmonics was presented. A generalized scheme to produce attosecond waveforms with a harmonic comb containing N phase-locked harmonics is described in this section. The results from the phase scan in the four-harmonic case confirm the action of the phase shifter on the radiation. Significantly, phase shifters only alter the radiation that is generated in the undulators downstream of themselves. Consider an undulator chain consisting of N undulators and a phase shifter in between each pair of consecutive undulators. The arrangement will have N − 1 phase shifters, each affecting the phase of the radiation generated in the undulators downstream, if each undulator (U i ) is used to generate a harmonic (H i ) of the seed laser. A phase shifter PS k , placed after the undulator U k , will affect the phases of all the harmonics H k+1 to H N . The phase of each harmonic and the phase difference ∆ϕ k,k+1,k+2 are given by: where τ k is the delay introduced by the phase shifter PS k . The phase difference ∆ϕ k,k+1,k+2 is only affected by the phase shifters PS k and PS k+1 . In the general case of N harmon-ics, the reconstruction of the attosecond pulse train requires the N − 2 phase difference terms (∆ϕ i,i+1,i+2 , i = 1 to (N − 2)) and amplitudes of N harmonics. The difference between Equations (5) and (7) showing an opposite effect of the delays introduced by the phase shifters is due to the choice of the sequence of harmonics generated in the undulator chain. In the present discussion of a harmonic comb containing "N" harmonics, the first undulator generates the lowest harmonic, and the subsequent undulators downstream generate harmonics with increasing order with the last undulator generating the highest harmonic. In the four-harmonic case presented in Section 4, the highest harmonic was generated in the first undulator, and the subsequent undulators downstream generated harmonics with decreasing harmonic order.
In order to generate a waveform of interest, let us say the shortest attosecond waveform, the phase scans must be performed to obtain the correlation distribution close to a straight line with a positive slope for all the (N − 2) pairs of oscillating components. Once a set of three harmonics H k , H k+1 , and H k+2 is optimized to obtain the desired correlation distribution of the oscillating components (P k,k+1 , P k+1,k+2 ) using PS k or PS k+1 , neither of the two phase shifters should be used for the optimization of another set of three harmonics. For instance, if harmonics H k+1 , H k+2 , and H k+3 (H k−1 , H k , and H k+1 ) are to be optimized to obtain a phase difference ∆ϕ k+1,k+2,k+3 (∆ϕ k−1,k,k+1 ) after the optimization of H k , H k+1 , and H k+2 , the phase shifter PS k+2 (PS k−1 ) must be used and not PS k+1 (PS k ). A particular sequence does not need to be followed in optimizing each set of the three harmonics.
The phase difference ∆ϕ i,i+1,i+2 (i = 1 to (N − 2)) terms and the amplitudes of the harmonics measured in the absence of the NIR field can be implemented to reconstruct the attosecond waveforms using the following equation: where: here ϕ l = ∆ϕ l,l+1,l+2 . Equation (9) can be implemented in the reconstruction of waveforms in the experiments where only phases proportional to the GDD are accessible.
The experiment showed that one can successfully operate with four consecutive harmonics. Increasing this number to six is possible at FERMI in terms of hardware, and it will be investigated in future beam times. In experiments with a harmonic comb with six harmonics, the maximum energy acceptance of the time-of-flight spectrometer and its energy resolution should be considered. In order to overcome this limitation, time-offlight spectra with good energy resolution in different energy ranges could be acquired sequentially, and the relative phases between groups of three consecutive harmonics could then be retrieved; for instance, if harmonics H i (i = 7 − 12) are generated, initially, the spectrometer can be optimized to collect the photoelectrons generated by harmonics H 7 , H 8 , H 9 , and H 10 . Implementing the CoBRA technique, phase differences ϕ i (i = 7, 8) can be obtained. Subsequently, the spectrometer can be optimized to collect photoelectrons ionized by harmonics H 9 , H 10 , H 11 , and H 12 and follow the same procedure to calibrate the phase differences. From the two sets of acquisitions, attosecond waveforms can be reconstructed. A shortest attosecond pulse of ≈ 130 as FWHM was estimated from our simulations based on SFA with a seed laser of wavelength 264 nm.
Another important aspect is the temporal separation between the individual pulses in the pulse train. The time separation between individual attosecond pulses in the train is related to the energy separation between two consecutive harmonics. Changing the seed laser wavelength in the presently available range for the seed (230 nm-360 nm) at FERMI would allow changing the time separation in the range between 0.7 fs and 1.2 fs. A shorter separation can be achieved by setting the undulators of the FEL to alternate harmonics (e.g., q = 6, 8, 10). While not yet possible at FERMI, spike separations up to tens of femtoseconds are technically attainable by seeding at a much longer wavelength. The seed laser used in the experiment (264 nm) reflected a pulse separation of ≈880 as.

Conclusions
We demonstrated attosecond waveform synthesis using the phase-locked harmonic combs containing three and four harmonics at seeded FEL FERMI. The characterization of the generated attosecond waveforms using the technique of CoBRA confirmed the complex waveform shaping, producing attosecond pulses with a pulse duration as short as 210 ± 5 as. The described pulse-shaping scheme with an arbitrary number N of harmonics permits the generation of pulses of sub-100 as duration. Indeed, the results reported here could promote a positive decision concerning the future upgrades of FEL facilities in this direction and possibly lead to a revision of the layout towards an optimized setup that could better fit the needs of an attosecond pulse waveform control. Furthermore, the intensities offered at FERMI, along with the described attosecond pulse synthesis, promote the development of schemes to perform nonlinear XUV experiments with subfemtosecond temporal resolution. Data Availability Statement: Data supporting the results of this work can be obtained from the corresponding author upon reasonable request.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; nor in the decision to publish the results.