Proposal for a room-temperature diamond maser

The application of masers is limited by its demanding working conditions (high vacuum or low temperature). A room-temperature solid-state maser is highly desirable, but the lifetimes of emitters (electron spins) in solids at room temperature are usually too short (∼ns) for population inversion. Masing from pentacene spins in p-terphenyl crystals, which have a long spin lifetime (∼0.1 ms), has been demonstrated. This maser, however, operates only in the pulsed mode. Here we propose a room-temperature maser based on nitrogen-vacancy centres in diamond, which features the longest known solid-state spin lifetime (∼5 ms) at room temperature, high optical pumping efficiency (∼106 s−1) and material stability. Our numerical simulation demonstrates that a maser with a coherence time of approximately minutes is feasible under readily accessible conditions (cavity Q-factor ∼5 × 104, diamond size ∼3 × 3 × 0.5 mm3 and pump power <10 W). A room-temperature diamond maser may facilitate a broad range of microwave technologies.

T he maser 1 -with a frequency 0.3-300 GHz and a wavelength between 1 m and 1 mm-is the microwave analogue of lasers with several important applications [2][3][4][5] such as in ultrasensitive magnetic resonance spectroscopy, astronomy observation, space communication, radar and high-precision clocks. Such applications, however, are hindered by the demanding operation conditions (high vacuum for a gas maser 6 and liquid-helium temperature for a solid-state maser 7 ). Room-temperature solid-state masers are highly desirable.
The key to a maser is the population inversion of the emitters and the macroscopic coherence among microwave photons. Population inversion requires a spin relaxation rate lower than the pump rate. This sets the bottleneck in room-temperature solid-state masers, as the spin relaxation times in solids are usually extremely short (approximately nanoseconds 8 ) at room temperature due to rapid phonon scattering 7 . The spin relaxation induced by phonon scattering can be largely suppressed in light-element materials (such as organic materials) where the spin-orbit coupling is weak. Actually, the only room-temperature solid-state maser demonstrated so far is based on a pentacenedoped p-terphenyl molecular crystal where the spin lifetime can reach 135 ms at room temperature 9 . However, the active spins in pentacene-doped p-terphenyl are the intermediate metastable states instead of the ground states. Such an energy level structure greatly reduces the optical pumping efficiency and the pentacene maser requires high pump laser power. In addition, the organic material of p-terphenyl molecular crystal is unstable under highpower pump and at high temperature. The pentacence maser works only at the pulsed mode with a quite low repetition rate (B1 Hz) 9 . Another candidate system under consideration is the silicon vacancy (V Si ) centre in silicon carbide 10 . Very recently, it has been clarified that the V Si centre has a spin-3/2 ground state, which allows population inversion by an optical pump 10,11 . The spin lifetime is quite long (B0.5 ms) at room temperature 10,11 . Stimulated microwave emission from V Si centres has been observed at room temperature 10 . Masing from the silicon carbide spins, however, is still elusive. The challenges include the complexity of the defects in the compound material and the difficulty of engineering the V Si centres.
Nitrogen-vacancy (NV) centre spins in diamond 12 have been extensively studied for quantum information processing 12 and quantum sensing [13][14][15] . This is due to their long coherence time at room temperature and high efficiencies of initialization by optical pumping and readout via photon detection. In particular, coupling between ensemble NV centre electron spins and superconducting resonators has been demonstrated for quantum information storage and retrieval in hybrid quantum systems at cryogenic temperature 16,17 . Enhanced quantum coherence of NV centre ensembles has been observed in the strong coupling regime at low temperature 18 . It should be noted that the superb spin coherence features of NV centres persist at room temperature and even at temperatures up to at least 600 K (ref. 19), and the requirement of low temperatures in refs 16-18 is mostly for the resonators used. On the basis of these works, we here propose a new class of quantum technologies based on NV centres in diamond, namely, room-temperature solid-state masers and microwave amplifiers.
NV centres in diamond possess all of the features needed for a room-temperature solid-state maser. NV centre spins have the longest known lifetime (B5 ms) at room temperature [20][21][22] among all of the solid-state spins (B50 times longer than B0.1 ms in pentacene-doped p-terphenyl 9 and B10 times longer than B0.5 ms in silicon carbide 10,11 ). The spin is a triplet (spin-1) in the ground state and it can be optically pumped rapidly to the m s ¼ 0 ground state, with a pump rate as high as B10 6 s À 1 (refs 23-26) (versus B10 3 to 10 5 s À 1 in organic materials 9 and B10 5 s À 1 in silicon carbide 27 ). Therefore, the population inversion can be easily achieved if a magnetic field is applied to shift the m s ¼ 0 ground state to above another spin state. Furthermore, the good thermal conductivity and material stability of diamond are also advantageous for masers. All of these features suggest that the NV centres in diamond are a superb gain medium for a room-temperature solid-state maser. However, the diamond maser requires a magnetic field; this is a further experimental complication that can, however, be overcome because magnets that can provide stable and uniform magnetic fields are commercially available [28][29][30] .
Here, we theoretically propose a room-temperature maser based on NV centres in diamond. Our numerical simulation demonstrates that masing and microwave amplification are feasible under readily accessible conditions (cavity Q-factor B50,000, diamond size B3 Â 3 Â 0.5 mm 3 and NV centre concentration B2 p.p.m.), with the 532-nm optical pump threshold B3 W for microwave amplifying and B4 W for masing. For a pump power o10 W, it is feasible to achieve masing with an output power of 410 nW, a coherence time of approximately minutes, an mHz linewidth and a sensitivity of o10 pT Hz À 1/2 for magnetometry application. As a room-temperature microwave amplifier, the noise temperature is as low as B0.3 K under a few-watt pump. A room-temperature diamond maser may facilitate a broad range of microwave technologies.

Results
System and model. We consider an ensemble of NV centre spins in diamond resonantly coupled to a high-quality microwave sapphire dielectric resonator cavity 9,31 ( Fig. 1a; Supplementary Note 1). This type of cavity has been experimentally demonstrated to have a Q-factor of 410 5 at room temperature 9,31 . Note that many other types of microwave resonators 10,32 may also be considered for implementing the proposal in this paper. The spin sublevels jm s i (m s ¼ 0 or m s ¼ ± 1) of the NV triplet ground state have a zero-field splitting about 2.87 GHz between j0i and jAE1i (ref. 12) (Fig. 1b). The NV centres can be optically pumped to the state j0i (ref. 12). A moderate external magnetic field (41,000 G) splits the states jAE1i and shifts the j À 1i state to below j0i so that the spins can be inverted by an optical pump (Fig. 1b,c). The transition frequency o S between the spin ground state jgi j À 1i and the spin exited state jei j0i is tuned resonant with the microwave cavity frequency o c .
The maser is driven by coupling between the cavity mode and the spins. The Hamiltonian of the coupled spin-cavity system is H I ¼ P N j¼1 g j ðâŝ þ j þâ yŝ À j Þ, whereâ annihilates a microwave cavity photon,ŝ þ j jei jj hgj is the raising operator of the j-th spin,ŝ À j ¼ ðŝ þ j Þ y , and g j is the coupling constant. Without changing the essential results, we assume that the spin-photon coupling is uniform, that is, g j ¼ g and write the Hamiltonian as H I ¼ gðâŜ þ þâ yŜ À Þ with the collective operatorsŜ AE P N j¼1ŝ AE j , which satisfy the commutation relation ½Ŝ þ ;Ŝ À ¼ P N j¼1 ðjei jj hej À jgi jj hgjÞ Ŝ z . When masing occurs, the spin polarization (or population inversion) S z hŜ z i is a macroscopic number ½ $ OðNÞ, while the fluctuation dŜ z Ŝ z À S z $ OðN 1=2 Þ is much smaller. Therefore,b y Ŝ À = ffiffiffiffi S z p can be interpreted as the creation operator of a collective mode with ½b;b y ffi 1. The creation operator generates coherent superposition states in the spin ensemble. For example, from a fully polarized spin state, the collective mode state excited by one cavity photon is a quantized spin wavebjgi 1 jgi 2 Á Á Á jgi N ¼ ARTICLE NATURE COMMUNICATIONS | DOI: 10.1038/ncomms9251 ffiffiffiffiffiffiffiffi ffi 1=N p P N j¼1 jgi 1 Á Á Á jgi j À 1 jei j jgi j þ 1 Á Á Á jgi N , which acts as a boson. In the masing state, both the photons and the spin collective modes, coherently coupled to each other, have macroscopic amplitudes. With the excitation number of the coherent spin collective mode n S hb y bi ¼ hŜ þŜ À i=S z $ OðNÞ, the spins are in a macroscopic quantum superposition state, which is maintained by the masing process.
A prerequisite of masing is the spin population inversion. The optical pumping rate w can be tuned by varying the pump light intensity, up to B10 6 s À 1 (refs 23-26). The cavity mode has a decay rate determined by the cavity Q-factor, k c ¼ o c /Q, due to photon leakage and coupling to the input/output channels. The decay of the spin collective mode is caused by various mechanisms. First, the spin relaxation (T 1 process caused by phonon scattering and resonant interaction between spins) contributes a decay rate g eg ¼ 1/T 1 . Second, the individual spins experience local field fluctuations due to interaction with nuclear spins, coupling to other NV and nitrogen (P1) centre electron spins, and fluctuation of the zero-field splitting 17 . Such local field fluctuations induce random phases to individual spins, making the bright collective mode decay to other modes at a rate 2=T Ã 2 , where T Ã 2 is the dephasing time of the spin ensemble. Finally, the optical pump of the NV centres, being incoherent, also induces the decay of the collective mode. The collective mode decay rate induced by the incoherent pump is qw, where qE16 is an amplification factor of the contribution of pump rate w to the collective mode decay rate k S (see Supplementary Note 1), due to multiple pathways (Fig. 1c) of the pump process. The total decay rate of the collective mode is thus k S ¼ g eg þ 2=T Ã 2 þ qw. The coupled quantum dynamics of the collective modes and the photons is described by the quantum Langevin equations 33 for the photon and spin collective mode operatorsâ andŜ AE , the spin populationsN e=g P N j¼1 e=g j i jj e=g h j, and polarizationŜ z (see Methods and Supplementary Note 2). For a specific system, we consider a single crystal bulk diamond of volume V NV ¼ 3 Â 3 Â 0.5 mm 3 with a natural abundance (1.1%) of 13 C nuclear spins, a P1 centre concentration of about 20 p.p.m. and an NV centre concentration of 2 p.p.m. (for N-to-NV À conversion efficiency 10%). Such parameters are extracted from the diamond used in ref. 17. The ensemble spin decoherence time is . Considering the four orientations of NV centres and three nuclear spin states of 14 N, the number of NV centres coupled to the cavity mode is estimated to be N ¼ r NV V NV /12 ¼ 1.32 Â 10 14 . The external magnetic field 2,100 G results in o S /2pE3 GHz. The microwave dielectric resonator has its TE 01d mode frequency resonant with the spin collective mode, that is, o c ¼ o S . The cavity system (Fig. 1a) is composed of a cylindrical sapphire dielectric resonator (with radius r ¼ 15 mm and height h ¼ 16 mm), and a coaxial cylindrical cavity (with radius R ¼ 40 mm and height H ¼ 40 mm), placed inside a Halbach magnet array with a 50 (80)-mm inner (outer) radius, which provides the uniform magnetic field with inhomogeneity o0.01 G across the diamond size 28,29 . The coupling between the microwave photons and the NV centre spins is calculated to be g/2pE0.02 Hz for the effective cavity mode volume 9,34 V eff E3 cm 3 . At room temperature (T ¼ 300 K), the phonon scattering dominates the spin relaxation and g eg E200 s À 1 (refs 20-22). The number of thermal photons inside the cavity is n th E2,100 at room temperature.
Masing conditions. The quantum Langevin equations can be solved at steady-state masing. When masing occurs, the quantum operators can be approximated as their expectation values, that is, S AE % S AE ,â % a,N e=g % N e=g andŜ z % S z . By dropping the small quantum fluctuations, we reduce the quantum Langevin equations to classical equations for the expectation values (see Methods and Supplementary Note 2). Under the resonant condition (o c ¼ o S ), the steady-state solution is When the spin polarization S z BO(N), we have S þ S À BO(N 2 ). From equation (3), the number of intracavity photons a j j 2 ¼ 4g 2 k 2 c À Á S þ S À / N 2 and consequently the output power P out ¼ ' o c Á k c a j j 2 / N 2 , both scaling with the number of spins by N 2 . The requirement that photon number a j j 2 40 leads to the masing condition On one hand, the pump rate needs to be greater than the spin relaxation rate for population inversion (w4g eg ). On the other Figure 1 | Scheme of room-temperature diamond maser. (a) The diamond maser system. A diamond sample is fixed inside a high-quality sapphire microwave dielectric resonator loaded in a coaxial cylindrical cavity. Microwave signal outputs from the loop coupling to the TE 01d mode magnetic field (dashed red circles). The Halbach magnet array (the outer cylindrical wall) provides a uniform external magnetic field along the NV axis, which is set perpendicular to the cavity axial direction. The NV centres are pumped by a 532-nm light (green arrow). (b) The energy levels of an NV centre spin as functions of a magnetic field B. The zero-field splitting at B ¼ 0 is about 2.87 GHz. The magnetic field is set such that the transition frequency o S between the states À 1 j i g j i ð Þ and 0 j i e j i ð Þ is resonant with the cavity mode frequency o c . (c) The pump scheme. After the optical excitation by a 532-nm light (green arrows), the excited-state 3 E can directly return to the ground-state 3 A 2 via spin-conserving photon emission at a rate of B70 ms À 1 , but the excited states m s ¼ AE 1 j ican also decay to the singlet state 1 A 1 via inter-system crossing at a rate of B50 ms À 1 and quickly decay to the metastable state 1 E, then relax back to the three different ground states at a rate of B1 ms À 1 in each pathway. NATURE COMMUNICATIONS | DOI: 10.1038/ncomms9251 ARTICLE hand, the cavity Q-factor has to be above a threshold to have a sufficient number of photons for sustaining the macroscopic quantum coherence. A stronger spin-photon coupling (g), a smaller spin collective mode decay rate (k S ) or a larger number of spins (N) can reduce this threshold cavity Q-factor (see Supplementary Note 1 for more discussions). The cavity Q-factor threshold is equivalent to the requirement that the spin collective mode decay rate k S should be kept below the maximal collective emission rate of photons 4Ng 2 /k c . Otherwise overpumping would fully polarize the spins, making the spin-spin correlation vanish (S z -N and S À -0). The emergence of macroscopic quantum coherence is evidenced by macroscopic values of the spin-spin correlation, the photon number and the spin collective mode amplitude, and the long coherence time in the masing region (Fig. 2b-d). We calculated these quantities by using the higher-order equations of the correlation functions (see Methods and Supplementary Note 2), which apply to both masing and incoherent emission. The spin polarization S z , the microwave output power P out ¼ ' o c Á k c hâ yâ i and the spin-spin correlation hŜ þŜ À i (shown in Fig. 2a-c) are consistent with the results obtained from equation (2) when the pump rate and the cavity Q-factor are above the masing threshold (white curve in the Fig. 2). It is clearly seen that the output power increases markedly when the pump rate is above the spin relaxation rate (population inverted) and when the cavity Q-factor is above the masing threshold (Q4Q C ) (Fig. 2b). The fact thatŜ þŜ À ) N e unambiguously evidences the phase correlation among the large ensemble spins established by cavity photons in the masing region (Fig. 2c). The pump condition optimal for spin-spin correlation is determined by maximizing hŜ þŜ À i ¼ ðS z =2k S Þ½ðw À g eg ÞN À ðw þ g eg ÞS z : Under the condition that the pump is well above the threshold, w ) g eg ; 1 qT Ã 2 À Á , the spin-spin correlation reaches its maximum value hŜ þŜ À i % N 2 = 8q ð Þ at the optimal pump rate  The maser linewidth is determined by the correlation of the phase fluctuations of the photons or equivalently by that of the spin collective modes. The coherence time is obtained (see Supplementary Note 4) as where n c ¼ hâ yâ i is the photon number, n S ¼ hŜ þŜ À i S z is the spin collective mode number and n incoh ¼ n th þ N e /S z includes the thermal photon number (n th ) and the incoherent spin collective mode number (hŜ þŜ À i=S z ¼ P N j¼1 hŝ þ jŝ À j i=S z ¼ N e =S z if the correlation between different spins is forced to be zero). The physical meaning of equation (6) is the following: the coherent excitations (photons and spin collective excitations) have the same phase within the total lifetime k À 1 c þ k À 1 S À Á of the photons and the spin collective modes; beyond the total lifetime, each incoherent excitation induces a random phase BO(p); the total random phase is shared by all the coherent excitations. Thus the random phase of a single photon or spin collective excitation accumulated during the total lifetime The coherence time is greatly enhanced in the masing region (Fig. 2d). The spin collective mode decay rate of the NV centres k S 45 Â 10 6 s À 1 , while for a good microwave cavity (QB10 5 ), the photon decay rate k c B6p Â 10 4 s À 1 , thus the photon number n c ¼ n S k S /k c is much greater than the spin collective mode number, and the macroscopic quantum coherence is mainly maintained by the photons in the cavity. For readily accessible cavities in experiments, the fractional frequency instability of a roomtemperature diamond maser is B10 À 12 t À 1/2 as listed in Tables 1 and 2 for a cavity with Q ¼ 5 Â 10 4 . For comparison, the fractional frequency instability of a hydrogen maser is B10 À 13 t À 1/2 at room temperature 35 or B10 À 15 t À 1/2 at cryogenic temperature 36 , and the state-of-the-art ytterbium atomic clock 37 has a fractional frequency instability of B10 À 16 t À 1/2 . The optimal pump condition for a long coherence time can be obtained from equation (6). In the good-cavity or large ensemble limit where 2Ng 2 =k c ) 1 T Ã 2 and at room temperature where n incoh En th , the optimal pump rate for maximum coherence time is close to that for maximum spin-spin correlation, that is, w maxcorr opt % 2Ng 2 = qk c ð Þ, and the optimal coherence time reaches T opt coh % 2N 2 g 2 qn th k 3 c À Á , which scales with the spin number and the cavity Q-factor according to T opt coh / N 2 Q 3 (see Supplementary Note 3). Note that the quantum coherence sustained by active masing (with a pump) has a much longer lifetime than the spin coherence protected by passive coupling to the cavity (without a pump) 18 . This is due to the superradiant emission of photons from the spin collective modes of the NV centres in the bulk diamond and the concomitant large number of photons in the cavity.
Diamond microwave amplifier. The coupled spin-cavity system can be configured as a room-temperature microwave amplifier when the spin population is inverted (S z 40) but when the cavity Q-factor is below the masing threshold (QoQ C ). For the readily accessible parameter Q ¼ 10 4 , the noise temperature is as low as B0.2 K (versus B1 K for the state-of-the-art ruby amplifier working at liquid-helium temperature 3 ). To study the amplification, we calculate the spin inversion, the microwave output power gain and the noise temperature with a weak microwave resonant input (see Methods and Supplementary Note 5). As shown in Fig. 3, the system linearly amplifies the microwave signal. The gain is about 6-10 dB under a 6-10-W pump with noise temperature 340-280 mK. At high pump around 136 W (w ¼ 10 4 s À 1 ), the gain is as high as 20 dB with noise temperature as low as 200 mK. The low noise temperatures indicate the single-photon noise level.

Discussion
The ultralong coherence time of the maser is useful for metrology. The collective excitation of a large number of spins (B10 14 ) and cavity photons enhances the sensitivity. The sensitivity to a slowvarying magnetic field noise (with frequency rk S /2) dB ffiffi ffi for measurement time t (see Supplementary Note 6), where g NV /2p ¼ 2.8 MHz G À 1 is the NV centre gyromagnetic ratio. The magnetic field sensitivity is estimated to be in the order of 10-1 pT Hz À 1/2 at room temperature (Tables 1 and 2). The temperature noise would induce cavity frequency fluctuation via thermal expansion and dielectric constant variation. The temperature sensitivity, dT ffiffi ffi , is estimated to be in the order of 100-10 nK Hz À 1/2 at room P pump , the pump power; w, the pump rate; P out , the output power; T coh , the coherence time; Dn ST , the maser linewidth; dB ffiffi ffi t p , the magnetic field sensitivity; dT ffiffi ffi t p , the temperature sensitivity; syðtÞ, the fractional frequency instability, where t is the measurement time. The cavity Q ¼ 5 Â 10 4 . The numbers in the brackets in the first column show the absorbed power P absorb , and the numbers in the brackets in other columns are values with a 0.2 K temperature fluctuation taken into account.  P pump , the pump power; w, the pump rate; P out , the output power; T coh , the coherence time; Dn ST , the maser linewidth; dB ffiffi ffi t p , the magnetic field sensitivity; dT ffiffi ffi t p , the temperature sensitivity; syðtÞ, the fractional frequency instability, where t represents the measurement time. The cavity Q ¼ 5 Â  (Tables 1 and 2), where we have taken g 0 E(a þ b/ 2)o c ¼ 165 kHz K À 1 with a and b being the temperature coefficients of thermal expansion and permittivity for sapphire, respectively (see Supplementary Note 1). For a higher cavity Q-factor, the thermometry sensitivity is enhanced while the magnetometry sensitivity is reduced (see Fig. 2e,f) due to the frequency dragging effect (the steady-state masing frequency is a weighted average of the spin and cavity frequency 38 , Note 2). The sensitivities to the magnetic field and the temperature noises set the requirements on stability of the set-up for maintaining the long coherence time of the maser.
The pump power P pump ¼ ' o p S=s ð Þ 4w ð Þ is proportional to the pump light frequency (o p ), the pump rate (w) and the area of the pump light spot (S) divided by the NV centre absorption cross-section (s) (see Supplementary Note 1). The threshold pump power is low because the spin relaxation time is long in diamond. For a readily accessible cavity with Q ¼ 5 Â 10 4 , we show diamond maser performance in Tables 1 and 2. The threshold pump power for microwave amplifying (population inversion) is estimated to be 2.7 W, above which the net photon emission into the cavity amplifies the signal. The threshold pump power for masing is estimated to be 4.3 W for Q ¼ 5 Â 10 4 cavity (see Supplementary Note 1 for pump thresholds), above which the emitted photons show collective coherence and the photon number scales with the spin number (N) by n c pN 2 .
The optical pump may heat the system, inducing both temperature increase and fluctuation. The frequency shifts of the spins and the cavity due to temperature increase are not an Absorb.
Absorb. Contour plots of (a) the spin polarization S z , (b) the power gain G and (c) the noise temperature T n , as functions of the pump rate w and the cavity Q-factor for resonant input microwave power P in ¼ 1 fW. For wog eg ¼ 200 s À 1 , the system is in the absorbing region (population not inverted). For w4g eg ¼ 200 s À 1 and the cavity Q-factor below/above masing threshold (the dashed curves), the system operates in the amplifying/masing mode. The insets show dependence on the pump rate for a fixed cavity Q ¼ 5 Â 10 4 (the absorbing, amplifying and masing regions marked as the grey, green and white, respectively). Amplifying is unstable in the masing region (see Supplementary Fig. 1). (d) Output power as a function of input microwave power for various pump rates (w ¼ 10 3 , 10 4 or 10 5 s À 1 ), with the cavity Q-factor Q ¼ 10 4 and 2 Â 10 4 corresponding to the amplifying and masing regions, respectively. In the amplifying regime (Q ¼ 10 4 ), the amplification is linear in a large range of input power (see Supplementary Fig. 2 for more information). The parameters are the same as in Fig. 2. issue since once the steady-state is reached, the spin transition frequency can be tuned to resonance with the cavity mode by tuning the magnetic field. It has been demonstrated that NV centre spins still have good coherence properties at least up to 600 K (ref. 19). According to ref. 19, the spin polarization, the pump rate and the T Ã 2 decoherence time are only slightly changed at a temperature as high as 650 K. The longitudinal spin relaxation time T 1 is reduced to 0.34 ms at 600 K, more than 10 times shorter than that at room temperature, and the pump threshold for microwave amplifying (w41/T 1 ) is fulfilled when the pump power is 440 W. Also, the contribution of the longitudinal spin relaxation to spin collective mode decay is negligible 1=T 1 ( qw; 1 T Ã 2 À Á . The temperature fluctuation leads to transition frequency shifts of the spins (via lattice expansion) and the cavity mode (via dielectric constant variation and mode volume expansion), with (2p) À 1 Do S /DTE À 74 kHz K À 1 (ref. 39) and (2p) À 1 Do c / DTE À 165 kHz K À 1 (ref. 40) (see Supplementary Note 1). The masing conditions considered in this paper correspond to the photon leakage rate being much slower than the decay rate of the spin collective mode k c ( k S ð Þ . Thus, the effects of temperature fluctuation on the maser result mainly from the cavity mode frequency fluctuation. Figure 4 shows the spin polarization, the output power, the masing linewidth and the coherence time as functions of the temperature fluctuation DT for cavity Q ¼ 5 Â 10 4 , and various pump rates (w ¼ 10 3 , 10 4 , 10 5 s À 1 ). Note that the threshold cavity Q-factor is the lowest near w ¼ 10 4 s À 1 (Fig. 2), thus the rate near w ¼ 10 4 s À 1 is the most robust to temperature fluctuation. The masing condition is still fulfilled for up to 1.0 K temperature fluctuation at w ¼ 10 4 s À 1 . However, temperature fluctuation does affect the maser performance. In Table 1 (2), we compare the maser performance with and without the 0.2 K (0.5 K) temperature fluctuation for Q ¼ 5 Â 10 4 cavity at low (high) pump power. For a larger number of spins, a larger temperature fluctuation can be tolerated (DT max pN) due to the reduced threshold cavity Qfactor.

Methods
Maser equations. The theoretical study is based on the standard Langevin equations 33 dN e dt ¼ þ wN g À g egNe þ igâ yŜ À ÀŜ þâ þF e ; ð7Þ dN g dt ¼ À wN g þ g egNe À igâ yŜ À ÀŜ þâ þF g ; ð8Þ whereF c=S=e=g is the noise operator that causes the decay of the photons (c), the spin collective modes (S), the population in the excited state (e) or that in the ground state (g). Note that the total spin number is written as an operatorN to take into account the fluctuation due to the population of the third spin state þ 1 j iand other intermediate states. The population fluctuation, however, has no effect on the phase fluctuation of the maser (see Supplementary Note 4).
By replacing the operators with their expectation values, we obtain the meanfield equations for the maser at the steady state from which the masing frequency, the field amplitudes and the spin polarization can be straightforwardly calculated.
The coherence time and the linewidth are calculated using the spectrum of the phase fluctuations. The Langevin equations are linearized for the fluctuations, which are much smaller than the expectation values at steady state. The linearized equations are ddN e dt ¼ þ wdN g À g eg dN e þ ig S À dâ y À S þ dâ þ ig a Ã dŜ À À adŜ þ À Á þF e ; ð14Þ ddN g dt ¼ À wdN g þ g eg dN e À ig S À dâ y À S þ dâ À ig a Ã dŜ À À adŜ þ À Á þF g ; By Fourier transform of these equations, the spectrum of the phase noise can be calculated and hence the maser coherence time and linewidth are determined.
To investigate the correlations in both the masing and the incoherent emission regimes, we derive the equations for the correlation functions and take the expectation values of the relevant operators. That leads to Here, to make the equations close, we have used the approximation hâ yâŜ z i % hâ yâ ihŜ z i, hâ yŜ zŜ À i %Ŝ z hâ yŜ À i and hŜ þŜzâ i % hŜ z ihŜ þâ i, neglecting the higher-order correlations, which is well justified for Gaussian fluctuations.
Microwave amplifier and noise temperature. To investigate the microwave amplifier, we solve the mean-field equations with a steady-state input s in e À ioint as 0 ¼ wN g À g eg N e þ ig a Ã S À À S þ a ð Þ ; ð23Þ from which the power gain G ¼ s out j j 2 s in j j 2 is obtained. A power gain G ) 1 is possible under the resonant condition o in ¼ o c ¼ o S , but it will be reduced to O(1) at off-resonance, that is, o in À o S;c k S;c \1. The intrinsic noise temperature 7 of the diamond maser is given by where ' is the Planck constant, k B is the Boltzmann constant, T is the environment temperature, G dB ¼ 10log 10 G and L dB ¼ À 10 log 10 e À kctrt is the cavity power loss in decibel during the time of a microwave photon roundtrip time t rt ¼ 2 R þ r À r 0 ð Þ ffiffiffi ffi e r p À 1 À Á Â Ã c (e r E10 is the sapphire dielectric permittivity in the direction perpendicular to the c axis (resonator axis) of the sapphire crystal, R is the radius of the cylindrical cavity and r (r 0 ) is the external (internal) radius of the dielectric resonator).