Cavity-enhanced magnetometer with a spinor Bose-Einstein condensate

We propose a novel type of composite light-matter magnetometer based on a transversely driven multi-component Bose-Einstein condensate coupled to two distinct electromagnetic modes of a linear cavity. Above the critical pump strength, the change of the population imbalance of the condensate caused by an external magnetic field entails the change of relative photon number of the two cavity modes. Monitoring the cavity output fields thus allows for nondestructive measurement of the magnetic field in real time. We show that the sensitivity of the proposed magnetometer exhibits Heisenberg-like scaling with respect to the atom number. For state-of-the-art experimental parameters, we calculate the lower bound on the sensitivity of such a magnetometer to be of the order of fT/$\sqrt{\mathrm{Hz}}$--pT/$\sqrt{\mathrm{Hz}}$ for a condensate of $10^4$ atoms with coherence times of the order of several ms.


Introduction
Being able to measure the direction, strength, and temporospatial dependence of magnetic fields with high accuracy has applications in various scientific fields, ranging from physics [1,2] and geology [3] to biology and medicine [4,5]. High-precision magnetometers can be used to test fundamental physical theories [6,7,8,9] and explore the boundaries of quantum metrology [10,11,12,13,14]. Until very recently, the progress in magnetometry was driven by superconducting quantum interference devices, which are based on superconducting loops containing Josephson junctions [15]. However, the technological developments in cooling, trapping, and manipulating ultracold atoms have led to the development of a next generation of atomic magnetometers [16,17,18,19,20,21,22,23,24,25,26,27]. Among them, Faraday-rotation magnetometers [28] have attracted a great deal of interest, as due to the possibility of increased noise suppression by creating non-classical states of light and atoms, they can operate on the verge or even beyond the standard quantum limit [29,30]. Using anti-relaxation coatings [31,20], optical multi-pass cells [24], and, finally, spin-exchange relaxation-free protocols [16,17] has enabled to reach sensitivities as low as 160 aT/ √ Hz [32]. Other state-of-the-art magnetometers rely on magnetostrictive optomechanical cavities, which can reach a peak magnetic field sensitivity of 400 nT/ √ Hz [33], and nitrogen-vacancy centers in diamonds [34,35,36,37,38,39,40,41], which can exhibit sensitivities up to the order of fT/ √ Hz. In this work, we propose an alternative approach to measure magnetic field strengths based on light-matter interactions in an optical cavity [42,43,44]. In contrast to free space, where the back-action of the particles onto the trapping laser light is negligible, in optical cavities the optical dipole force on the atoms together with the < l a t e x i t s h a 1 _ b a s e 6 4 = " o L e g Y r v + z l f l h R s n a T B F M Z A a S G s = " > A A A B 7 3 i c d V D J S g N B E K 1 x j X G L e v T S G A R P w 4 y 4 J L e A F 2 9 G M A s k Q + j p 1 C R N u m f G 7 h 4 h h P y E F w + K e P V 3 v P k 3 d h b B 9 U H B 4 7 0 q q u q F q e D a e N 6 7 s 7 C 4 t L y y m l v L r 2 9 s b m 0 X d n b r O s k U w x p L R K K a I d U o e I w 1 w 4 3 A Z q q Q y l B g I x x c T P z G H S r N k / j G D F M M J O 3 F P O K M G i s 1 2 1 c S e 7 T j d w p F z y 1 7 f v n M J 7 + J 7 3 p T F G G O a q f w 1 u 4 m L J M Y G y a o 1 i 3 f S 0 0 w o s p w J n C c b 2 c a U 8 o G t I c t S 2 M q U Q e j 6 b 1 j c m i V L o k S Z S s 2 Z K p + n R h R q f V Q h r Z T U t P X P 7 2 J + J f X y k x U C k Y 8 T j O D M Z s t i j J B T E I m z 5 M u V 8 i M G F p C m e L 2 V s L 6 V F F m b E R 5 G 8 L n p + R / U j 9 2 / V P X u z 4 p V k r z O H K w D w d w B D 6 c Q w U u o Q o 1 Y C D g H h 7 h y b l 1 H p x n 5 2 X W u u D M Z / b g G 5 z X D / e P j + c = < / l a t e x i t > m R m l P B Z u V + q l h C 6 I S M W M / Q i I R M e d n 8 3 h k 6 N s o Q B b E 0 F W k 0 V 7 9 P Z C R U a h r 6 p j M k e q x + e 7 n 4 l 9 d L d e B 6 G Y + S V L O I L h Y F q U A 6 R v n z a M g l o 1 p M D S F U c n M r o m M i C d U m o r I J 4 e t T 9 D 9 p 1 2 z n z M Y 3 9 W r D L e I o w S E c w Q k 4 c A E N u I Y m t I C C g A d 4 g m f r z n q 0 X q z X R e u S V c w c w A 9 Y b 5 8 A J Y / r < / l a t e x i t > ↵ 2 < l a t e x i t s h a 1 _ b a s e 6 4 = " M F l Z x r k Z l z k 1 c e + f J e X X e F q 0 5 J 5 s 5 h B 9 w 3 r 8 A Z D q P h A = = < / l a t e x i t > a 1 < l a t e x i t s h a 1 _ b a s e 6 4 = " Q Z v 4 a e i 7 t 9 q l e S 5 V b 2 X C a c r D s h I h l D T 6 U m a 9 C x 2 9 w h h y E 9 4 8 a C I V 3 / H m 3 9 j Z x F U 9 E H B 4 7 0 q q u r 5 i e B K 2 / a H l V t b 3 9 j c y m 8 X d n b 3 9 g + K h 0 c d F a e S s j a N R S y 7 P i o m e M T a m m v B u o l k G P q C 3 f q T y 7 l / e 8 + k 4 n F 0 o 6 c J 8 0 I c R T z g F L W R u n 0 U y R g H z q B Y s s t 2 3 a 1 V K 8 S Q B Q x x X d e u N Y i z U k q w Q m t Q f O 8 P Y 5 q G L N J U o F I 9 x 0 6 0 l 6 H U n A o 2 K / R T x R K k E x y x n q E R h k x 5 2 e L e G T k z y p A E s T Q V a b J Q v 0 9 k G C o 1 D X 3 T G a I e q 9 / e X P z L 6 6 U 6 a H g Z j 5 J U s 4 g u F w W p I D o m 8 + f J k E t G t Z g a g l R y c y u h Y 5 R I t Y m o Y E L 4 + p T 8 T z o X Z a d a t q 8 r p W Z j F U c e T u A U z s G B O j T h C l r Q B g o C H u A J n q 0 7 6 9 F 6 s V 6 X r T l r N X M M P 2 C 9 f Q I b E I / + < / l a t e x i t > m a u / J 3 I a a z 2 J A 9 s Z U z P S y 9 5 M / M / r Z S a s + z m X a W Z Q s s W i M B P E J G T 2 P x l y h c y I i S W U K W 5 v J W x E F W X G p l S 2 I X j L L 6 + S 9 m X N u 6 6 Q X c d e L n p A I 5 m v 3 y V 2 8 g a Z a g M J Q T r Q P f S 0 0 4 J c o w y n F W 6 m U a U 0 L H Z I i B p Y I k q M P p 4 u S Z e 2 G V g R t L Z U s Y d 6 H + n p i S R O t J E t n O h J i R X v X m 4 n 9 e k J m 4 H k 6 Z S D O D g i 4 X x R l 3 j X T n / 7 s D p p A a P r G E U M X s r S 4 d E U W o s S m V b A j + 6 s v r p F 2 r + t d V 7 / 6 q 0 q j n c R T h D M 7 h E n y 4 g Q b c Q R N a Q E H C M 7 z C m 2 O c F + f d + V i 2 F p x 8 5 h T + w P n 8 A T E k k S k = < / l a t e x i t > |e 2 i < l a t e x i t s h a 1 _ b a s e 6 4 = " 8 6 K e v W p 3 x m t n o l Q Q e q 1 X g D k L r 6 4 = " > A A A B 8 n i c b V B N S 8 N A E N 3 U r 1 q / q h 6 9 L B b B U 0 m K Y o 8 F L x 4 r 2 A 9 I Q 9 l s N + n S z W 7 Y n Q g l 9 m d 4 8 a C I V 3  Figure 1. Schematic of the system. The atoms are strongly confined along the axis of an optical cavity and driven by two off-resonant transverse lasers with Rabi frequencies Ω j inducing internal atomic transitions |g j ↔ |e j . These transitions are also strongly coupled to two distinct standing-wave cavity modesâ j with coupling strength G j . The atoms can experience a Zeeman shift due to a static magnetic field B and/or a timedependent magnetic field B ⊥ cos(ωt), with the latter inducing transitions |g 1 ↔ |g 2 .
atomic back-action onto the light field give rise to complex nonlinear coupled dynamics. Motivated by recent progress in strongly coupling ultracold atoms to high-Q optical cavities [45,46,47,48,49,50,51,52,53,54], we propose to harness these light-matter interactions as a sensitive probe for magnetic fields [55,56]. The considered setup consists of a one-dimensional spinor (i.e., two-component) Bose-Einstein condensate (BEC) in an external (static or time-dependent) magnetic field, transversely driven by two pump lasers and dispersively coupled to two distinct electromagnetic modes of a linear cavity as depicted in Fig. 1 [57,58]. The relative occupation of the cavity modes depends on the state of the condensate, which in turn is affected by the presence of the external magnetic field. Measuring the cavity-output fields, which can be done nondestructively, then allows for real-time and continuous measurements of the magnetic field. We find that the lower bound on the sensitivity of measuring the magnetic field is on the order of fT/ √ Hz-pT/ √ Hz for typical state-of-the-art experimental parameters. Although we consider this physical setting in the context of magnetometry, it can be easily extended to measurements of any field or force that can couple the spinor components of the BEC, as well as real-time monitoring of the population imbalance of a spinor condensate.

Model
The condensate we consider consists of N four-level atoms with mass M trapped along the axis of a two-mode standing-wave linear cavity by a tightly confining potential along the transverse directions. The atoms have two hyperfine ground states which are coherently driven from the transverse direction by two off-resonant external pump lasers, as depicted in Fig. 1, which induce transitions |g j ↔ |e j (j = 1, 2) with the Rabi frequency Ω j . The transition |g j ↔ |e j is also coupled to a cavity modeâ j with the mode function cos(k c j x) and coupling strength G j (x) = G j cos(k c j x), where G j is the maximum single atom-photon coupling rate. The pump and cavity frequencies, respectively, ω p j and ω c j = ck c j = 2πc/λ c j are assumed to be near resonant with each other, but far-red detuned with respect to the atomic frequencies ω j . The relative energy between the two lowest lying states can be changed with a static magnetic field B that induces the Zeeman energy difference γB , where γ is the gyromagnetic ratio. These states can also be coupled with an ac magnetic field B ⊥ cos ωt, introducing an (ac Zeeman) energy shift ω, and inducing magnetic dipole transition between |g 1 and |g 2 with a magnetic Raman frequency Ω = γB ⊥ .
In the dispersive regime |∆ j | ≡ |ω p j − ω j | {Ω j ; G j }, in which the atomic excited states |e j quickly reach a steady state, their dynamics can be adiabatically eliminated (see Appendix A). As a result, in the rotating frame of the pumping lasers, the effective Hamiltonian for the atoms in the ground states and the cavity fields becomeŝ whereΨ = (ψ 1 ,ψ 2 ) is the bosonic spinor field annihilation operator andĤ 0 is the single-particle Hamiltonian densitŷ (2.2) Here,V j (x) = U jâ † jâ j cos 2 (k c j x)+ η j (â j +â † j ) cos(k c j x) is the dynamical cavity potential with U j = G 2 j /∆ j being the maximum depth of the optical potential per photon due to the absorption and emission of cavity photons. The maximum depth of the optical potentials due to the redistribution of photons between the pump lasers and the cavity fields are given by η j = G j Ω j /∆ j , and δ = Ω 2 2 /∆ 2 − Ω 2 1 /∆ 1 + ω 12 is the Starkshifted two-photon detuning, with ω 12 being the bare energy difference between |g 1 and |g 2 . For the sake of clarity, in remainder of this work we will focus on the balanced condition, i.e., We assume that the atom-atom interactions are negligible with respect to the cavity-mediated interactions, which is quantitatively a good approximation for spinor-BEC-cavity-QED experiments [52,49].
In the mean-field approximation, the system is the described by a set of four coupled equations for the cavity-field amplitudes â j (t) = α j (t) and the atomic condensate wave functions ψ j (x, t) = ψ j (x, t), given by where V j (x) = V j (x) , and cos 2 (k c x) j and cos(k c x) j are spatial overlaps of cos 2 (k c x) and cos(k c x) with the corresponding atomic density |ψ j (x)| 2 , respectively. Here we have introduced the cavity-photon loss rate κ which signifies the open nature of the system and is a crucial component in the model [51]. It provides a way for the system to reach a steady state and allows for non-destructive monitoring of this state. It can be shown that this system can also be described by two coupled Dicke models [59], whose two low-lying polaritons are coupled by an external field [60,61]. Since the effective spin formed by these two polaritons is not coupled to the cavity field (no optical |g 1 ↔ |g 2 transition), the only mechanism leading to the relaxation of the effective spin will be spontaneous emission, allowing for long coherence times and consequently long measurement times [62].

Magnetometry
We first consider a Ramsey scheme, for which we have {Ω, ω} = 0 [63]. The condensate is initially prepared in an equal superposition state (δN ≡ N 1 − N 2 = 0 with N j = |ψ j (x, t)| 2 dx), and we subsequently turn on the static magnetic field B which induces a Zeeman splitting γB of the energy levels. In this static magnetic field the two spinor components acquire a relative phase φ = τ γB ‡, where τ is the interrogation time. After switching off the static magnetic field, a π/2 pulse is applied which converts the relative phase into a relative atom number. This can be easily seen if we introduce total pseudo-spin operators defined asŝ = Ψ † σΨ dr, where σ is the vector of Pauli matrices. In particular,ŝ z = N 1 − N 2 = δN corresponds to the population imbalance. Any unitary transformation of such a pseudo-spin can be depicted as a rotation exp(−iφŝ n /2) on the generalized Bloch sphere, where n and φ are the rotation axis and rotation angle, respectively. Introducing a pseudo-spin state |ϑ, ϕ ≡ √ N (e iϕ cos(ϑ/2)|g 1 + sin(ϑ/2)|g 2 ) = Ψ dx, where ϑ and ϕ are the azimuthal and polar angles, the conversion of the relative phase to the relative atom number ( ϑ, ϕ|ŝ z |ϑ, ϕ = N cos ϑ) can be conveniently expressed by e −iŝxπ/4 |π/2, φ = |π/2 − φ, 0 . We note that in the superradiant regime where the strength of the effective cavity pump η 0 is above a certain threshold, and which is the regime we focus on here, the average number of photons |α j | 2 in cavity mode j is proportional to the atom number N j in pseudo-spin state j; cf. equation (2.3). By measuring the relative photon number |α 1 (φ)| 2 − |α 2 (φ)| 2 ≡ δn during or after a time interval t, one can then estimate the ‡ For clarity, we have moved to the reference frame rotating with frequency δ, so the accumulated phase is not φ = τ (γB + δ), but φ = τ γB . relative atom number δN and thus φ and the strength of the static magnetic field.
To measure an oscillating magnetic field B ⊥ cos ωt, one can employ a Rabi scheme [64]. In the rotating frame of the oscillating magnetic field and in the presence of a small bias field, B (fixing the axis of quantization), the relative energy between the two ground states is shifted by an amount ω. The oscillating field induces Rabi oscillations between the two components of the BEC with a frequency Ω = γB ⊥ [see equation (2.2)], and for the resonant case −γB − ω = δ, the spinor components will oscillate without acquiring any relative phase. In this case the entire information about the amplitude of the magnetic field B ⊥ is encoded in the period of the spinor oscillations, i.e., the oscillations of the relative number of atoms. Since the photon scattering probability depends on the number of atoms, the spinor oscillations directly lead to oscillations of the cavity mode amplitudes with frequency Ω as well. In Fig. 2 we show the normalized relative photon number (|α 1 | 2 −|α 2 | 2 )/N as a function of (unitless) time Ωt and (unitless) frequency Ω/∆ c . In this graph one can clearly distinguish three distinct regimes of photon scattering. When Ω < |∆ c |, the optical potential adiabatically follows the atomic density oscillations. For Ω ∼ |∆ c |, the photon dynamics cannot completely follow the BEC population-imbalance oscillations, introducing a time delay between the BEC population-imbalance and cavity field-amplitude oscillations. Surprisingly, the number of scattered photons increases in this regime, leading to enhanced sensitivity with respect to the adiabatic case. Finally, when Ω > |∆ c |, the photon scattering cannot keep up with the Rabi oscillations of the condensate, introducing thus a constant π phase shift between atomic and photonic oscillations. Hence, the number of scattered photons decreases until the relative atom number oscillations are so fast that they no longer affect scattering of photons (see Appendix B for the details).

Measurement back-action
Even though our system allows for non-destructive measurement, an inevitable consequence of any measurement is the measurement back-action. This generally adds noise to the system and thus to the measurement outcomes themselves, which reduces the estimation precision [65]. In general, the measurement-back action is a stochastic process and, in the limit of continuous measurement, the evolution of the system statê ρ is governed by the stochastic master equation [66] Here we have defined the Lindblad superoperator the measurement superoperator the Wiener process increment dW , and a measurement efficiency ≤ 1. The Lindblad superoperator describes the disturbance of the system due to the measurement, and the measurement superoperator represents the gain of information resulting from a measurement. For an arbitrary operatorÔ, we can combine the stochastic master equation and d Ô = Tr[Ô, dρ] to obtain the equation of motion for the expectation value ofÔ as For a homodyne detection scheme, which can be used to measure the average number of photons [67], we haveĉ = √ 2κâ, and if we set the measurement efficiency equal to zero, it is straightforward to re-derive equation (2.3). Since the atomic field operatorsψ j commute with the cavity field operatorsâ j , a non-zero measurement efficiency modifies the mean-field equations for the cavity fields as where ξ(t) is white noise. In other words, in the mean-field limit the measurement backaction adds a stochastic noise to the cavity fields. This in turn leads to the deformation of the optical potentials inside the cavity and eventually to heating and loss of atoms.
In the case of the Ramsey scheme, this can be counteracted by a feedback loop [53] or included in the process of calibration. In the case of the Rabi scheme, the effect of the measurement back-action should be more pronounced as the number of scattered photons is a function of time. In order to obtain the average relative photon number, one would therefore have to repeat the experiment many times. Because the fluctuations of the optical potentials do not change the relative number of atoms in the condensate, our scheme realizes a non-demolition quantum measurement of condensate state. This can be seen in Fig. 3, where we have plotted the averaged and single quantum trajectories for different noise realizations of the relative average number of photons as a function of Ω for = 0.5.

Cavity-field measurement and sensitivity
After carrying out the full Ramsey scheme and reaching a stationary state, the relative average number of photons δn is measured for a time interval t and the value of the magnetic field B is estimated from the collected data gathered by performing enough measurements to average out the effect of noise. The relative average number of detected photons during t will be where |α 0 | 2 is the maximum number of scattered photons in a single mode. Subsequently, the value of φ is estimated with the sensitivity given by the error propagation formula The effect of continuous measurement back-action on the cavity-field dynamics. Here we set the measurement efficiency equal to 50% ( = 0.5). Although the measurement back-action strongly affects single quantum trajectories (right), by averaging over many independent trajectories (for the calculations we used 100 trajectories) the noise averages out (left); cf. Fig. 2. The parameters for this simulation are the same as in Fig. 2.
For classical fields, the uncertainty of the relative average number of photons can easily be estimated as ∆ [δn(φ)] ≈ √ κt|α 0 |, and the sensitivity for measuring B becomes In the Rabi scheme case, even though the qualitative behavior of cavity fields is different in each regime of parameters (see Appendix B), the relative average number of photons inside the cavity oscillates with frequency Ω as illustrated in Fig. 2. Therefore, measuring the cavity output fields should allow for nondestructive measurement of Ω. We assume that the cavity field is detected over short time intervals δt during which the cavity output field is approximately constant and the measurement is repeated enough times to smooth out the fluctuations of the field. Then the instantaneous relative average number of detected photons at time t is δn(t) ≈ κ t+δt/2 t−δt/2 |α 0 | 2 cos Ωt dt ≈ κδt|α 0 | 2 sin Ωt. (5.4) Again, by comparing the measured data with the model in equation (5.4), the value of the magnetic field B ⊥ can be estimated with the uncertainty given by the error propagation formula It is also instructive to refer to the quantum theory of estimation and calculate the quantum Fisher information, F q , which sets a lower bound on the sensitivity through the quantum Cramér-Rao bound as ∆B ≥ 1/ F q [68,69]. For pure states the Fisher information is defined as F q = 4(∆ĥ) withĥ = i[∂ BÛ ]Û † being the generator of an infinitesimal change along a trajectory parametrized by B. From the viewpoint of the relative average number of cavity photonsâ = (â 1 −â 2 )/2 and in the reference frame in which α 1 , α 2 ∈ §, the dynamics will be governed by the displacement operator where α = α * ≡ α(t) depends on the regime of photon scattering. The generator of the infinitesimal changeĥ can be easily calculated aŝ and from this the quantum Fisher information can be directly determined to be given by It is easy to show that for both, the Ramsey scheme [α ≈ |α 0 | √ κt cos γB τ ] and the Rabi scheme [α ≈ |α 0 | √ κδt cos(γB ⊥ t)], the quantum Cramér-Rao bound yields the same limitation on the sensitivity as equations (5.3) and (5.5).
Finally, let us make a comment concerning the average number of photons. The average number of cavity photons can be calculated using the steady-state solution. Deep in the self-ordered (superradiant) regime [70], we get where ∆ c − N U 0 is the dispersively shifted cavity detuning. Therefore, for negligible dispersive shift ∆ c − N U 0 ≈ ∆ c , the average number of photons will be |α 0 | 2 ∼ N 2 η 2 /(∆ 2 c + κ 2 ), and from the viewpoint of the atoms, we obtain a Heisenberg-like scaling of the sensitivity similarly to what was found in [71]. In two-mode systems with a fixed number of particles, for example a collection of N interacting two-level atoms, the Heisenberg scaling means that the sensitivity scales like ∼ 1/N . In the systems composed of solely atoms this can only be achieved with the use of entanglement. The achieved ∼ 1/N scaling in our proposal, however, has its origins not in entanglement but in superradiance, which is a consequence of strong light-matter interaction. The information about the magnetic field is encoded linearly into the state of the atoms which are not entangled. Performing thus an optimal measurement directly on such atoms would give rise maximally to the standard quantum limit ∼ 1/ √ N . That said, due to the strong coupling of the atoms to the cavity modes, the information about the magnetic field is also effectively imprinted into the state of the cavity fields. Since the average number of photons in the superradiant regime is proportional to the number of atoms squared n ss ∼ N 2 , measuring the cavity fields gives rise to a 1/N scaling of the sensitivity. Because the origin of this scaling is not entanglement, we call it Heisenberg-like scaling.
It is worth noting that since in the non-superradiant regime no photons is scattered into the cavity modes, the presented scheme requires to operate in the superradiant phase.

Implementation and estimated sensitivity
This magnetometer proposal is based on existing experimental technologies for quantumgas-cavity systems [48,49,51,52,53]. For instance, the spinor BEC could be realized by coupling two internal states of 87 Rb, |F, m f = |1, −1 ≡ | ↓ and |F, m f = |2, −2 ≡ | ↑ to the cavity modes, similarly as in Refs. [49,52], or by making use of the F = 1 total angular momentum manifold of a 87 Rb by preparing the gas in the mixture of m f = +1 and m f = −1 sub-levels as in Ref. [48]. Coupling the spins to two different cavity modes could be realized by using two orthogonal polarizations [50] or two modes with different frequencies [72]. We, therefore, attempt in the following to estimate the sensitivity lower bound by using state-of-the-art experimental parameters from recent spinor-BEC-cavity experiments [48,51]. Assuming that one performs m = T /t s experiments with T being the total time of the experiment and t s being the time of a single experiment which may consist of many measurements, for Ramsey scheme we obtain and for Rabi scheme we find Assuming 87 Rb atoms with a gyromagnetic ratio of γ = 2π × 7 Hz/nT, an experimental cycle time of the order of 1s, a coherence time of the order of 10ms, and ideal photon detectors, the lower bound on the sensitivity of the cavity-based magnetometer containing around 10 4 87 Rb atoms would be ∆B √ T ∼ fT/ √ Hz for a Ramsey scheme and ∆B ⊥ √ T ∼ 10 pT/ √ Hz for the Rabi scheme. However, under realistic conditions, i.e., taking into account experimental and measurement back-action noise, limitations associated with heating the condensate by strong intra-cavity lattices [53], and dispersion of the cavity deforming the interference lattice, a realistic sensitivity will be much lower. Taking the average number of photons from [52] the sensitivity of the proposed magnetometer would rather be on the order of ∼ 10 pT/ √ Hz for the Ramsey scheme and ∼ 100 nT/ √ Hz for the Rabi scheme, which is comparable with other state-of-the-art magnetometers. The proposed magnetometer should be also possible to be implemented in ensembles of thermal atoms which realize two coupled Dicke systems [55,56,50].
In principle, one can also loosen the balanced condition, and consider a limiting case where one measures only a single mode of the cavity,â j . In this case the intra-cavity field amplitude will behave as Inserting this expression into the formula for the quantum Fisher information (5.8), it is straightforward to show that the lower bound of the sensitivity will be two times higher than the bounds from equations (5.3) and (5.5).

Outlook and conclusions
We have presented an experimentally realistic scheme for the highly-precise measurement of a magnetic field strength based on light-matter interaction inside a two-mode linear cavity. On the one hand, the back-action of the atoms onto the light fields transfers the information about the coupling to the cavity field, and on the other hand, the cavity fields help to trap the atoms in many lattice sites. Importantly this also allows to non-destructively monitor the dynamics of the system. Since the proposed magnetometer operates in the superradiant regime, it, therefore, exhibits a Heisenberglike scaling of the sensitivity. We have found that the lower bound on the sensitivity of such a magnetometer is on the order of ∼ fT/ √ Hz for a Ramsey scheme and ∼ 10 pT/ √ Hz for the Rabi scheme, assuming total measurement times on the order of 1 s and condensates with about 10 4 atoms. The concept of the proposed magnetometer is built upon the fact that a change of the relative occupation of the spinor components leads to a change of the relative average number of photons which can be measured through the cavity-output fields. Although we have shown how to exploit the light-matter interaction for magnetometry, the scope of this physical setting can be easily extended to measure any type of field or force that can modify or couple spinor components of the BEC. From a different perspective, the proposed setup allows to monitor the state and dynamics of a spinor BEC in real time. An interesting extension would be to additionally take advantage of light-matter interaction to create non-classical states of matter and/or light and further increase the sensitivity of the proposed machine [10,73,74,75,76]. One can easily imagine that number squeezing of the cavity fields would reduce the sensitivity below the photon shot-noise limit. Unfortunately, a full quantum treatment of such a system would require gargantuan computational power and, except for few body problems and semi-classical models, it is currently beyond the scope of theoretical investigations [77]. ∆ c 1 = ∆ c 2 ≡ ∆ c , ω c 1 = ω c 2 = ω c , and η 1 = η 2 ≡ η 0 .) i ∂ ∂t α j = −∆ c + U 0 cos 2 (k c x) j − iκ α j + η 0 cos(k c x) j . (B.1) Assuming that we are deep in the self-ordered regime, the two integrals for spinor component j = 1 read cos(k c x) 1 = cos 2 (φ/2) ψ † 1 (x) cos(k c x)ψ 1 (x) dx = −N cos 2 (φ/2), (B.2) cos 2 (k c x) 1 = cos 2 (φ/2) ψ † 1 (x) cos 2 (k c x)ψ 1 (x) dx = N cos 2 (φ/2), (B.3) and for j = 2 cos(k c x) 2 = sin 2 (φ/2) ψ † 2 (x) cos(k c x)ψ 2 (x) dx = −N sin 2 (φ/2), (B.4) cos 2 (k c x) 2 = sin 2 (φ/2) ψ † 2 (x) cos 2 (k c x)ψ 2 (x) dx = N sin 2 (φ/2), (B.5) where φ defines the population imbalance δN = N cos 2 (φ/2) − N sin 2 (φ/2) = N cos φ. In order to come up with an approximate solution, we assume that the dispersive shift is negligible with respect to the cavity detuning ∆ c − N U 0 ≈ ∆ c , so that we get i ∂ ∂t α 1 ≈ −(iκ + ∆ c )α 1 − N η 0 cos 2 (Ωt/2), (B.11) i ∂ ∂t α 2 ≈ −(iκ + ∆ c )α 2 − N η 0 sin 2 (Ωt/2), (B.12) with steady-state solutions (note that the transient solutions can be also calculated analytically, however, for the sake of simplicity, we only provide steady-state solutions) given by Let us now consider briefly three cases from the main text. Except for the magnetic resonant case |∆ c | ∼ Ω, the contribution from the cos(Ωt) will be dominant. In the adiabatic case |∆ c | > Ω, it can be easily shown that δn ≈ N 2 η 2 0 cos(Ωt) ∆ 2 c + κ 2 , which is the steady-state solution from equation (5.9) multiplied by an oscillatory term.
In the second limiting case |∆ c | < Ω, the term multiplying the cos(Ωt) will change the sign to negative as now ∆ 4 c − ∆ 2 c Ω 2 < 0. This change of the sign is responsible for the π/Ω shift between the Rabi oscillations and oscillations of δn (see figure 2). Also, as the denominator grows faster with Ω than the nominator (δn ∼ 1/Ω 2 ), the amplitude of photon oscillations will experience a decrease with respect to the adiabatic case. Finally in the magnetic resonant case |∆ c | ∼ Ω, as ∆ 4 c −∆ 2 c Ω 2 ≈ 0, the cos(Ωt) will be negligible with respect to the sin(Ωt) which explains the π/2Ω shift in the phase seen in figure 2. Now, as the term in the denominator ∆ c − Ω vanishes, the oscillations of the photon number will behave as δn ∼ Ω which explains the initial increase of the amplitude of oscillations visible in figure 2.
Note that we have not neglected the dispersive shift in the numerical simulations in the main text. However, the numerical simulations should not differ too much from the solutions above since the maximal value of dispersive shift N U 0 is of the order of ∼ ω r which is much smaller than other parameters (∆ c , η 0 , κ) = (−3300, 300, 300)ω r . The only apparent effect that the approximate solutions are not able to predict is the long-time damping of the relative photon-number oscillations in the magnetic resonant case.