### Sample information

The cryogenic microwave pulse generator is constructed with a *λ*/2 coplanar waveguide (CPW) resonator and a superconducting quantum interference device (SQUID) embedded in the center conductor and placed at the electric field node of the fundamental mode. The room temperature junction resistances used in the experiment range from 50Ω to 270Ω, effectively corresponding to about 58 pH to 310 pH at the zero flux point, which occupies about 3.1–11.6% of the total inductance of the SQUID-embedded resonators. The Inset of Supplementary Fig. 6 shows a photomicrograph of a typical cryogenic coherent microwave photon source used in the experiment.

The SQUID consists of two parallel Josephson junctions and functions as a tunable inductor \({L}_{j}({\Phi }_{ext})={\Phi }_{0}/[2\pi {I}_{c}\cos (\pi {\Phi }_{ext}/{\Phi }_{0})]\) for the symmetric junctions case, where *I*_{c} is the critical current of the junction and Φ_{0} = *h*/2*e* is the flux quantum. The inductance *L*_{j}(Φ_{ext}) can be controlled by the magnetic flux Φ_{ext} through the SQUID loop generated by the electrical current on the nearby flux line. The total inductance of the SQUID-embedded resonator comprises both the inductance of the CPW resonator *L*_{r} and the flux-dependent SQUID inductance *L*_{j}(Φ_{ext}). Consequently, the relation between the resonance frequency of the fundamental mode *ω* and the loop flux Φ_{ext} can be determined as

$$\omega=\sqrt{\frac{1}{({L}_{r}+{L}_{j}({\Phi }_{ext})){C}_{r}}}$$

(1)

where *C*_{r} is the capacitance of the CPW resonator and the capacitance of SQUID is small enough to be neglected. Eq. (1) is used to fit the experimental result shown in Fig. 2b.

The qubit sample used for the readout experiment is implemented with a 3D circuit quantum electrodynamics architecture. A superconducting transmon qubit is patterned on a 7 mm × 7 mm sapphire substrate with standard micro-fabrication techniques. The Josephson junction of the qubit is fabricated with electron-beam lithography and double-angle evaporation of aluminum. The qubit chip is placed in and dispersively coupled to a 3D aluminum resonator. Detailed parameters of the qubit device can be found in Supplementary Table 1.

### Experimental setup

The measurement setup is schematically shown in Supplementary Fig. 6.

The flux step or overshoot used to drive the pulse generator is generated with an arbitrary waveform generator (AWG) with a 1 GHz sampling rate, and delivered through either coaxial cables or superconducting twisted-pair wires to the signal source located at the 10 mK region. The output of the cryogenic microwave source is successively amplified by a high-electron-mobility transistor (HEMT) amplifier at 4-K plate and two microwave amplifiers at room temperature. A spectrum analyzer is used to characterize the spectra and linewidth of the CW output from the cryogenic signal source. A homemade homodyne setup is used to analyze the in-phase and quadrature components of the output signal, thus extracting the amplitude and phase of the corresponding output. In the homodyne setup, a commercial microwave signal source is used as a local oscillator (LO) to down-convert the amplified gigahertz signals to tens of megahertz signals, which are later amplified by a voltage amplifier and acquired by an analog-to-digital converter (ADC) with a 1GHz sampling rate. It is worth noting that the repetition rate for the data acquisition is carefully chosen to make sure the phase of the LO signal is the same in every single trial of the experiments.

In the qubit readout experiment, the microwave pulses used for qubit control and conventional readout are prepared and delivered to the qubit sample with the conventional method. To be specified, the microwave pulses are synthesized by modulating the continuous-wave (CW) gigahertz carrier signal from a commercial signal generator with a megahertz signal from an AWG, which is used to control the amplitude and phase of the microwave pulses. The synthesized microwave pulses are sent to the qubit sample through coaxial cables with proper attenuation and filtering to suppress possible noises. When measuring with the cryogenic microwave source, the output of the signal source is directed to the transmon qubit sample. To determine the qubit state, the reflected signal from the qubit readout resonator is sent to the amplifier chain started with a Josephson parametric amplifier. The amplified signal is analyzed with the homodyne setup.

### Generation of microwave frequency comb

As mentioned in the main text, with a train of flux overshoots as a drive, microwave pulses with the same initial phase can be superimposed to generate CW microwave signals. To understand the spectral information of the CW signal, we take a simplified model by directly adding the truncated ideal time series of the microwave pulses as

$$f(t)=A{e}^{-\frac{\gamma }{2}\left(t-n{\delta }_{t}\right)}\sin \left({\omega }_{e}(t-n{\delta }_{t})\right),\, n{\delta }_{t} \, < \, t \, < \, \left(n+1\right){\delta }_{t}$$

(2)

where *n* takes all integers. *δ*_{t} is the time interval between the repetitive flux overshoots. *ω*_{e}, *A* and *γ* are the frequency, amplitude, and decay time constant of the microwave pulses, respectively. The ideal periodic function can be expanded into Fourier series \(f(t)=\mathop{\sum }_{n=-\infty }^{n=+ \infty }{c}_{n}{e}^{in\delta \omega t}\), which is a frequency comb centered at *ω*_{e}. The expansion coefficient can be derived as

$${c}_{n}=\frac{A}{{\delta }_{t}}\frac{{\omega }_{e}+{e}^{-\Gamma {\delta }_{t}}\left(i{\omega }_{e}\cos \left({\omega }_{e}{\delta }_{t}\right)-\Gamma \sin \left({\omega }_{e}{\delta }_{t}\right)\right)}{{\Gamma }^{2}+{\omega }_{e}^{2}}$$

(3)

where *δ**ω* = 2*π*/*δ*_{t} is the spacing of the frequency comb, \(\Gamma=\left(\frac{\gamma }{2}+in\delta \omega \right)\). It explains the results shown in Fig. 3d that the comb spacing is inversely proportional to the time interval *δ*_{t}.

To have a single-color microwave emission at *ω*_{e}, or to maximize the suppression ratio between the principal maximum and the sidebands, the time interval *δ*_{t} is set to an integer multiple of the microwave signal period to meet \({\omega }_{e}\times {\delta }_{t}=2{n}^{{\prime} }\pi\), where \({n}^{{\prime} }\) is an integer. In this situation the the endpoint of the last pulse can in principle match the starting point of the following pulse, and the expansion coefficient can be simplified as

$${c}_{n}=\frac{A}{{\delta }_{t}}\frac{{\omega }_{e}+i{\omega }_{e}{e}^{-\Gamma {\delta }_{t}}}{{\Gamma }^{2}+{\omega }_{e}^{2}}$$

(4)

One can find that the strengths of the sideband components are determined by both the time interval *δ*_{t} and the time constant *γ* of the exponential envelope. In the experiment, we achieve a sideband suppression ratio of about 24.8 dB for *ω*_{e}/2*π* = 6.5401 GHz with 1 ns time resolution of the AWG. This can be further improved by applying flux overshoots with better time resolution and using signal sources with smaller *γ*.

### Linewidth estimation for the CW signal

The CW microwave signal generated by the cryogenic source is analyzed with a spectrum analyzer (R&S FSV3030) to learn the spectrum information. As shown in Supplementary Fig. 6, the output signal is amplified by the amplifier chain and sent to the spectrum analyzer, which is set to the minimum resolution bandwidth (RBW) of 1 Hz. The power spectrum density of the CW signal centered at its principal maximum is shown in Supplementary Fig. 9. The measured data manifests a Voigt line shape, which is dominated by a Gaussian function with a full width at half maximum of ~0.93 Hz. This Gaussian function of about 1 Hz bandwidth is introduced by the limited resolution of the spectrum analyzer. Since a Gaussian-like filter is used to analyze the input signal, the measured power spectrum density is a convolution of the intrinsic spectrum of the input signal and the Gaussian filter. It means that the linewidth of the input signal can not be clearly distinguished below the minimum RBW of the given setup. The Voigt line shape of the measured data indicates the intrinsic linewidth of the CW signal is much narrower than the minimum RBW of 1 Hz. We can estimate a bound on the linewidth of the CW signal from the measured data.

Assuming the CW signal has a Lorentzian line shape with a certain full width at half maximum (FWHM), the convolution of a Gaussian function and Lorentzian function gives a standard Voigt line shape, which features wing-like upward tilts on both sides of the center frequency. These tilts are determined by the FWHM of the Lorentzian. The narrower (broader) Lorentzian results in a farther (closer) inflection point from the center frequency accompanied by a lower (higher) power. According to the position of the inflection point, we can extrapolate the bound of the signal linewidth below the minimum RBW 1 Hz of the spectrum analyzer by varying the FWHM of the Lorentzian component of the convolution. The tilts of the experimental data are located in between the 2 mHz case and the 0.5 mHz case, and the inflection point is slightly below the 0.5 mHz case. The result indicates the linewidth of the CW signal is on the order of 1mHz. Notably, The wing regions of the experimental data are different from an ideal Voigt lineshape, which is attributed to the non-ideal Gaussian filter in the spectrum analyzer.

### Qubit state readout with the cryogenic microwave source

The experimental setup to measure the qubit state with the cryogenic microwave source is illustrated in Supplementary Fig. 6. The transmon qubit consists of a single Josephson junction shunted by a capacitor, which is dispersively coupled to a 3D microwave resonator used for qubit state readout. Detailed parameters about the qubit sample can be found in Supplementary Table 1. The microwave signal generated by the cryogenic source is sent to the readout resonator through a circulator, with which the reflected signal by the resonator can be measured. The reflection signal is amplified and analyzed with a homodyne setup.

To measure the reflection spectra of the readout resonator with the cryogenic signal source (Fig. 4a), we have to first calibrate the output frequency of the signal source for different end fluxes, which is similar to the measurement shown in Fig. 2g. Besides the frequency dependence on the end flux, the emission intensity and phase with varied end fluxes are also recorded as background signals. In the experiment, we use different end fluxes to drive the signal source and send the output to the readout resonator. The reflected signal is measured as raw data, from which the background is substrated to extract the real resonator response in Fig. 4a.

Notably, to achieve maximized detection efficiency, the temporal mode of the microwave pulse generated by the signal source has to be considered, especially for the single-shot readout of the qubit state. The output microwave pulse can be depicted by the time-independent mode *a* expressed as a function of the time-dependent field mode *a*_{out} as

$$a=\int\,dt \; f\left(t\right){a}_{out}\left(t\right)$$

(5)

where \(f\left(t\right)\) represents the temporal mode function which satisfies the normalization condition ∫ *d**t* ∣*f*(*t*)∣^{2} = 1 and guarantees the commutation relation [*a*, *a*^{†}] = 1. The time-dependent operator *a*_{out} corresponds to the time trace of the voltage recorded by the ADC, and the time-independent operator *a* corresponds to the in-phase (I) and quadrature (Q) moments extracted from the time trace with a digital homodyne method^{44}. By setting a proper envelope for the digital homodyne function, which is the same as the envelope of the recorded time trace, the digital homodyne process can reach unity efficiency, and the moment information can be fully extracted from the time trace. In the case of conventional readout, considering that the readout pulses are usually prepared with a square-shaped envelope and only slightly distorted by the resonator, a square shape is used as the envelope for the digital homodyne.

Since the microwave pulse generated by the cryogenic source has an exponential decay envelope, using a square wave leads to reduced detection efficiency. Additionally, when the microwave emission pulse is used to read the qubit state, the envelopes of the reflected signals when the qubit is in \(\left\vert g\right\rangle\) and \(\left\vert e\right\rangle\) can be very different due to the dispersive-shifted resonance of the readout resonator. Therefore, in the single-shot experiments, we employ the averaged readout signals when the qubit is in \(\left\vert g\right\rangle\) and \(\left\vert e\right\rangle\) as the digital homodyne functions, respectively, instead of using one fixed envelope. Accordingly, the effective quadratures I and Q can be extracted as

$$I=\int\,dt\,{f}_{g}(t)V(t)$$

(6)

$$Q=\frac{\int\,dt\,{f}_{e}(t)V(t)-I\cos \theta }{\sin \theta }$$

(7)

where *f*_{g}(*t*) (*f*_{e}(*t*)) is the normalized average output signal when the qubit is in \(\left\vert g\right\rangle\) (\(\left\vert e\right\rangle\)). *V*(*t*) represents a single trail output signal in the single-shot readout experiment; \(\theta=\arccos (\int\,dt\,{f}_{g}(t){f}_{e}(t))\) is the overlap angle between the two average signals corresponding to the two qubit states. It is worth noting that the average output signals *f*_{g} and *f*_{e} driven by the exponentially-enveloped input are non-orthogonal. When using two non-orthogonal signals as digital homodyne functions, one of the two calculated quadrature moments needs to be compensated for the overlap angle. Here, *f*_{g}(*t*) is taken as an eigenvector of the spanned I-Q space to give the in-phase moment, and the quadrature moment is compensated as shown in Eq. (7). By using this temporal mode fitting method, the moment information carried by the resonator reflection can be efficiently extracted to distinguish the qubit states in single-shot experiments.

### Qubit drive estimation

We consider two approaches to perform a single-qubit gate with the microwave source, and estimate the possibly achieved single-qubit Rabi rate.

The first approach is similar to the conventional qubit drive scheme, for which the output of the signal source is coupled to the qubit via an open waveguide. Taking the coupling strength between the waveguide and the qubit as Γ_{ext}, the Rabi rate Ω can be estimated as

$$\Omega=2\sqrt{{\dot{n}}_{d}{\Gamma }_{ext}},$$

(8)

where \({\dot{n}}_{d}\) is the photon flux in the waveguide. Considering the energy consumption during the single qubit *π* rotation, the Rabi rate can be expressed as the function of total input photon number *n* in the waveguide

$$\Omega=\frac{4}{\pi }n{\Gamma }_{ext}.$$

(9)

Here, we take a reasonable coupling strength Γ_{ext} = 1000 Hz for calculation, corresponding to a qubit lifetime limitation 1ms, and the result is shown in Supplementary Fig. 11 with the purple line. According to the maximum output power obtained with the cryogenic microwave source, the achievable Rabi rate is about 0.26MHz, which is too slow compared with the practical qubit gate speed implying an insufficient output power.

In the second approach, the resonator of the signal source is directly connected to the qubit through a capacitive coupling. The coupling capacitance is chosen to be the same as that between the waveguide and the qubit in the first approach. The resonator and the qubit are tuned on resonance when performing the gate operation and tuned far off-resonance when idle. To simulate the single qubit gate, we consider the Jaynes-Cummings Hamiltonian

$$\hat{H}=\frac{{\omega }_{q}}{2}{\hat{\sigma }}_{z}+{\omega }_{r}{\hat{a}}^{{{{\dagger}}} }\hat{a}+g\left({\hat{a}}^{{{{\dagger}}} }{\hat{\sigma }}_{-}+\hat{a}{\hat{\sigma }}_{+}\right),$$

(10)

where \(\hat{a}\) (\({\hat{a}}^{{{{\dagger}}} }\)) is the annihilation (creation) operator of the resonator mode, and \(\hat{\sigma }\) is the Pauli operator of the qubit mode; *ω*_{q} and *ω*_{r} are the frequency of the qubit and resonator of the cryogenic signal source, respectively; *g* is the coupling strength between the qubit and the resonator. Since the coupling strengths Γ_{ext} and *g* in the two approaches are both determined by the coupling capacitance *C*_{c}, it is intuitive to compare the Rabi rates of the two approaches under the same coupling capacitance. According to a simple capacitive coupling model, the relations between the two coupling strengths and the coupling capacitance can be expressed as

$${C}_{c} =\sqrt{\frac{{C}_{q}{\Gamma }_{ext}}{{\omega }_{q}^{2}{Z}_{0}}},\\ g =\frac{{C}_{c}}{2{C}_{q}{C}_{r}}\sqrt{\frac{1}{{Z}_{r}{Z}_{q}}},$$

(11)

where *C*_{q} and *C*_{r} are the capacitance of the qubit and the resonator; *Z*_{0}, *Z*_{q}, and *Z*_{r} are the characteristic impedances of the open waveguide, the qubit, and the resonator. With a common qubit parameter setting *ω*_{q} = 6GHz, *E*_{c} = 220MHz, the coupling strength Γ_{ext} = 1000 corresponds to the coupling capacitance *C*_{c} = 35aF. Therefore, the coupling strength in the second approach can be determined as *g* = 0.49MHz. By considering the coherent states of different photon numbers in the resonator, the simulation results of the related Rabi rate are shown in Supplementary Fig. 11 with the pink line. In this approach, the Rabi rate is much faster than the conventional method with the same photon number. The pink triangle and square indicate the Rabi rates 30.8MHz and 8.23MHz corresponding to the maximum photon number experimentally generated in the resonator 1017 and 71 when the flux drive signal of the cryogenic microwave source is delivered through the coaxial cables or twisted-pair wires. By optimizing the twist pitch length of the pair of wires and thus their bandwidth^{30}, the maximum achieved photon number is estimated to be 662, leading to the optimized Rabi rate of 24.9MHz, as shown with the pink diamond in Supplementary Fig. 11.