Stability of a Magnetically Levitated Nanomagnet in Vacuum: Effects of Gas and Magnetization Damping

In the absence of dissipation a non-rotating magnetic nanoparticle can be stably levitated in a static magnetic field as a consequence of the spin origin of its magnetization. Here we study the effects of dissipation on the stability of the system, considering the interaction with the background gas and the intrinsic Gilbert damping of magnetization dynamics. At large applied magnetic fields we identify magnetization switching induced by Gilbert damping as the key limiting factor for stable levitation. At low applied magnetic fields and for small particle dimensions magnetization switching is prevented due to the strong coupling of rotation and magnetization dynamics, and the stability is mainly limited by the gas-induced dissipation. In the latter case, high vacuum should be sufficient to extend stable levitation over experimentally relevant timescales. Our results demonstrate the possibility to experimentally observe the phenomenon of quantum spin stabilized magnetic levitation.

In the absence of dissipation a non-rotating magnetic nanoparticle can be stably levitated in a static magnetic field as a consequence of the spin origin of its magnetization. Here we study the effects of dissipation on the stability of the system, considering the interaction with the background gas and the intrinsic Gilbert damping of magnetization dynamics. At large applied magnetic fields we identify magnetization switching induced by Gilbert damping as the key limiting factor for stable levitation. At low applied magnetic fields and for small particle dimensions magnetization switching is prevented due to the strong coupling of rotation and magnetization dynamics, and the stability is mainly limited by the gas-induced dissipation. In the latter case, high vacuum should be sufficient to extend stable levitation over experimentally relevant timescales. Our results demonstrate the possibility to experimentally observe the phenomenon of quantum spin stabilized magnetic levitation.

I. INTRODUCTION
The Einstein-de Haas [1,2] and Barnett effects [3] are macroscopic manifestations of the internal angular momentum origin of magnetization: a change in the magnetization causes a change in the mechanical rotation and conversely. Because of the reduced moment of inertia of levitated nano-to microscale particles, these effects play a dominant role in the dynamics of such systems [4][5][6][7][8][9][10]. This offers the possibility to harness these effects for a variety of applications such as precise magnetometry [11][12][13][14][15][16], inertial sensing [17,18], coherent spinmechanical control [19,20], and spin-mechanical cooling [21,22] among others. Notable in this context is the possibility to stably levitate a ferromagnetic particle in a static magnetic field in vacuum [23,24]. Stable levitation is enabled by the internal angular momentum origin of the magnetization which, even in the absence of mechanical rotation, provides the required angular momentum to gyroscopically stabilize the system. Such a phenomenon, which we refer to as quantum spin stabilized levitation to distinguish it from the rotational stabilization of magnetic tops [25][26][27], relies on the conservative interchange between internal and mechanical angular momentum. Omnipresent dissipation, however, exerts additional non-conservative torques on the system which might alter the delicate gyroscopic stability [26,28]. It thus remains to be determined if stable levitation can be observed under realistic conditions, where dissipative effects cannot be neglected.
In this article, we address this question. Specifically, we consider the dynamics of a levitated magnetic nanoparticle (nanomagnet hereafter) in a static magnetic field in the presence of dissipation originating both from the collisions with the background gas and from the intrinsic damping of magnetization dynamics (Gilbert damping) [29,30], which are generally considered to be the dominant sources of dissipation for levitated nanomagnets [8,13,[31][32][33]. Confined dynamics can be observed only when the time over which the nanomagnet is levitated is longer than the period of center-of-mass oscillations in the magnetic trap. When this is the case, we define the system to be metastable. We demonstrate that the system can be metastable in experimentally feasible conditions, with the levitation time and the mechanism behind the instability depending on the parameter regime of the system. In particular, we show that at weak applied magnetic fields and for small particle dimensions (to be precisely defined below) levitation time can be significantly extended in high vacuum (i.e. pressures below 10 −3 mbar). Our results evidence the potential of unambiguous experimental observation of quantum spin stabilized magnetic levitation.
We emphasize that our analysis is particularly timely. Presently there is a growing interest in levitating and controlling magnetic systems in vacuum [9,34,35]. Current experimental efforts focus on levitation of charged paramagnetic ensembles in a Paul trap [19,36,37], diamagnetic particles in magneto-gravitational traps [38][39][40], or ferromagnets above a superconductor [14,20,41]. Levitating ferromagnetic particles in a static magnetic trap offers a viable alternative, with the possibility of reaching larger mechanical trapping frequencies.
The article is organized as follows. In Sec. II we introduce the model of the nanomagnet, and we define two relevant regimes for metastability, namely the atom phase and the Einstein-de Haas phase. In Sec. III and IV we analyze the dynamics in the atom phase and the arXiv:2106.14858v3 [cond-mat.mes-hall] 31 May 2022 Figure 1. (a) Illustration of a spheroidal nanomagnet levitated in an external field B(r) and surrounded by a gas at the temperature T and the pressure P . (b) Linear stability diagram of a non-rotating nanomagnet in the absence of dissipation, assuming a = 2b. Blue and red regions denote the stable atom and Einstein-de Haas phase, respectively; hatched area is the unstable region. Dashed lines show the critical values of the bias field which define the two phases. In particular, , and Batom = 2kaV /µ. Numerical values of physical parameters used to generate panel (b) are given in Table I. Einstein-de Haas phase, respectively. We discuss our results in Sec. V. Conclusions and outlook are provided in Sec. VI. Our work is complemented by three appendices where we define the transformation between the bodyfixed and laboratory reference frames (App. A), analyze the effect of thermal fluctuations (App. B), and provide additional figures (App. C).

II. DESCRIPTION OF THE SYSTEM
We consider a single domain nanomagnet levitated in a static 1 magnetic field B(r) as shown schematically in Fig. 1(a). We model the nanomagnet as a spheroidal rigid body of mass density ρ M and semi-axes lengths a, b (a > b), having uniaxial magnetocrystalline anisotropy, with the anisotropy axis assumed to be along the major semi-axis a [42]. Additionally, we assume that the magnetic response of the nanomagnet is approximated by a point dipole with magnetic moment µ of constant magnitude µ ≡ |µ|, as it is often justified for single domain particles [42,43]. Let us remark that such a simplified model has been considered before to study the classical dynamics of nanomagnets in a viscous medium [31,[44][45][46][47][48][49], as well as to study the quantum dynamics of magnetic nanoparticles in vacuum [5,13,50,51]. Since the model has been successful in describing the dynamics of single-domain nanomagnets, we adopt it here to investigate the stability in a magnetic trap. In particular, our study has three main differences as compared with previous work. (i) We consider a particle levitated in high vacuum, where the mean free path of the gas particles is larger than the nanomagnet dimensions (Knudsen regime [52]). This leads to gas damping which is generally different from the case of dense viscous medium mostly considered in the literature. (ii) We consider center-of-mass motion and its coupling to the rotational and magnetic degrees of freedom, while previous work mostly focuses on coupling between rotation and magnetization only (with the notable exception of [48]). (iii) We are primarily interested in the center-of-mass confinement of the particle, and not in its magnetic response.
Within this model the relevant degrees of freedom of the system are the center-of-mass position r, the linear momentum p, the mechanical angular momentum L, the orientation of the nanomagnet in space Ω, and the magnetic moment µ. The orientation of the nanomagnet is specified by the body-fixed reference frame Oe 1 e 2 e 3 , which is obtained from the laboratory frame Oe x e y e z according to (e 1 , e 2 , e 3 ) T = R(Ω)(e x , e y , e z ) T , where Ω = (α, β, γ) T are the Euler angles and R(Ω) is the rotational matrix. We provide the expression for R(Ω) in App. A. The body-fixed reference frame is chosen such that e 3 coincides with the anisotropy axis. The magnetic moment µ is related to the internal angular momentum F according to the gyromagnetic relation µ = γ 0 F, where γ 0 is the gyromagnetic ratio of the material 2 .

A. Equations of Motion
We describe the dynamics of the nanomagnet in the magnetic trap with a set of stochastic differential equations which model both the deterministic dissipative evolution of the system and the random fluctuations due to the environment. In the following it is convenient to define dimensionless variables: the center-of-mass variables r ≡ r/a,p ≡ γ 0 ap/µ, the mechanical angular momentum ≡ γ 0 L/µ, the magnetic moment m ≡ µ/µ, and the magnetic field b(r) ≡ B(ar)/B 0 , where B 0 denotes the minimum of the field intensity in a magnetic trap, which we hereafter refer to as the bias field. Note that we choose to normalize the position r, the magnetic moment µ and the magnetic field B(r) with respect to the particle size a, the magnetic moment magnitude µ, and the bias field B 0 , respectively. The scaling factor for angular momentum, µ/γ 0 , and linear momentum, µ/(aγ 0 ), follow as a consequence of the gyromagnetic relation.
The dynamics of the nanomagnet in the laboratory frame are given by the equations of motioṅ Here we define the relevant system frequencies: ω I ≡ µ/(γ 0 M a 2 ) is the Einstein-de Haas frequency, with M the mass of the nanomagnet, ω L ≡ γ 0 B 0 is the Larmor frequency, ω A ≡ k a V γ 0 /µ is the anisotropy frequency, with V the volume of the nanomagnet and k a the material dependent anisotropy constant [43], ω ≡ I −1 L is the angular velocity, with I the tensor of inertia, and ω eff ≡ 2ω A (m · e 3 )e 3 + ω L b(r). Dissipation is parametrized by the dimensionless Gilbert damping parameter η [29,53], and the center-of-mass and rotational friction tensors Γ cm and Γ rot , respectively [32]. The effect of stochastic thermal fluctuations is represented by the random variables φ p (t) and ξ l (t) which describe, respectively, the fluctuating force and torque exerted by the surrounding gas, and by ζ b (t) which describes the random magnetic field accounting for thermal fluctuations in magnetization dynamics [54]. We assume Gaussian white noise, namely, for Equations (1)(2)(3)(4) describe the center-of-mass and rotational dynamics of a rigid body in the presence of dissipation and noise induced by the background gas [32]. The expressions for Γ cm and Γ rot depend on the particle shape -here we take the expressions derived in [32] for a cylindrical particle 3 -, and on the ratio of the surface and the bulk temperature of the particle, which we assume to be equal to the gas temperature T . Furthermore, they account for two different scattering processes, namely the specular and the diffusive reflection of the gas from the particle, which is described by a phenomenological interpolation coefficient α c . The order of magnitude of the different components of Γ cm and Γ rot is generally well approximated by the dissipation rate Γ ≡ (2P ab/M )[2πM/(N A k B T )] 1/2 , where P and M are, respectively, the gas pressure and molar mass, k B is the Boltzmann constant and N A is the Avogadro number. The magnetization dynamics given by Eq. (5) is the Landau-Lifshitz-Gilbert equation in the laboratory frame [8,57], with the effective magnetic field ω eff /γ 0 . We remark that Eqs. (1-5) describe the classical dynamics of a levitated nanomagnet where the effect of the quantum spin origin of magnetization, namely the gyromagnetic relation, is taken into account phenomenologically by Eq. (5). This is equivalent to the equations of motion obtained from a quantum Hamiltonian in the mean-field approximation [24].
Let us discuss the effect of thermal fluctuations on the dynamics of the nanomagnet at subkelvin temperatures and in high vacuum. These conditions are common in recent experiments with levitated particles [58][59][60]. The thermal fluctuations of magnetization dynamics, captured by the last term in Eq. (5), lead to thermally activated transition of the magnetic moment between the two stable orientations along the anisotropy axis [54,61]. Such process can be quantified by the Néel relaxation time, which is given by . Thermal activation can be neglected when τ N is larger than other timescales of magnetization dynamics, namely the precession timescale given by τ L ≡ 1/|ω eff |, and the Gilbert damping timescale given by τ G ≡ 1/(η|ω eff |). Considering for simplicity |ω eff | ∼ 2ω A , for a particle size a = 2b = 1 nm and temperature T = 1 K, and the values of the remaining parameters as in Table I, the ratio of the timescales is of the order τ N /τ L ∼ 10 3 , and it is significantly increased for larger particle sizes and at smaller temperatures. We remark that, for the values considered in this article, τ N is much larger than the longest dynamical timescale in Eqs. (1)(2)(3)(4)(5) which is associated with the motion along e x . Thermal activation of the magnetic moment can therefore be safely neglected. The stochastic effects ascribed to the background gas, captured by the last terms in Eqs. (3)(4), are expected to be important at high temperatures (namely, a regime where M k B T γ 2 0 a 2 /µ 2 1 [32]). At subkelvin temperatures and in high vacuum these fluctuations are weak and, consequently, they do not destroy the deterministic effects captured by the remaining terms in Eqs. (1)(2)(3)(4)(5) [33]. Indeed, for the values of parameters given in Table I and ). For subkelvin temperatures and particle sizes a > 1 nm, thermal fluctuations due to the background gas can therefore be safely neglected.
In the following we thus neglect stochastic effects by setting φ p = ξ l = ζ b = 0, and we consider only the deterministic part of Eqs. (1)(2)(3)(4)(5) as an appropriate model for the dynamics [8,33,54]. In App. B we carry out the analysis of the dynamics including the effects of gas fluctuations in equations (1)(2)(3)(4)(5), and we show that the results presented in the main text remain qualitatively valid even in the presence of thermal noise. For the magnetic field B(r) we hereafter consider a Ioffe-Pritchard magnetic trap, given by where B 0 , B and B are, respectively, the field bias, gradient and curvature [62]. We remark that this is not a fundamental choice, and different magnetic traps, provided they have a non-zero bias field, should result in similar qualitative behavior.

B. Initial conditions
The initial conditions for the dynamics in Eqs. (1)(2)(3)(4)(5), namely at time t = 0, depend on the initial state of the system, which is determined by the preparation of the nanomagnet in the magnetic trap. In our analysis, we consider the nanomagnet to be prepared in the thermal state of an auxiliary loading potential at the temperature T . Subsequently, we assume to switch off the loading potential at t = 0, while at the same time switching on the Ioffe-Pritchard magnetic trap. The choice of the auxiliary potential is determined by two features: (i) it allows us to simply parametrize the initial conditions by a single parameter, namely the temperature T , and (ii) it is an adequate approximation of general trapping schemes used to trap magnetic particles.
Regarding point (i), we assume that the particle is levitated in a harmonic trap, in the presence of an external magnetic field applied along e x . This loading scheme provides, on the one hand, trapping of the center-of-mass degrees of freedom, with trapping frequencies denoted by ω i (i = x, y, z). On the other hand, the magnetic moment in this case is polarized along e x . The Hamiltonian of the system in such a configuration reads where B aux denotes the magnitude of the external magnetic field, which we for simplicity set to B aux = B 0 in all our simulations. At t = 0 the particle is released in the magnetic trap given by Eq. (6). For the degrees of freedom x ≡ (r,p, , m x ) T , we take as the initial displacement from the equilibrium the corresponding standard deviation in a thermal state of H aux . More precisely, , with k = 1, 2 and the partition function Z. For the Euler angles Ω we use . The initial conditions for e 3 follow from Ω using the transformation given in App. A.
Regarding point (ii), the initial conditions obtained in this way describe a trapped particle prepared in a thermal equilibrium in the presence of an external loading potential where the center of mass is decoupled from the magnetization and the rotational dynamics. It is outside the scope of this article to study in detail a particular loading scheme. However, we point out that an auxiliary potential given by H aux can be obtained, for example, by trapping the nanomagnet using a Paul trap as demonstrated in recent experiments [19,21,37,[63][64][65][66][67][68][69][70]. In particular, trapping of a ferromagnetic particle has been demonstrated in a Paul trap at P = 10 −2 mbar, with center-of-mass trapping frequency of up to 1 MHz, and alignment of the particle along the direction of an applied field [19]. We note that particles are shown to remain trapped even when the magnetic field is varied over many orders of magnitudes or switched off. We remark further that alignment of elongated particles can be achieved using a quadrupole Paul trap even in the absence of magnetic field [55,71].

C. Linear stability
In the absence of thermal fluctuations, an equilibrium solution of Eqs. (1-5) is given byr e =p e = e = 0 and e 3,e = m e = −e x . This corresponds to the configuration in which the nanomagnet is fixed at the trap center, with the magnetic moment along the anisotropy axis and antialigned to the bias field B 0 . Linear stability analysis of Eqs. (1)(2)(3)(4)(5) shows that the system is unstable, as expected for a gyroscopic system in the presence of dissipation [28]. However, when the nanomagnet is metastable, it is still possible for it to levitate for an extended time before being eventually lost from the trap, as in the case of a classical magnetic top [25][26][27]. As we show in the following sections, the dynamics of the system, and thus its metastability, strongly depend on the applied bias field B 0 . We identify two relevant regimes: (i) strong-field regime, defined by bias field values B 0 > B atom , and (ii) weak-field regime, defined by B 0 < B atom , where B atom ≡ 2k a V /µ. This difference is reminiscent of the two different stable regions which arise as a function of B 0 in the linear stability diagram in the absence of dissipation [see Fig. 1(b)] [23,24]. In Sec. III and Sec. IV we investigate the possibility of metastable levitation by solving numerically Eqs. (1)(2)(3)(4)(5) in the strong-field and weak-field regime, respectively.

III. DYNAMICS IN THE STRONG-FIELD REGIME: ATOM PHASE
The strong-field regime, according to the definition given in Sec. II C, corresponds to the blue region in the linear stability diagram in the absence of dissipation, shown in Fig. 1(b). This region is named atom phase in [23,24], and we hereafter refer to the strong-field regime as the atom phase. This parameter regime corresponds to the condition ω L ω A , ω I . In this regime, the coupling of the magnetic moment µ and the anisotropy axis e 3 is negligible, and, to first approximation, the nanomagnet undergoes a free Larmor precession about the local magnetic field. In the absence of dissipation, this stabilizes the system in full analogy to magnetic trapping of neutral atoms [72,73].
In Fig. 2(a-c) we show the numerical solution of Eqs. (1-5) for nanomagnet dimensions a = 2b = 20 nm and the bias field B 0 = 200 mT. As evidenced by Fig. 2(a), the magnetization m x of the particle changes direction. During this change, the mechanical angular momentum l x changes accordingly in the manifestation of the Einstein-de Haas effect, such that the total angular momentum m + is conserved 4 . The dynamics observed in Fig. 2(a) is indicative of Gilbertdamping-induced magnetization switching, a well-known phenomenon in which the projection of the magnetic moment along the effective magnetic field ω eff /γ 0 changes sign [30]. This is expected to happen when the applied bias field B 0 is larger than the effective magnetic field associated with the anisotropy, given by ∼ ω A /γ 0 . Magnetization switching displaces the system from its equilibrium position on a timescale which is much shorter than the period of center-of-mass oscillations, estimated from [24] to be τ cm ∼ 1 µs. The nanomagnet thus shows no signature of confinement [see Fig. 2 The timescale of levitation in the atom phase is given by the timescale of magnetization switching, which we estimate as follows. As evidenced by Fig. 2(a-b), the dynamics of the center of mass and the anisotropy axis are approximately constant during switching, such that ω eff ≈ ω eff (t = 0). Under this approximation and assuming η 1, the magnetic moment projection m ≡ ω eff · m/|ω eff | evolves aṡ According to Eq. (7) the component m exhibits switching if m (t = 0) −1 and ω L /2ω A > 1 [30], both of which are fulfilled in the atom phase. Integrating Eq. (7) we obtain the switching time τ [defined as m (τ ) ≡ 0], which can be well approximated by 4 We always find the transfer of angular momentum to the center of mass angular momentum r × p to be negligible. Magnetization switching characterizes the dynamics of the system in the entire atom phase. In particular, in Fig. 2(d) we analyze the validity of Eq. (8) for different values of the bias field B 0 and the major semi-axis a, assuming b = a/2. The thick dashed line shows the region where Eq. (8) differs from the exact switching time, as estimated from the full dynamics of the system, by 5%; left of this line the deviation becomes increasingly more significant, with Eq. (8) predicting up to 20% larger values close to the stability border (namely, for bias field close to B atom = 90 mT). We believe that the significant deviation close to the border of the atom phase is due to the non-negligible coupling to the anisotropy axis, which results in additional mechanisms not captured by the simple model Eq. (7). In fact, it is known that coupling between magnetization and mechanical degrees of freedom might have an impact on the switching dynamics [74]. As demonstrated by Fig. 2(d), the switching time is always shorter than the center-of-mass oscillation period τ cm , and thus no metastability can be observed in the atom phase.
Let us note that the conclusions we draw in Fig. 2 remain valid if one varies the anisotropy constant k a , Gilbert damping parameter η, and the temperature T , as we show in App. C. Finally, we note that the dissipation due to the background gas has negligible effects. In particular, for the values assumed in Fig. 2(a-b) the timescale of the gas-induced dissipation is given by 1/Γ = 440 µs.

IV. DYNAMICS IN THE WEAK-FIELD REGIME: EINSTEIN-DE HAAS PHASE
We now focus on the regime of weak bias field, corresponding to the condition ω L ω A . In this regime magnetization switching does not occur, and the dynamics critically depend on the particle size. In the following we focus on the regime of small particle dimensions, i.e. ω L ω I , which, as we will show, is beneficial for metastability. In the absence of dissipation, this regime corresponds to the Einstein-de Haas phase [red region in Fig. 1(b)] [23,24]. The hierarchy of energy scales in the Einstein-de Haas phase (namely, ω L ω A , ω I ) manifests in two ways: (i) the anisotropy is strong enough to effectively "lock" the direction of the magnetic moment µ along the anisotropy axis e 3 (ω A ω L ), and (ii) according to the Einstein-de Haas effect, the frequency at which the nanomagnet would rotate if µ switched direction is significantly increased at small dimensions (ω I ω L ), such that switching can be prevented due to energy conservation [4]. In the absence of dissipation, the combination of these two effects stabilizes the system. In Fig. 3(a-c) we show the numerical solution of Eqs. (1-5) for nanomagnet dimensions a = 2b = 2 nm and the bias field B 0 = 0.5 mT. The nanomagnet is metastable, as evidenced by the confined center-of-mass motion shown in Fig. 3(a). In Fig. 3(b-c) we show the dynamics of the magnetic moment component m and the anisotropy axis component e 3,x , respectively, which indicates that no magnetization switching occurs in this regime. We remark that the absence of switching cannot be simply explained on the basis of Eqs. (7)(8). In fact, the simple model of magnetization switching, given by Eq. (7), assumes that the dynamics of the rotation and the center-of-mass motion happen on a much longer timescale than the timescale of magnetization dynamics. However, in this case rotation and magnetization dynamics occur on a comparable timescale, as evidenced by Fig. 3(b-c). The weak-field condition alone (ω L ω A ) is thus not sufficient to correctly explain the absence of switching, and the role of particle size (ω L ω I ) needs to be considered.
Let us analyze the role of Gilbert damping in this case. Since in the Einstein-de Haas phase m ∼ 1, we define m ≡ e 3 + δm, where δm represents the deviation of m from the anisotropy axis e 3 , and we assume |δm| |e 3 | [see Fig. 3(b)]. This allows us to simplify Eq. (5) as (9) where ω 3 ≡ µ/(γ 0 I 3 ), with I 3 the principal moment of inertia along e 3 . As evidenced by Eq. (9), the only effect of Gilbert damping is to align m and e 3 on a timescale given by τ ≡ 1/[η(2ω A + ω 3 )], irrespective of the dynamics of e 3 . For the values of parameters considered in Fig. 3(a-c), τ = 5 ns, and it is much shorter than the timescale of center-of-mass dynamics, given by τ cm ∼ 1 µs. For all practical purposes, the magnetization in the Einstein-de Haas phase can be considered frozen along the anisotropy axis. The nanomagnet in the presence of Gilbert damping is therefore equivalent to a hard magnet (i. e. k a → ∞) [24].
The main mechanism behind the instability in the Einstein-de Haas phase is thus gas-induced dissipation. In Fig. 3(d-e) we plot the dynamics of the center-ofmass component r y and the magnetic moment component m x on a longer timescale, for two different values of the pressure P . The effect of gas-induced dissipation is to dampen the center-of-mass motion to the equilibrium position, while the magnetic moment moves away from the equilibrium. Both processes happen on a timescale given by the dissipation rate Γ. When e x = m x ≈ 0, the system becomes unstable and ultimately leaves the trap [see arrow in Fig. 3(d)]. We define the escape time t as the time at which the particle position is y(t ) ≡ 5y(0), and we show it in Fig. 3(f) as a function of pressure P for different configurations in the Einstein-de Haas phase, and for b = a/2. Fig. 3(f) confirms that the dissipation affects the system on a timescale which scales as ∼ 1/P . The metastability of the nanomagnet in the Einstein-de Haas phase is therefore limited solely by the gas-induced dissipation, which can be significantly reduced in high vacuum. Finally, in Fig. 3(g) we analyze the effect of particle size on metastability. Specifically, we show the escape time t as a function of the major semi-axis a at the bias field B 0 = 0.5 mT, for b = a/2. The escape time is significantly reduced at increased particle sizes. This confirms the advantage of the Einstein-de Haas phase to observe metastability, even in the presence of dissipation.

V. DISCUSSION
In deriving the results discussed in the preceding sections, we assumed (i) a single-magnetic-domain nanoparticle with uniaxial anisotropy and constant magnetization, with the values of the physical parameters summarized in Table I, (ii) deterministic dynamics, i. e. the absence of thermal fluctuations, (iii) that gravity can be neglected, and (iv) a non-rotating nanomagnet. Let us justify the validity of these assumptions.
We first discuss the values of the parameters given in Table I, which are used in our analysis. The material parameters, such as ρ M , ρ µ , k a and η, are consistent with, for example, cobalt [75][76][77][78]. We remark that the uniaxial anisotropy considered in our model represents a good description even for materials which do not have an intrinsic magnetocrystalline uniaxial anisotropy, provided that they have a dominant contribution from the uniaxial shape anisotropy. This is the case, for example, for ferromagnetic particles with a prolate shape [75]. We point out that the values used here do not correspond to a specific material, but instead they describe a general order of magnitude corresponding to common magnetic materials. Indeed, our results are general and can be particularized to specific materials by replacing the above generic values with exact numbers. As we show in App. C, the results and conclusions presented here remain unchanged even when different values of the parameters are considered. The values used for the field gradient B and the curvature B have been obtained in magnetic microtraps [62,[79][80][81][82]. The values of the gas pressure P and the temperature T are experimentally feasible, with numerous recent experiments reaching pressure values as low as P = 10 −6 mbar [58,68,70,[83][84][85]. All the values assumed in our analysis are therefore consistent with currently available technologies in levitated optomechanics.
Thermal fluctuations can be neglected at cryogenic conditions (as we argue in Sec. II A), as their effect is weak enough not to destroy the deterministic effects captured by Eqs. (1)(2)(3)(4)(5). In particular, thermal activation of the magnetization, as quantified by the Néel relaxation time, can be safely neglected due to the large value of the uniaxial anisotropy even for the smallest particles considered. As for the mechanical thermal fluctuations, we confirm that they do not modify the deterministic dynamics in App. B, where we simulate the associated stochastic dynamics.
Gravity, assumed to be along e x , can be safely neglected, since the gravity-induced displacement of the trap center from the origin is much smaller than the length scale over which the Ioffe-Pritchard field significantly changes [24]. Specifically, the gravitational potential M gx shifts the trap center from the origin r = 0 along e x by an amount r g ≡ M g/(µB ), where g is the gravitational acceleration. On the other hand, the characteristic length scales of the Ioffe-Pritchard field are given by ∆r 0 ≡ B 0 /B for the variation along e x , and ∆r ≡ B /B for the variation off-axis. When-ever r g ∆r 0 , ∆r , gravity has a negligible role in the metastable dynamics of the system. In the parameter regime considered in this article, this is always the case. We note that the condition to neglect gravity is the same as for a magnetically trapped atom, since both M and µ scale with the volume.
Finally, we remark that the analysis presented here is carried out for the case of a non-rotating nanomagnet 5 . The same qualitative behavior is obtained even in the presence of mechanical rotation (namely, considering a more general equilibrium configuration with e = 0). The analysis of dynamics in the presence of rotation is provided in App. C. In particular, the dynamics in the Einstein-de Haas phase remains largely unaffected, provided that the total angular momentum of the system is not zero. In the atom phase, mechanical rotation leads to differences in the switching time τ , as generally expected in the presence of magneto-mechanical coupling [74,88].

VI. CONCLUSION
In conclusion, we analyzed how the stability of a nanomagnet levitated in a static magnetic field is affected by the most relevant sources of dissipation. We find that in the strong-field regime (atom phase) the system is unstable due to the Gilbert-damping-induced magnetization switching, which occurs on a much faster timescale than the center-of-mass oscillations, thereby preventing the observation of levitation. On the other hand, the system is metastable in the weak-field regime and for small particle dimensions (Einstein-de Haas phase). In this regime, the confinement of the nanomagnet in a magnetic trap is limited only by the gas-induced dissipation. Our results suggest that the timescale of stable levitation can reach and even exceed several hundreds of periods of center-of-mass oscillations in high vacuum. These findings indicate the possibility of observing the phenomenon of quantum spin stabilized magnetic levitation, which we hope will encourage further experimental research.
The analysis presented in this article is relevant for the community of levitated magnetic systems. Specifically, we give precise conditions for the observation of the phenomenon of quantum spin stabilized levitation under experimentally feasible conditions. Levitating a magnet in a time-independent gradient trap represents a new direction in the currently growing field of magnetic levitation of micro-and nanoparticles, which is interesting for two reasons. First, the experimental observation of stable magnetic levitation of a non-rotating nanomagnet would represent a direct observation of the quantum nature of magnetization. Second, the observation of such phenomenon would be a step towards controlling and using the rich physics of magnetically levitated nanomagnets, with applications in magnetometry and in tests of fundamental forces [9,11,34,35].
In this appendix we define the transformation matrix between the body-fixed and the laboratory reference frames according to the ZYZ Euler angle convention, with the Euler angles denoted as Ω = (α, β, γ) T . We define the transformation between the laboratory frame Oe x e y e z and the body frame Oe 1 e 2 e 3 as follows, where Accordingly, the components v j (j = 1, 2, 3) of a vector v in the body frame Oe 1 e 2 e 3 and the components v ν (ν = x, y, z) of the same vector in the laboratory frame Oe x e y e z are related as The angular velocity of a rotating particle ω can be written in terms of the Euler angles as ω =αe z +βe y +γe 3 , where (e x , e y , e z ) T = R z (α)(e x , e y , e z ) T denotes the frame Oe x e y e z obtained after the first rotation of the laboratory frame Oe x e y e z in the ZYZ convention. By using (A1) and (A2), we can rewrite angular velocity in terms of the body frame coordinates, In this appendix we consider the dynamics of a levitated nanomagnet in the presence of stochastic forces and torques induced by the surrounding gas. The dynamics of the system are described by the following set of stochastic differential equations (SDE), where we model the thermal fluctuations as uncorrelated Gaussian noise represented by a six-dimensional vector of independent Wiener increments (dW p , dW l ) T . The corresponding diffusion rate is described by the tensors D cm and D rot which, in agreement with the fluctuationdissipation theorem, are related to the corresponding dissipation tensors Γ cm and Γ rot as D cm ≡ 2Γ cm χ, D rot ≡ 2Γ rot χ, where χ ≡ M k B T γ 2 0 a 2 /µ 2 . In the following we numerically integrate Eqs. (B1-B5) using the stochastic Euler method implemented in the stochastic differential equations package in MATLAB. As the effect of thermal noise is more prominent for small particles at weak fields, we focus on the Einstein-de Haas regime considered in Sec. IV. We show that even in this case the effect of thermal fluctuations leads to dynamics which are qualitatively very close to the results obtained in Sec. IV. In Fig. 4 we present the results of the stochastic integrator by averaging the solution of 100 different trajectories calculated using the same parameters considered in Fig. 3(a-c). The resulting average dynamics agree qualitatively with the results obtained by integrating the corresponding set of deterministic equations Eqs. (1-5) [cfr. Fig. 3(a-c)]. The main effect of thermal excitations is to shift the center of oscillations of the particle's degrees of freedom around the value given by the thermal fluctuations. This is more evident for the dynamics of e 3 [cfr. Fig. 4(c) and Fig. 3(c)]. We thus conclude that the deterministic equations Eqs. (1)(2)(3)(4)(5) considered in the main text correctly capture the metastable behavior of the system. We emphasize that the results presented in this section include only the noise due to the surrounding gas. Should one be interested in simulating the effect of the fluctuations of the magnetic moment, the Euler method used here is not appropriate, and the Heun method should be used instead [89].
Let us conclude with a technical note on the numerical simulations. In the presence of dissipation and thermal fluctuations the only conserved quantity of the system is the magnitude of the magnetic moment (|m| = 1). We thus use the deviation 1−|m| 2 as a measure of the numerical error in both the stochastic and deterministic simulations presented in this article. For the deterministic simulations the error stays much smaller than any other physical degree of freedom of the system during the whole simulation time. The simulation of the stochastic dynamics shows a larger numerical error [see Fig. 4(d)], which can be partially reduced by taking a smaller time-step size. We note that, for the value of magnetic anisotropy given in Table I, the system of SDE is stiff. This, together with the requirement imposed on the time-step size by the numerical error, ultimately limits the maximum time we can simulate to a few microseconds. However, this is sufficient to validate the agreement between the SDE and the deterministic simulations presented in the article.

Appendix C: Additional figures
In this appendix we provide additional figures.

Dynamics in the atom phase
In Fig. 5 we analyze magnetization dynamics in the atom phase as a function of different system parameters. In Fig. 5(a) we show how magnetization switching changes as the anisotropy constant k a is varied. We consider the bias field B 0 = 1100 mT, which is larger than the value considered in the main text. This is done to ensure that B 0 > B atom for all anisotropy values. Fig. 5(a) demonstrates that the switching time τ , given by Eq. (8), is an excellent approximation for the dynamics across a wide range of values for the anisotropy constant k a . The larger discrepancy between Eq. (8) and the line showing the case with k a = 10 6 J/m 3 is explained by the proximity of this point to the unstable region (in this case given by the critical field B atom = 900 mT), and better agreement is recovered at larger bias field values.
In Fig. 5(b) we analyze the validity of Eq. (8) for different values of the Gilbert damping parameter η and the temperature T . The thick dashed line shows the region where Eq. (8) differs from the exact switching time by 5%; below this line the deviation becomes increasingly more significant. As evidenced by Fig. 5(b), τ shows little dependence on T ; its order of magnitude remains constant over a wide range of cryogenic temperatures. On the other hand, the dependence on η is more pronounced. In fact, reducing the Gilbert parameter significantly delays the switching time, leading to levitation times as long as ∼ 1 µs.
Additionally, we point out that τ depends on the field gradient B and curvature B through the initial condition m (t = 0). In particular, magnetization switching can be delayed by decreasing B , as this reduces the initial misalignment of the magnetization and the anisotropy axis (i. e. |m (t = 0)| → 1).

Dynamics in the presence of rotation
In Fig. 6 we consider a more general equilibrium configuration, namely a nanomagnet initially rotating such that in the equilibrium point L e = −I 3 ω S e x , with ω S > 0 denoting the rotation in the clockwise direction. This equilibrium point is linearly stable in the absence of dissipation [23,24], with additional stability of the system provided by the mechanical rotation, analogously to the classical magnetic top [25][26][27].
In Fig. 6(a) we analyze how magnetization switching in the atom phase changes in the presence of rotation for different values of parameters. The rotation has a slight effect on the switching time τ , shifting it forwards (backwards) in case of a clockwise (counterclockwise) rotation. This is generally expected in the presence of magnetomechanical coupling [74,88].
In Fig. 6(b) we show the motion in the y-z plane in the Einstein-de Haas phase for both directions of rotation. This can be compared with Fig. 3(a). The rotation does not qualitatively affect the dynamics of the system. The difference in the two trajectories can be explained by a different total angular momentum in the two cases, as in the case of a clockwise (counterclockwise) rotation the mechanical and the internal angular momentum are parallel (anti-parallel), such that the total angular momentum is increased (decreased) compared to the nonrotating case. This asymmetry arises from the linear stability of a rotating nanomagnet, and it is not a consequence of dissipation. In fact, we confirm by numerical simulations that the escape time t as a function of the pressure P shows no dependence on the mechanical rotation ω S . Namely, even in the presence of mechanical rotation one recovers the same plot as shown in Fig. 3(f). For the initial conditions we consider trapping frequencies ωx = 2π × 2 kHz and ωy = ωz = 2π × 50 kHz. Unless otherwise stated, for the remaining parameters the numerical values are given in Table I