Optical frequency combs have had a remarkable impact on precision spectroscopy [1][2][3] . Enabling this technology in the x-ray domain is expected to result in wide-ranging applications, such as stringent tests of astrophysical models and quantum electrodynamics 4 , a more sensitive search for the variability of fundamental constants 5 , and precision studies of nuclear structure 6 . Ultraprecise xray atomic clocks may also be envisaged 7 . In this work, an x-ray pulse-shaping method is put forward to generate a comb in the absorption spectrum of an ultrashort high-frequency pulse. The method employs an opticalfrequency-comb laser, manipulating the system's dipole response to imprint a comb on an excited transition with a high photon energy. The described scheme provides higher comb frequencies and requires lower optical-comb peak intensities than currently explored methods [8][9][10] , preserves the overall width of the optical comb, and may be implemented by presently available x-ray technology 11 .The spectrum of an optical frequency comb consists of equally spaced, precisely known peaks, centred at an optical frequency . X-ray frequency combs would enable the aforementioned applications in the x-ray range. Stringent tests of fundamental physics may be pursued, e.g., accurate measurements of transition energies in highly charged ions, which are predicted to be more sensitive to the variability of fundamental constants 5 than currently investigated species. Presently, XUV combs (∼ 30 eV) are generated 10 via intracavity high-order harmonic generation (HHG) 8,9 . A femtosecond enhancement cavity is utilized to reach the required peak intensities [8][9][10] , up to ∼ 10 14 W/cm 2 . However, relativistic effects limit the efficiency of HHG at high harmonic orders
20. The investigation of schemes to further increase the carrier frequency of the comb at accessible driving intensities is therefore required.Short-wavelength light sources with improved brilliance and bandwidth 11 enable studies of x-ray quantum optics, e.g., in highly charged ions or nuclei 4,6,21 . Recently, an amplitude-shaping scheme was put forward to imprint a comb onto narrowband x rays
22. Comb generation was also suggested 23 via quantum phase modulation
24. However, these schemes are conditioned either by demanding requirements on the x-ray source Figure 1. Three-level scheme used to describe the interaction between the model system and the driving fields. (a) A low-density ensemble of ions, modelled as a three-level system, is driven by an ultrashort, broadband x-ray pulse (X1, solid, blue), exciting the fast decaying level 2, followed by an optical pulse (L1, dashed, red) coupling this excited state to the metastable state 3. Thereby the system is prepared in an initial state which is a superposition of states 1 and 3. (b) An optical frequency comb (L2, solid, red) is subsequently used to periodically drive the optical transition 2 ↔ 3. The emitted x rays (Xout, dashed, wavy, blue) lead to either gain or attenuation of the incident pulse X...