Efficient atomic clocks operated with several atomic ensembles

Atomic clocks are typically operated by locking a local oscillator (LO) to a single atomic ensemble. In this article we propose a scheme where the LO is locked to several atomic ensembles instead of one. This results in an exponential improvement compared to the conventional method and provides a stability of the clock scaling as $(\alpha N)^{-m/2}$ with $N$ being the number of atoms in each of the $m$ ensembles and $\alpha$ is a constant depending on the protocol being used to lock the LO

Atomic clocks are typically operated by locking a local oscillator (LO) to a single atomic ensemble. In this article we propose a scheme where the LO is locked to several atomic ensembles instead of one. This results in an exponential improvement compared to the conventional method and provides a stability of the clock scaling as (αN ) −m/2 with N being the number of atoms in each of the m ensembles and α is a constant depending on the protocol being used to lock the LO. Atomic clocks provides very precise time measurements useful for a broad range of areas in physics. The quantum noise of the atoms limits the stability of atomic clocks, resulting in the standard quantum limit where the stability scales as 1/ √ N with N being the number of atoms [1,2]. Various ways of improving the resolution have been suggested such as using entangled states with reduced atomic noise [3][4][5][6] to push the resolution to the Heisenberg limit where it scales as 1/N [7][8][9][10][11][12]. Another approach to increasing the stability is to use optical atomic clocks where the higher operating frequency leads to an improved stability [13][14][15][16][17]. Since an atomic clock is typically operated through Ramsey spectroscopy [18] the resolution can also be enhanced by increasing the Ramsey time T resulting in an improvement scaling as 1/ √ T [19][20][21]. For clocks with trapped atoms, where there are no other limitations, T becomes limited only by the decoherence in the system. In practice this decoherence often originates from the frequency fluctuations of the local oscillator (LO) used to drive the atomic clock transition [20]. Hence, the stability can also be increased by simply devising methods to increase the Ramsey period by stabilizing the LO [22].
In this letter we suggest a scheme where the frequency of the LO is locked to the atomic transition using several ensembles of atoms. This procedure allows increasing the Ramsey period each time another ensemble is used. As a result we find that the stability of the clock can increase exponentially with the number of ensembles. Fig. 1(a) illustrates the idea behind the scheme. The feedback of the first ensemble locks the frequency of the LO thus reducing the noise to the atomic noise. Having reduced the noise in the LO, the second ensemble can be operated with a longer Ramsey time. Through a second feedback the noise of the LO can be further reduced as shown in the simulation in Fig. 1 scheme can provide an exponential improvement in the stability with the total number of atoms. In order for the clock to be stable we need γT 1 1 and hence the protocol requires a minimum number of atoms to improve the performance. With the conventional Ramsey protocol we find that the scheme works for a minimum ensemble size of 20 atoms. To further optimize the performance of the scheme we study an adaptive measurement protocol for estimating the LO frequency offset, which extends the applicability of the scheme down to ensembles with only 4 (7) atoms for white (1/f ) noise in the LO. This makes the scheme relevant for atomic clocks based on trapped ions, which are typically constructed with only a few ions [19]. A related procedure involving multiple measurements on a single ensemble was proposed in Ref. [22]. By using multiple ensembles our procedure avoids disturbances from the measurements affecting later mea-surements. Recently and independently from this work a manuscript appeared, which treats essentially same locking scheme that we suggest [23]. Taking the different figures of merit into account that work arrives at results consistent with ours.
We will now describe the locking of the LO to the atomic transition using Ramsey spectroscopy. We model an ensemble of N atoms as a collection of spin-1/2 particles with total angular momentum J. We define the angular momentum operatorsĴ x ,Ĵ y andĴ z in the usual way and initially the atoms are pumped to have J along the z-direction, Ĵ x = Ĵ y = 0. In Ramsey spectroscopy the atoms are illuminated by a near-resonant π/2-pulse from the LO, followed by the Ramsey time T of free evolution, and finally another near-resonant π/2-pulse is applied. The Heisenberg evolution ofĴ z iŝ J 3 = cos(δφ)Ĵ y + sin(δφ)Ĵ z where δφ = δωT is the acquired phase of the LO relative to the atoms. At the end of the Ramsey sequenceĴ 3 is measured and used to make an estimate δφ e = −arcsin(2Ĵ 3 /N ) of δφ. The feedback loop then steers the frequency of the LO towards the atomic transition by applying a frequency correction of ∆ω = −αδφ e /T to the LO where α sets the strength of the feedback loop. The operation of an atomic clock thus consists of repeating a cycle of initializing -Ramsey sequence -measurement -feedback. The total time of this clock cycle is denoted T c and we assume that T c ∼ T , i.e. we assume a negligible Dick noise [24].
We now consider an atomic clock with two atomic ensembles operated with different Ramsey times and show how this can improve the stability of the clock. These considerations can then easily be extended to several ensembles. Note that we assume the intrinsic linewidth of the atoms to be negligible such that the atomic linewidth is only limited by the Ramsey time. The first ensemble is operated with Ramsey time T 1 and we assume that the second ensemble is operated with Ramsey time T 2 = nT 1 where n is an integer. We can make two discrete time scales describing ensemble one and two respectively. Ensemble one is measured at t k = kT 1 and ensemble two is measured at t s = sT 2 = s · nT 1 . The frequency offset of the LO between time t k−1 and t k is then where δω 0 (t) is the frequency fluctuation of the unlocked LO, ∆ω 1 (t k−1 ) is the sum of the frequency corrections applied up to time t k−1 from the first ensemble and ∆ω 2 (t s−1 ) is the sum of the frequency corrections applied up to time t s−1 from the second ensemble (t s−1 ≤ t k−1 ). The feedback loops are described by the equations where δφ e1 (t k−1 ) and δφ e2 (t s−1 ) are the estimated phases from the first and second ensemble at times t k−1 and t s−1 respectively. Using Eq. (1) we can write the phase of the LO relative to the atoms of the second ensemble at time t s as where ∆φ s−1 = T2 0 ∆ω 2 (t s−1 )dt is the accumulated phase due to the feedback of the second ensemble and is the accumulated phase due to the frequency oscillations of the LO when locked by the feedback of the first ensemble. For now we assume that T 2 T 1 such that the feedback of the first ensemble has stabilized the LO but later we will relax this assumption. From Eqs. (3)-(4) we then derive the difference equation From this expression we see that the evolution of the second phase δφ 2 is essentially driven by the noise of the stabilized LO from the first step δφ but is stabilized by the second feedback loop described by αδφ e2 .
To solve Eq. (6) we need to characterize the width of the noise of the stabilized LO from the first stage, δφ 2 = T2 0 dt T2 0 dt δω(t)δω(t ) . From Eq. (2) and (5) we can derive a difference equation for δφ(t k ) = T1 0 δω(t k −t )dt , which is the acquired phase of the LO relative to the first ensemble between time t k−1 and t k (we can neglect the feedback from the second ensemble since T 2 T 1 ): Here δφ 0 (t k ) = T1 0 δω 0 (t k − t )dt is the phase of the unlocked LO. In comparison to Eq.(6) we see that the evolution of the phase δφ is driven by the noise of the unlocked LO but is stabilized by the first feedback loop described by αδφ e1 . To solve this equation we follow Ref. [25] where the locking of the LO to a single ensemble is described. First we derive a differential equation from Eq. (7) in the limit N 1, treatingĴ x ,Ĵ y , andĴ z as Gaussian variables and considering for now a LO subject to white noise. Assuming that the atoms start out in a coherent spin state we can solve this equation to obtain where we have defined the parameterγ = 1/N T 1 , which characterizes the noise of the stabilized LO. This noise is effectively white for both white and 1/f noise in the unlocked LO ( Fig. 1(b) and Ref. [25]). The second ensemble thus sees an effective white noise in the LO with γ = 1/(T 1 N ).
We now return to Eq. (6). Writing δφ 2 (t) ∼ δω(t)T 2 the stability of the clock after running for a time τ where ω is the frequency of the atomic transition. Following similar arguments as before we can derive and solve a differential equation from Eq. (6) to obtain an expresion for δφ 2 (t)δφ 2 (t ) . Inserting this into Eq. (9) and taking the limit of τ T 2 results in Eq. (10) describes how the stability improves with T 2 and N . The longest T 2 we can allow is determined by how well the LO is stabilized by the first ensemble as contained inγ and we parameterize it by T 2,max = β 2 /γ. In a similar fashion we assume that T 1,max = β 1 /γ for the first ensemble. With these parameterizations we can express the stability as With white noise in the unlocked LO we can pick β 1 = β 2 .
As previously noted the noise of the LO will also be approximately white withγ ∼ 1/N T 1 after locking it to the first ensemble also for other types of noise e.g. 1/f noise. In that case it is desirable to have β 2 = β 1 but we still expect β 1 /β 2 to be of order unity. Eq. (11) shows that by locking the LO to two ensembles of uncorrelated atoms the stability can be significantly improved. If N γT 1 1 the stability obtained from Eq. (11) is much better than the single ensemble result in Eq. (10) (with T 2 → T 1 ). The arguments leading to Eq. (11) can be generalized in a straight forward way to show that if the LO is locked to m ensembles each containing N atoms, the stability of the clock is σ γ (τ ) = (β 1 /β) (m−1) γ/(ω 2 τ )(N γT 1,max ) −m/2 (since the noise of the LO is white after locking it to the first ensemble we use β = β 2 = . . . = β m ). By continuing the procedure we thus improve the stability exponentially! In our analytical calculations above we have assumed N 1. To investigate the performance for smaller N we simulate an atomic clock locked to between 1 and 4 atomic ensembles each with atom numbers from N = 20 to N = 100. From the simulations we can generalize to the case where the LO is locked to m ensembles. We simulate the full quantum evolution of the atomic state through the Ramsey sequences and subsequent measurements and implement the feedback on the LO similar to the description in Eq. (1) and above. The assumption of T 2 T 1 can be relaxed by applying a phase correction in the measurement [26]. The number of atoms required in each ensemble to increase the Ramsey time by a factor a at each level is set by the white noise level of the stabilized LO. Using Eq. (8) and remembering that β parameterize the maximal Ramsey time for white noise we have that T 2 /N T 1 =γT 2 = β. Assuming T 2 = aT 1 we find that N ∼ a/β atoms are required in each ensemble to increase the Ramsey time by a factor of a at each level. The minimum number of atoms required for our protocol to work is thus obtained by setting a = 2.
To determine β we investigate the errors that limits the Ramsey time T for a LO subject to white noise characterized by γ. For experiments or simulations running with a fixed Ramsey time there is always a finite probability that phase jumps large enough to spoil the measurement strategy occurs since Ramsey spectroscopy with projective measurements is only effective for phases π/2. In our simulations we see these phase jumps as an abrupt break down as we increase T . Simulating a clock running for a time τ = 10 6 T with a single ensemble of N = 10 5 atoms, we see the stability increase with T until a maximum of T max ∼ 0.1/γ is reached. Increasing T beyond this point results in a rapid decrease in the stability. From this we conclude that Ramsey spectroscopy with projective measurements only allows for β ∼ 0.1 and thus N min = 20. To determine β 1 for an LO subject to 1/f noise we do a similar simulation where the noise spectrum of the LO is S(f ) = γ 2 /f (f is frequency). From this simulation we find that β 1 ∼ 0.1 as for white noise. Note that this construction introduces a weak (logarithmic) dependence on the number of steps that we simulate [26].
We have simulated clocks with an unlocked LO subject to both white and 1/f noise with the constraint β = 0.1. In Fig. 2 the stability of the clocks are plotted against the ensemble size N . Fig. 2 confirms that the scheme works down to atom numbers of N = 20 where we gain a factor of ∼ 2 m−1 in σ 2 γ (τ ) by locking the LO to m ensembles for both white and 1/f noise. Furthermore the numerical results are seen to agree nicely with the analytical calculations. We obtain practically the same long term stability for 1/f noise as for white noise since the first feedback whitens the noise for small frequencies (cf. Fig. 1b).
The conventional Ramsey protocol considered so far has a lower limit of N min = 20 in order for our protocol to work. This limit is due to the inability of the conventional protocol to effectively resolve phases larger than π/2. In Ref. [30] we presented an adaptive protocol for estimating the phase, which effectively resolves phases π. Again simulating a clock running for a time τ = 10 6 T 1 with a single ensemble of N = 10 5 atoms we find that this protocol enables us to extend the Ramsey time to β ∼ 0.3 for white noise and to β 1 ∼ 0.2 for a LO subject to 1/f noise [26]. However the type of weak measurements described in Ref. [30] is hard to implement for ensembles of few atoms. We have therefore modified the protocol such that individual atoms are read out one at a time and a Bayesian procedure similar to that of Ref. [31,32] is used for the phase estimation and atomic feedback. We perform intermediate feedbacks during the measurements to rotate the atomic state to be almost in phase with the LO. Due to the rotations the protocol can resolve phases π as the protocol in Ref. [30]. This protocol is described in detail in the supplemental material [26]. With this adaptive measurement strategy we simulate clocks locked to between 1 and 4 ensembles for atom numbers from N = 4 to 34 with an unlocked LO subject to both white and 1/f noise with the constraint β = 0.3. The stability of the clocks is plotted against the ensemble size N in Fig. 3. For the adaptive protocol we can apply the scheme of locking to several ensembles down to ensemble sizes of N = 4 (7) for white (1/f ) noise where we gain a factor of ∼ 2 m−1 in σ 2 γ (τ ) by locking the LO to m ensembles. The minimal number of atoms is higher for 1/f noise since the adaptive protocol is not as effective as for white noise where we have a better understanding of the a priori distribution in the Bayesian procedure [26]. It should be noted, however, that in principle it is only in the first ensemble that we need more atoms than for white noise since the feedback of the first ensemble whitens the noise. The adaptive protocol is thus more effective for the subsequent ensembles.
In conclusion we have demonstrated a scheme for locking the LO in an atomic clock to m ensembles of N atoms each. For this scheme the stability of the clock scales as √ γ(γT 1 N ) −m/2 where T 1 is the Ramsey time of the first ensemble. Our scheme thus provide an exponential improvement in the stability with the number of atoms. For the conventional Ramsey protocol our scheme is applicable down to ensemble sizes of N = 20 atoms while it is applicable down to ensemble sizes of N = 4 (7) using an adaptive protocol. This make the scheme relevant for atomic clocks with trapped ions. The performance of the protocol can be improved further by considering squeezed states but this is beyond the scope of this article.
This supplemental material to our article "Efficient atomic clocks operated with several atomic ensembles" describes the details of our numerical simulations of atomic clocks locked to several atomic ensembles and the details of the modified adaptive protocol where the atoms are read out one at a time. Furthermore we show how the assumption of T 2 T 1 made in the article can be relaxed by applying a phase correction in the measurement of the second ensemble and how we find the limit of the free evolution time.

PHASE CORRECTIONS
The Ramsey sequence and the subsequent estimate of the drifted phase of the LO relative to an ensemble of atoms is described in the article. Eq. (1) -(3) in the article describes the frequency offset of the LO (δω(t)) between time t k−1 = (k − 1)T and t k = kT when the LO is locked to two ensembles. We will now generalize this formalism to the case where the LO is locked to m ensembles. Assuming that the j'th ensemble is operated with Ramsey time T j = n j−1 T 1 (n is an integer describing how many times the Ramsey time can be increased for each added ensemble) the frequency offset of the LO between time t k−1 = (k−1)T 1 and t k = kT 1 is where δω 0 (t k ) is the frequency fluctuations of the unlocked LO and ∆ω m (t sj n j−1 ) is the sum of the frequency corrections applied up to time t sj n j−1 from the j'th ensemble (s j is found by rounding (k −1)/n j−1 down to the nearest integer). Note that the index s j n j−1 should be read as s j times n j−1 describing the exponential increase in the Ramsey time each time another ensemble is used. The iterative equation for ∆ω j (t sj n j−1 ) is where δφ ej (t sj n j−1 ) is the estimated phase from the j'th ensemble at time t sj n j−1 and α sets the strength of the feedback loop (for now we assume equal strengths for all feedback loops). α determines how long time the clocks needs to run before the LO is effectively locked by the feedbacks (The LO is locked after a time ∼ T j /α). In the article we assumed that T 2 T 1 such that the feedback of the first ensemble had effectively locked the LO before the measurement of the second ensemble. In the general setup of locking the LO to m ensembles this corresponds to assuming that n 1. We will now show how we can apply a phase correction in the measurement of the j'th ensemble such that we can relax this assumption. The phase correction will compensate for the fact that the information from the last measurements on the first (j − 1) ensembles has not been fully exploited by the feedback loops before the measurement on the j'th ensemble. Note that we assume that the phase correction is only applied to the measurement and not to the LO.
The phase of the LO relative to the j'th ensemble just before the measurement at time t sj n j−1 is where φ s+(sj−1)n j−1 = T1 0 δω(t s+(sj−1)n j−1 − t )dt and Φ correct j sj n j−1 is the phase correction applied in the measurement of the j'th ensemble at time t sj n j−1 . Using Eq. (S12)-(S13) we can write where δφ s+(sj−1)n j−1 is the accumulated phase between time t (sj −1)n j−1 +s−1 and t (sj −1)n j−1 +s due to the frequency fluctuations of the unlocked LO and the feedback corrections applied up to time t (sj −1)n j−1 . For simplicity we have replaced the time dependence by an index such that δφ ei s n i−1 +(sj−1)n j−1 is the phase estimate from the i'th ensemble at time t s n i−1 +(sj −1)n j−1 . To fully exploit all information from the measurements on the first (j−1) ensembles between time t (sj −1)n j−1 and t sj n j−1 , we choose a phase correction of Φ correct j sj n j−1 = φ correct j,1 Here we assume that when two or more ensembles are to be read out at the same instant in time, ensembles with a shorter Ramsey time are measured before the ones with longer Ramsey times such that the results from these measurements can be used as a correction for the ensembles with a longer Ramsey time.
where φ s+(sj−1)n j−1 = T1 0 δω(t s+(sj −1)n j−1 − t )dt is the accumulated phase of the LO relative to the atoms in the first ensemble between times t s−1+(sj −1)n j−1 and t s+(sj −1)n j−1 . According to Eq. (S17), Φ j sj n j−1 is effectively the accumulated errors between the estimated phases and the actual phases for the (j − 1)'th ensemble between times t (sj −1)n j−1 and t sj n j−1 (this is seen by considering Eq. (S17) for j = 1, 2, . . .). Φ j sj n j−1 is thus the accumulated phase of the LO between time t (sj −1)n j−1 and t sj n j−1 minus the phase change already measured by the first j − 1 ensembles, i.e. it does not require further running time to incorporate the information acquired in the first measurements. As opposed to the feedback loop, which corrects for e.g. frequency drifts by changing the frequency of the LO, the phase corrections directly correct the phase. This phase locking ensures a more rapid convergence, which is important when we want to apply the LO to the subsequent ensembles. With the phase corrections Φ correct j sj n j−1 we can therefore relax the assumption of n 1. Since the noise of the LO is white after stabilizing it to the first ensemble the subsequent frequency corrections from the other ensembles could be replaced with merely phase corrections of the LO, which would simplify the above procedure by removing the need for phase corrections in the measurements. We have however chosen to consider frequency corrections to keep a consistent treatment of the feedback in all stages.
In our simulations we are simulating a clock with a LO locked to m ensembles running for a long but finite time. Similar to our description of the phase corrections Φ correct j sj n j−1 above there will be some remaining information from the last measurements, which have not been fully exploited by the feedback loops when our simulation stops. In our simulations we therefore include an additional phase correction Φ correct final to the LO after the final measurement. In principle the influence of the last few measurements could also have been reduced by running the simulation for a longer time but by doing the phase correction we reduce the required simulation time. With the phase correction the mean frequency offset of the LO (ω(τ )) after running the clock for a total time of τ = lT 1 is where φ s = T1 0 δω(t s − t )dt is the phase of the LO relative to the atoms at time t s and Φ correct final is the final phase correction of the LO. Using Eq. (S12)-(S13) and assuming that the j'th ensemble is operated with Ramsey time T j = n j−1 T 1 we can writeω(τ ) as: where δφ 0 s is the accumulated phase between time t s−1 and t s due to the frequency fluctuations of the unlocked LO and δφ ej s n j−1 is the estimated phase from the j'th ensemble at time t s n j−1 . We find that the ideal performance is With this phase correction the mean frequency offset is where T m is the Ramsey time of the m'th ensemble,Φ m s is the accumulated phase of the stabilized LO relative to the atoms in the m'th ensemble at time t sn m−1 and φ em s is the estimate of that phase. Eq. (S23) shows that the final phase correction effectively incorporate the remaining information from the measurements that has not yet been exploited by the feedback loop. Thus the mean frequency offset simply depends on how well we estimate the phase of the m'th ensemble and this last measurement is effectively a measurement of the accumulated errors of the phase estimates in the previous (m − 1) ensembles. We use Eq. (S23) to determine the stability of the clock, which is given by σ γ (τ ) = (δω(τ )/ω) 2 1/2 .

MODIFIED ADAPTIVE MEASUREMENTS
The adaptive measurement procedure presented in Ref. [30] can effectively resolve phases between ±π due to the inclusion of rotations of the atomic state. However the assumed dispersive interaction between the probe light and the atoms, which is considered in Ref. [30] would be very challenging to implement for small number of atoms. We have therefore modified the procedure such that the weak measurements are obtained by reading out individual atoms one at a time. Such a procedure is much easier to implement in e.g. ion clocks where individual addressing of ions is feasible. Based on the measurement record we estimate the phase using a Bayesian procedure similar to that of Ref. [31,32]. The subsequent feedback on the remaining atoms tries to rotate the atoms into phase with the LO as in Ref. [30].
We will now describe the details of the modified protocol. At the end of the Ramsey sequence, i.e. after the second π/2 pulse, an atom can either be detected in a spin up state s = 0 or a spin down state s = 1. The probability of measuring s = 0, 1 depends on the acquired phase δφ of the LO relative to the atoms during the free evolution in the following way According to Bayes theorem we can write the probability density of δφ conditioned on the measurement result as where P (s) = P (δφ)P (s|δφ)d(δφ) is the total probability of measuring s and P (δφ) is the a priori probability distribution of δφ, which is determined from characterizing the frequency fluctuations of the LO. We choose a Gaussian distribution with zero mean and variance γT as the a priori distribution. This a priori distribution is exact for a LO subject to white noise but a better a priori distribution could possibly be found for 1/f noise. We will however use this a priori distribution in both cases, which results in our modified protocol not being as effective for 1/f noise as for white noise in the LO. Note that this inaccuracy in our a priori distribution only introduce a less ideal performance in our phase estimate. In our numerical simulations we retain the full information about the phase evolution so that our suboptimal assumption about the a priori distribution only degrade the performance of the scheme. We estimate the phase based on the measurement as where P (S m |δφ, nm k=1 δφ e k ) is the probability of obtaining the measurement record S m conditioned on a drifted phase δφ with a total feedback of nm k=1 δφ e k applied during the measurements ( ni k=1 δφ e k is the feedback experienced by the i th atom before it is read out). Note that in general n i = i − 1, i.e. we might read out more than one atom before we do a phase estimate and a subsequent feedback on the remaining atoms. In our simulations we group the measurements such that we perform ∼ 4 feedbacks in total as in the protocol of Ref. [30] for uncorrelated atoms. The final phase estimate δφ e nm+1 after having read out m atoms is where we have used Bayes theorem as described above. All the phase estimates and the feedbacks are performed after the final π/2 pulse in the Ramsey sequence. Thus the final estimate of the drifted phase is δφ e = nm+1 k=1 δφ e k , i.e. the sum of the rotations performed during the measurements and the final phase estimate.

LIMIT OF THE FREE EVOLUTION TIME
As described in the beginning of the main article the stability of an atomic clock increases with the Ramsey time T . For clocks with trapped atoms T is essentially only limited by the decoherence in the system, which in practice often originates from the LO. This decoherence is what results in the phase offset between the LO and the atoms after the period of free evolution in the Ramsey sequence. For experiments and simulations running with fixed Ramsey times there is a finite probability that a phase jump occurs, which is large enough to spoil the feedback strategy used to lock the LO to the atomic transition. This can result in the feedback jumping to a state with a phase difference of 2π (so called fringe hops [33]) or the measurement strategy can fail leading to ambiguous results. For the conventional Ramsey protocol this happens for phase jumps larger than π/2 while the adaptive protocol breaks down for phase jumps larger than π [30]. The probability of these phase jumps increases with T since the width of the distribution of the phase jumps σ 2 δφ increases with T , e.g. for white noise σ 2 δφ = γT . One could include correction strategies for the errors introduced by these phase jumps (e.g. running an ensemble with different Ramsey times would correct for the fringe hops) but for simplicity we do not consider this in our simulations.
As shown in the main article the minimum number of atoms required in each ensemble in order to increase the Ramsey time by a factor of a at each level of our protocol is where β parameterize the maximal Ramsey time T max for a LO subject to white noise. Note that equivivalently β is the maximal width of the distribution of phase jumps allowed, i.e. σ 2 δφ,max = β. The requirement expressed in Eq. (S29) ensures that when we increase the Ramsey time of the next ensemble by a factor of a compared to the Ramsey time of the previous ensemble we still keep σ 2 δφ σ 2 δφ,max for the noise seen by the next ensemble. Note that minimum number of atoms required for our protocol to work is found by setting a = 2.
To determine β we simulate an atomic clock with only a single ensemble with N = 10 5 atoms and a LO subject to white noise characterized by a strength γ. Furthermore to determine β 1 (see Eq. (11) and above in the article) for a LO subject to 1/f noise we do a similar simulation but with a 1/f noise spectrum of the LO i.e. S(f ) = γ 2 /f where S(f ) denotes the noise spectrum and f is frequency. Note that we define the noise spectrum as S(f )δ(f +f ) = δω(f )δω(f ) where δω(f ) is the Fourier transform of the frequency fluctuations δω(t) of the LO. S(f ) is thus the frequency noise spectrum. In the simulations we do not simulate the full quantum evolution of the atomic state as we do for the simulations presented in the article. Instead we approximate the probability distributions ofĴ x,y,z with Gaussian distributions as in Ref. [30]. This Gaussian approximation is legitimate since N 1. Furthermore it is desirable to have a weak feedback strength α for white noise in the unlocked LO since a strong feedback increases the width of the phase noise for the locked LO. For white noise in the unlocked LO we therefore simulate the limit where α 1 such that the phases are uncorrelated. For 1/f noise we use a feedback strength of α = 0.5 since a stronger feedback is desirable to lock the LO more rapidly. The high number of atoms ensures that when we increase the Ramsey time T of the clock we see the onset of the phase jumps as an abrupt break down, which is not blurred by the atomic noise in our phase estimates. In our simulation the clock is running for a time τ = 10 6 T , i.e. for l = 10 6 steps of T (for 1/f noise we average over 100 independent runs with 10 4 steps of T ). The onset of the break down will in principle have a weak (logarithmic) dependence on the number of steps that we simulate, which we do not expect to change our results significantly [30]. Fig. S4 shows the result of our simulations. • is the adaptive protocol of Ref. [30] and is the conventional Ramsey protocol. The adaptive protocol allows for γT ∼ 0.3 and 0.2 for white and 1/f -noise respectively while the conventional protocol only allows for γT ∼ 0.1 for both white and 1/f noise.
The adaptive protocol that we have used here is that of Ref. [30] since the modified adaptive protocol will lead to similar results for large atom numbers where the break down is most apparent but is harder to simulate. Fig. S4 shows that the conventional protocol allows for β ∼ 0.1 for white noise and that β 1 ∼ 0.1 for 1/f noise in the unlocked LO while the adaptive protocol allows for β ∼ 0.3 and β 1 ∼ 0.2 for 1/f noise. With a = 2 in Eq. (S29) the minimum number of atoms required for the protocol of locking to several ensembles to work is thus N min = 20 for conventional Ramsey strategy while the adaptive strategy can extend the applicability down to N min = 7 atoms. We expect β of the modified adaptive protocol to be identical to that of the adaptive protocol in Ref. [30] since both rely on the rotation of the atomic state to resolve phases between ±π. In our numerical simulations of the modified protocol we have therefore set β ∼ 0.3 and β 1 ∼ 0.2 for 1/f noise. Note that in our simulations of the full protocol of locking an atomic clock to several atomic ensembles, we still include the possibility of disruptive phase jumps. However imposing the limits on β (β 1 ) identified from Fig. S4 for all steps in the protocol ensures that we do not see any significant effect of them. The probability to have disruptive phase jumps for the duration of the simulations is simply negligible, i.e, the probability for phase jumps large enough to spoil the feedback strategy in a Ramsey sequence is well below 10 6 . Note that the feedback strength is set to α = 0.01 for white noise and α = 0.5 for 1/f noise in the LO in our simulations of the full protocol. The strong feedback strength of α = 0.5 is only used for the first ensemble for 1/f noise since the noise seen by the other ensembles is white and a weaker feedback strength is thus desirable.
In our above estimates of N min we have assumed that the adaptive protocol leads to a stability at the SQL. This is only true for large N and there are corrections to this for small N . From our simulations we find that with the modified adaptive protocol, and white noise in the unlocked LO, the feedback of the first ensemble stabilizes the LO to a white noise floor below 1/N T 1,max (see Eq. (8)), i.e. better than what we expect from the SQL. We can thus extend the applicability of the protocol to atom numbers below N = 7. As shown in Fig. 3 in the main article we find that we can go as low as 4 atoms and still have the feedback of first ensemble lowering the noise floor of the LO by a factor of two such that the second ensemble can be operated with twice as long a Ramsey time while keeping the width of the phase noise below β = 0.3. For 1/f noise the minimum number of atoms is still N = 7. This slightly worse performance is a result of the shorter required Ramsey time for the first ensemble (β 1 ∼ 0.2) and the incomplete characterization of the a priori probability distribution in the Bayesian approach (see the section "Modified adaptive measurements" above). The latter results in the feedback only stabilizing the LO to the SQL of ∼ 1/N T 1,max also for small N and the minimum number of atoms is thus 7 as seen from Eq. (S29) with a = 2. Note, however, that in principle it is only in the first ensemble that we need more atoms than for white noise since the feedback of the first ensemble will have whitened the noise affecting the subsequent ensembles. The modified adaptive protocol is thus more effective for the subsequent ensembles.