## 2 Experimental Section  
The control technique basically includes a variable intensity attenuator, a variable delay line and a spectrum analyzer, which are managed by a computer. The experimental realization is limited by the existence of the optical elements at the different bandwidths and photon energies that are of interest. In this respect, the present work attempts to demonstrate the feasibility of the control method by analyzing different significant examples, since the observed effect cannot be addressed in general due to the intrinsic characteristics of a coherent control tool based on feedback loop schemes. Otherwise, the observed results are based on a conceptually clear physical mechanism. The manipulation of the spectral amplitude/phase of the harmonics is based on the coherent combination of several harmonic generation zones with appropriate delays in between and with optimal intensities, such that the resulting spectral amplitude/phase is modified in a broad spectral region, or equivalently, the addition of a weak filtered region of the emitted spectrum to the IR intense driving pulse produces a small reshape of the IR field that conveniently modifies the amplitude and phase of the electron quantum trajectories generating the different photon energies in the HHG process. As schematically illustrated in Figure 1, a 5 fs laser pulse with Gaussian temporal profile, carrier-envelope phase CEP = 0\({}^{\circ}\), central wavelength of 800 nm and peak intensity of \(2\times 10^{14}\) W/cm\({}^{2}\) interacts with a gas medium-helium in the present simulations (ionization potential 24.59 eV), producing high-order harmonics with a photon energy cutoff at \(\approx 70\) eV. In the present study, the considered feedback loop scheme evolves as follows: a first spectral filter selects the desired bandwidth of the generated radiation in the XUV region that is to be optimized. The energy of this XUV\({}_{1}\) pulse is modified by a variable light attenuator (A\({}_{1}\)) that scans for optimal intensities, and then it passes through a variable delay line (D\({}_{1}\)) that scans for the position with respect to the IR pulse where the XUV\({}_{1}\) pulse is to be added. Coherently combined, the resulting IR + XUV\({}_{1}\) pulse is then sent to a second helium gas target that produces a second high-order harmonics signal. The output from the second gas target is filtered to select the same bandwidth as in the first interaction region, and the spectral amplitude of this last generated XUV pulse is reconstructed by using a spectrum analyzer. The information of the spectrum is then examined by a numerical algorithm that performs a linear regression from the data of the spectral amplitude versus photon energy and calculates its normalized chi-square (\(\chi^{2}\)) function, such that the _flatest_ spectral amplitude can be selected. Hence, the problem of fitting a set of \(N\) data points (\(x_{i}\), \(y_{i}\)) to a straight-line model \(y=a+bx\) is considered, and the \(\chi^{2}\) function is used to measure how well the model agrees with the data. The \(\chi^{2}\) function is defined here as  
\[\chi^{2}(a,b) = \sum_{i=1}^{N}(y_{i}-a-bx_{i})^{2} \tag{1}\]  
The distance from each data point to the straight-line model is minimized by varying the parameters \(a\) and \(b\) in the sum of the squared distances between the data points and the estimate obtained from the function \(y(x)\), which is often called a least squares fit [28]. If the straight-line passes through all the data points, the \(\chi^{2}\) function will obviously be zero and the fit is perfect. Due to the evident deviations of the spectral amplitude shape from the straight line this will not happen, and the numerical algorithm will thus find the parameters \(a\) and \(b\) that minimize \(\chi^{2}\).