Quantum metamaterials with magnetic response at optical frequencies

We propose novel quantum antennas and metamaterials with strong magnetic response at optical frequencies. Our design is based on the arrangement of natural atoms with only electric dipole transition moments at distances smaller than a wavelength of light but much larger than their physical size. In particular, we show that an atomic dimer can serve as a magnetic antenna at its antisymmetric mode to enhance the decay rate of a magnetic transition in its vicinity by several orders of magnitude. Furthermore, we study metasurfaces composed of atomic bilayers with and without cavities and show that they can fully reflect the electric and magnetic fields of light, thus, forming nearly perfect electric/magnetic mirrors. The proposed quantum metamaterials can be fabricated with available state-of-the-art technologies and promise several applications both in classical optics and quantum engineering.

Most natural materials interact weakly with the magnetic field of light at optical frequencies [1]. In fact, the magnetic interaction energy −µ · B is typically about two orders of magnitude (i.e. order of fine-structure constant) smaller than its electric counterpart −p · E, whereby µ ≈ µ B and p ≈ ea 0 represent the magnitude of the electric dipole moments, and e, a 0 , µ B , denote the elementary charge, Bohr radius, and Bohr magneton, respectively [2]. However, two decades of progress in nanooptics has brought about novel electromagnetic properties that are not available in natural materials. In particular, "metamaterials" created through synthetic arrangement of subwavelength antennas [3][4][5][6] can now generate magnetic functionalities at high frequencies [7]. Unfortunately, material absorption and limits in nanofabrication have hampered reaching a high performance in the optical regime.
Considering that natural atoms act as the smallest and most fundamental optical antennas [8,9], one can also envision the construction of "quantum" metamaterials by synthetically arranging natural atoms or molecules at distances smaller than an optical wavelength but much larger than the characteristic length of electronic orbitals. Indeed, a number of such proposals have emerged over the past few years [10][11][12][13][14][15][16][17][18][19][20][21][22][23], but these have only considered metamaterials with electric response. In this Letter, we show that a strong magnetic functionality can be obtained from conventional atoms at optical frequencies.
In particular, we propose novel quantum antennas that can enhance the decay rate of a magnetic emitter (i.e. an emitter with magnetic dipole transitions) in their vicinity by several orders of magnitude. We demonstrate that a metasurface composed of the proposed antennas can act as nearly perfect electric and magnetic mirrors and can, moreover, strongly couple to a cavity mode independent of its position.
Atomic dimer antenna.-Let us first consider an atomic dimer consisting of two identical atoms with electric dipole transition moments placed at r u/d = (0, 0, ±l/2) (see the inset in Fig. 1 (a,b); u,d stand for up and down). We assume that the atomic response is isotropic and linear, i.e. we consider the weak-excitation limit. The electric polarizability of each atom amounts to , where Γ 0 is the radiative linewidth of the atomic transition at frequency ω a while δ = ω − ω a ω a represents the frequency detuning between the illumination and the atom, α 0 = 6π/k 3 and k is the wavenumber [24]. We note that our discussion can be readily generalized to any other quantum emitter such as molecules, color centers, quantum dots or ions with dipolar transitions.
The atomic dimer antenna is illuminated by an xpolarized plane wave E inc = E 0 e ikz e x propagating in the z direction, where e x is the unit vector in the x direction, E 0 is the electric field amplitude, and k is the wavenumber in free space. The induced volume current density for the dimer antenna can be written as (see the Supplementary Materials (SM) for a detailed derivation) where δ r − r u/d is the Dirac delta function and 0 denotes the free-space permittivity. The quantities α u and α d are the effective electric polarizabilities of the upper and lower atoms according to α u/d = α cos(kl/2) D− ± i sin(kl/2) D+ . Here, D ± ≡ 1± 0 αG xx EE (r u , r d ) with G xx EE (r d , r u ) signifying the scalar Green's function of the Helmholtz equation in free space. Using a multipole expansion of the induced current [25] and Eq. (1), we obtain the induced electric and magnetic dipole and quadrupole polarizabilities of the dimer antenna at r = 0 (see SM): α ed = 2α D − j 0 (kl/2) − j 2 (kl/2) 2 cos (kl/2) , α md = 3α D + j 1 (kl/2) sin (kl/2) , α eq = 12 k 2 α D + [3j 1 (kl/2) − 2j 3 (kl/2)] sin (kl/2) , where j n (r) is the spherical Bessel function and α ed , α md , α eq , and α mq represent the electric dipole, magnetic dipole, electric quadrupole and magnetic quadrupole polarizabilities, respectively. For small separations (l λ), the higher order spherical Bessel functions are negligible, i.e. j 2 (kl/2) ≈ 0 and j 3 (kl/2) ≈ 0. Thus, α md ≈ k 2 /12α eq and the magnetic quadrupole polarizability can be neglected, i.e. α mq ≈ 0. Once the induced dipole and quadrupole polarizabilities are obtained, the total scattering cross section (C sca ) of the atomic dimer can also be calculated (see SM): Near-field coupling of the electric dipole transitions of two individual emitters has been explored in various systems [26,27] and is known to lead to symmetric (superradiant) and antisymmetric (subradiant) states. The black curve in Fig. 1(a) shows C sca for the subradiant state as a function of the frequency detuning for two atoms separated by l = λ a /10. In this case, the electric response of the dimer antenna becomes negligible, but it exhibits both magnetic dipolar (see right vertical axis) and electric quadrupolar responses with α eq ≈ 12 k 2 α md (see SM). The inset in Fig. 1(a) illustrates the magnetic field distribution for this antisymmetric mode under plane wave illumination, where a strong magnetic field testifies to an optically induced magnetic response. The left vertical axis in Fig. 1(b) shows C sca as a function of the frequency detuning for the symmetric mode, where the two atoms oscillate in phase. The right vertical axis plots the electric dipolar response of the antenna structure, while the inset shows that the magnetic response is negligible in this scenario.
Enhancing magnetic transitions-The strong magnetic field generated in the atomic dimer (see Fig. 1(a)) prompts us to inquire whether it can act as a magnetic antenna to enhance the decay of a test magnetic dipole moment µ t placed at the origin. Using the normalized local density of states (NLDOS) of the system (see SM), one can arrive at the antenna-modified decay rate Γ ant given by where g EM (r, r ) = − 3 2 0α0 e iζ 1 ζ + i ζ 2 is the scalar electro-magnetic Green's function in free space and ζ = k |r − r | (see SM). Figure 2(a) plots the calculated magnetic decay rate enhancement for both symmetric and antisymmetric modes. We find that the decay rate can be enhanced by five orders of magnitude at l ≈ λ a /20 Optical response of two atoms placed at z = ± l 2 (see insets) as a function of detuning at the antisymmetric (a) and symmetric (b) modes of the composite system, respectively. Left vertical axes (black): total scattering cross sections normalized to the free-space value 3 2π λ 2 for a two-level atom on resonance. Right vertical axes (orange and blue): The real (solid curves) and imaginary (dashed curves) parts of the induced effective polarizabilities calculated using Eq. 2 and for l = 0.1λa. Insets display normalized total magnetic field distribution for each case. The antisymmetric mode exhibits both magnetic and electric quadrupole response which lead to a larger total cross section than the symmetric mode [28].
for the antisymmetric mode. However, for the symmetric mode the decay rate is even slightly decreased below its unperturbed value (i.e., Γ ant < Γ 0 ) because of the weak magnetic response of this mode (see the inset in Fig. 1(b)).
To achieve even larger enhancements, one can devise an atomic tetramer antenna, consisting of four identical atoms with electric polarizability α (see Fig. 2(c)). Figure 2(a) shows the enhancement of the magnetic transition rate for this case (see SM). We note that fabrication of quantum metamaterials in these configurations is readily within reach since the distances involved are well beyond atomic and molecular spacings in natural substances (e.g. λ a /20 corresponds to several tens of nanometers). A particularly interesting class of materials for these applications are rare earth ions with weak magnetic dipole transition [29,30]. New efforts on the implantation of ions using ion traps or other bombardment strategies [31,32] allow precise doping of various host materials.
Electric and magnetic mirrors based on atomic bilayer metasurfaces.-It has been shown that optimal optical coupling to a two-level atom requires mode matching between the incident light and that of the field radiated by the atom [8]. It is, thus, found that a dipolar wave can be perfectly reflected by a single two-level atom with a dipolar transition. Similarly, it has been shown, both theoretically and experimentally, that a planar twodimensional array of atoms acts as a nearly perfect electric mirror for a plane-wave illumination [11,12,23]. Now, we show that a periodic planar arrangement of our dimer antennas, which we call atomic bilayer metasurfaces (ABM), can act as both electric and magnetic mirrors (see Fig. 3(a,b)).
Let us illuminate an ABM by an x-polarized plane wave propagating in z-direction, E inc = E 0 e ikz e x . The field reflection and transmission coefficients are given by (see SM) where p eff u and p eff d are the effective electric dipole moments of the upper and lower layers, respectively and can be calculated as with denoting the interaction constants between atoms in the upper and lower layers, respectively. For identical atoms, the interaction constants are symmetric, i.e. C ud = C du and C uu = C dd . For lossless atoms (i.e. no nonradiative loss), the imaginary part of the interaction constants can be calculated exactly by using the conservation of energy principle [see SM], while their real parts are calculated numerically. array for l = λ a /10 calculated using Eq. 5 (solid lines). The symbols in Fig. 3(d) present the results obtained for a finite array of 15 × 15 × 2 atoms and a Gaussian beam illumination (a possible experimental situation) by integrating the Poynting vector for the scattered and incident beam [see SM]. We find that the results for the two illuminations (i.e. Gaussian and plane wave) agree very well. We now provide more insight into the working of the ABM in Fig. 3(e,f). As displayed in Fig. 3(e), the effective induced dipole moments of the upper and lower layers are out of phase at the antisymmetric mode, i.e. p eff u ≈ −p eff d ≈ 1.7 0 α 0 E 0 . Figure 3(f) displays the effective electric and magnetic polarizabilities of the atomic metasurface, which can be calculated by using It follows that the the antisymmetric resonance of the ABM supports an effective magnetic response α eff md ≈ iα 0 , while α eff ed ≈ 0. Together with a reflectivity r ≈ 1, this implies that the bilayer metasurface acts as a nearly perfect atomic magnetic mirror at its antisymmetric resonance. At the symmetric mode, however, the atoms in the upper and lower layers are in phase such that p eff u ≈ p eff d ≈ 0.5i 0 α 0 E 0 , leading to an effective electric response, i.e. α eff ed ≈ iα 0 , but α eff md ≈ 0 (see Fig. 3(f)). Therefore, the array acts as a nearly perfect atomic electric mirror with r ≈ −1 (see SM for a Gaussian beam excitation).
Atomic monolayer/bilayer metasurfaces in a cavity.-Optical cavities are commonly used to enhance the interaction of light with matter. The maximum interaction occurs when an atom with an electric (magnetic) transition dipole moment is placed at the maximum electric (magnetic) field. In other words, the interaction strongly depends on the position of the atom inside the optical cavity. The proposed atomic bilayer metasurface can overcome this problem due to the combination of its strong electric and magnetic response to light. Figure 4 depicts a planar cavity consisting of two mirrors separated by L c , whereby the transmission of the bare cavity is assumed to reach unity at ω = ω c , i.e., there are no absorption or scattering losses in the cavity. Now, we investigate the interaction of the cavity with an atomic metasurface placed at a distance D from its center for i) an atomic monolayer metasurface (AMM), and ii) an ABM (see Fig. 4(a,c)). The cavity linewidth γ c is assumed to be much larger than that of the AMM resonance (γ c ≈ 10 3 Γ 0 ). The calculated transmission is plotted in Fig. 4(b) for the AMM as a function of the frequency detuning and metasurface position D. It is seen that one reaches strong coupling at D = 0, but the resonance splitting decreases with increasing D. The transmission changes periodically by varying the position D of the metasurface. At D = λ c /4 there is no longer a splitting due to a vanishing electric field. At ω = ω c , transmission is zero (see SM, section IV) because the first cavity mirror and the AMM (which is a nearly perfect electric mirror at the cavity frequency, i.e. r AMM = −1) form a new cavity.
For an ABM, however, strong coupling can be maintained at all positions inside the cavity ( Fig. 4(d)). While at D = 0, the cavity only interacts with the symmetric mode due to the maximum electric field inside cavity, at D = λ c /4 the cavity only couples to the antisymmetric mode. At intermediate positions, where 0 < D < λ c /4, the cavity couples to both symmetric and antisymmetric modes.
In conclusion, we have demonstrated that synthetic arrangements of natural atoms with only electric dipole transitions can support both electric and magnetic responses at optical frequencies. Since the interatomic distances required for our proposed designs are well above ten nanometers, our proposed quantum metasurfaces can be experimentally realized in both the gas and solid phases using a range of available methods in cold atom manipulation or implantation strategies. In particular, our proposal lends itself to applications based on natural species with weak magnetic dipole transitions, e.g., rare earth ions, (See Refs [33,34]). For instance, Eu 3+ with a magnetic transition ( 5 D 0 → 7 F 1 ) at 584 nm and a linewidth of about 15 Hz (see Table III Ref [33]), is a suitable candidate for enhancement by an arrangement of different atoms such as Fe, Ar, Kr, N, Na with electric dipole transition at the same wavelength (see Ref [34], J = 0 → J = 1 with an E1 transition). The predicted transition rate enhancements reaching 10 5 would, thus, yield magnetic transitions with natural linewidths fully comparable to that of common electric dipole transitions. Such novel materials hold promise for the development of a range of technological applications and fundamental studies in quantum engineering and physics.
Acknowledgments.-This work was supported by the Max Planck Society. R.A. also acknowledges finan-cial support provided by the Alexander von Humboldt Foundation. The authors warmly thank Claudiu Genes for helpful discussions.
Appendix A: Atomic dimer

Induced multipole moments
In this section, we derive induced multipole moments of an atomic dimer. Let us consider an atomic dimer consisting of two identical atoms placed at r u/d = [0, 0, ±l/2] and illuminated by an x-polarized plane wave propagating in the We assume e −iωt time harmonic variation. e x is the unit vector in the x direction, and E 0 is the electric field amplitude, k is the wave vector in free space. For a closed two level J = 0 → J = 1 atomic transition [11,24], the atomic response is isotropic and linear (far from saturation). The electric polarizability of each atom is defined as α = where δ = ω − ω a ω a is the detuning frequency between the light beam and the transition frequency of the atom and α 0 = 6π k 3 . We assume elastic scattering events and therefore the non-radiative decay is zero, i.e. Γ nr = 0. The induced displacement volume current density for the atomic dimer can be written as where δ (r − r i ) is the Dirac delta function, 0 is the permittivity of the free space.p i (r i ) (i = u and d) is the induced electric dipole moment of the upper and lower dipole moments, respectively and for the two atoms under consideration reads [ Fig. 5 Note that the induced moments have only an Eq. A2 can be simplified asp where α d and α u defined as where D ± = 1 ± αG xx EE (r d , r u ) and α u/d is related to effective polarizability of the dimer. Using above expressions, Eq. A1 can be written which is the induced displacement volume current density for the atomic dimer when illuminated by a plane wave ( E inc = E 0 e ikz e x ). Now, we can use the multipole expansion [see Ref. [25], Table II] and Eq. A6 to obtain the induced multipole moments of the atomic dimer at the center r = 0. The induced effective electric dipole moment of the (a) (b) where β = x, y, z and j n (kr) are spherical Bessel functions. Now by substituting Eq. A6 into Eq. A7, we have where r · J = 0, J (r) = J x (r)e x and r = r u/d = ±l/2e z . Note that y and z components of the electric dipole moments of the dimer are zero, i.e. p y = 0, and p z = 0 [see Eq. A6 and the illumination direction in Fig. 5 (b)]. Next by using the definition of the electric dipole moment, i.e. p x = 0 α ed E 0 , the effective electric polarizability of the atomic dimer can be defined The induced effective magnetic dipole moment at the center of the dimer r = 0 [ Fig. 5 (b)-(d)] read as [25] where β = x, y, z, by substituting Eq. A6 into Eq. A10, we obtain where Z 0 = µ0 0 is the intrinsic impedance of the free space. Note that we have only the y-component of the magnetic moment. Now, by using the definition of the magnetic dipole moment, i.e. m y = α md H 0 = α md E 0 /Z 0 , the effective magnetic polarizability can be defined The induced effective electric quadrupole moment at the center of the dimer r = 0 [ Fig. 5 where µ, ν = x, y, z, and δ µν is the Kronecker delta. Next, by substituting Eq. A6 into Eq. A13, we have Note that other components of the tensor in Eq. A13 are zero. Thus, by using the definition of the electric quadrupole moment [36], Q e xz = 1 2 0 α eq ∂Ex ∂z + ∂Ez ∂x = ik 2 0 E 0 α eq , the effective electric quadrupole polarizability can be defined The induced effective magnetic quadrupole moment at the center of the dimer r = 0 [ Fig. 5 where µ, ν = x, y, z, by substituting Eq. A6 on Eq. A16, we obtain Thus, by using the definition of the magnetic quadrupole moment [36], i.e. Q m zy = 1 2 α mq ∂Hz ∂y + ∂Hy ∂z = ik 2 E0 Z0 α mq , the effective electric quadrupole polarizability read as

Scattering cross section
In this section, we derive an expression to calculate the scattering cross section of an atomic dimer. Using the induced multipole moments, we can obtain the scattering cross section of the atomic dimer [25] C sca ≈ k 4 Eq. A19 can be written as a function of polarizabilities where we used the electric and magnetic multipole moments definitions p Z0 α mq . For the atomic dimer with λ l, magnetic quadrupole moment is negligible, i.e. Q m zy ≈ 0. Note that Eq. A20 is not sufficient for λ l and one should consider higher order multipole moments. An alternative approach to obtain the scattering cross section of the atomic dimer is based on the coupled dipole theory [see the coupled dipole theory section]. We assume that the nonradiative losses is zero in the atomic dimer. Thus, according to the optical theorem, the extinction cross section is identical to the scattering cross section, i.e. C sca = C ext , and therefore, Eq. A20 is identical to the Eq. A22 if an atomic dimer is without nonradiative losses and λ l.

Radiation pattern
Radiation pattern of an atomic dimer can be find by using the radiated far field [2,37,38] where r, θ, ϕ are the radial distance, polar angle, and azimuthal angle. In the xz-plane, i.e. ϕ = 0, the radiation pattern considering the contribution from all multipole moments (up to magnetic quadrupole) can be written as where p x for the atomic dimer can be obtained using Eq. A8. In the following section, we will show that an atomic bilayer composed of atomic dimer act as an atomic electric mirror at the symmetric mode resonance frequency. However, at the antisymmetric mode resonance frequency, |p x | my c , and |p x | ik 6 Q e xz the radiation pattern is similar to a superposition of magnetic dipole and electric quadrupole moments, i.e.
where m y and Q e xz for the atomic dimer can be obtained using Eq. A11 and Eq. A14, respectively [see Fig. 5 (d)]. Note that for λ l, we can show that my c ≈ − ik 6 Q e xz which is used in the derivation of Eq. A26. The radiation patterns of both modes are plotted in Fig. 6. It can be seen that the symmetric mode resonance has an in phase radiation pattern in both forward and backward directions. Whereas for the anti-symmetric mode the radiated fields are out of phase in forward and backward directions. In the following section, we show that an atomic bilayer consist of atomic dimer acts as an electric or a magnetic mirror for symmetric or antisymmetric modes, respectively [see Fig. 5 and Fig. 7].

Reflection and transition coefficients
Let us consider an atomic monolayer composed of atoms with only electric dipole transition moments. The atoms are periodically arranged in xy-plane at z = 0, r n = r nx,ny = (n x e x + n y e y ) Λ. n x and n y are integer numbers and Λ is the periodicity in x and y directions. The reflected and transmitted electric fields (E r and E t ) at the interface when illuminated by a polarized plane wave propagating in the z direction, i.e. E inc = E 0 e ikz e x defined as [12,35,39,40] where Z 0 = µ0 0 is the impedance of the free space. J e is the induced averaged surface electric current. p is the effective induced electric dipole moment of the atomic array and defined as and using E inc = E 0 e ikz e x , we get where r 0 = 0, n =0 G xx EE (r 0 , r n ) is the interaction constant (or the lattice sum of the dipolar interaction tensor). Now by substituting the induced averaged surface electric current J e = −iω p Λ 2 into Eq. B1, the reflection coefficient r = Er E0 for an atomic monolayer metasurface can be obtained [35,39,40] where ∆ and Γ defined as and transmission coefficient can be calculated by t = 1 + r. The reflection coefficient can be written as where Im n, n =0 G xx EE (0, r n ) = − 1 0α0 + k 2Λ 2 0 which is obtained in the next section using the energy conservation.
Note that the real part of the interaction constant (or lattice sum), i.e. Re n, n =0 G xx EE (0, r n ) can be calculated numerically [35,39,40].

Energy conservation and interaction constant
The conservation of energy can be used to obtain an exact expression for the imaginary part of the the interaction constant (lattice sum), i.e. Im [C] = Im n =0 G xx EE (r = 0, r n ) , we assume the nonradiative losses is zero in the atomic monolayer and have where T = |1 + r| 2 , and R = |r| 2 are the transmission and reflection from the atomic monolayer. Using Eq. B7, it can be shown that Re(r) |r| 2 = Re 1 r = −1 and we get Now by using the definition of the effective polarizability α eff = α 1−α 0 n, n =0 G xx EE (0,rn) , we have From the definition of polarizability α = G xx EE (0, r n ) can be obtained as [35,39,40] Im

Appendix C: Atomic bilayer metasurface (ABM): atomic electric and magnetic mirrors
Let us consider an atomic bilayer composed of atoms with only electric dipole transition moments (see Fig. 5) [39]. Atoms are periodically arranged in two layers in xy-planes, the position of the upper layer r u,n = n x Λe x +n y Λe y + l 2 e z and the position of the lower r d,n = n x Λe x + n y Λe y − l 2 e z . n x and n y are integer numbers and Λ is the periodicity in x and y directions. The atomic bilayer is illuminated by an x-polarized incident plane wave propagating in z-direction E inc = E 0 e ikz e x . Using E r = − 1 2 Z 0 J = ik 2Λ 2 0 p, the incident and transmitted electric fields by the atomic bilayer metasurface at z = 0 read as where p eff u and p eff d are the effective (collective) upper and lower electric dipole moments and e ±ikl/2 are the propagation terms. The reflection and transmission coefficients are given by and defined as and can be written as For identical upper and lower atoms, i.e. α, the interaction constants are symmetric, i.e. C ud = C du and C uu = C dd and defined as In general, the interaction constant can be numerically calculated. For a lossless system, the imaginary part of the interaction constant (lattice sum) can be exactly calculated by using the conservation of energy [39] Im The effective electric and magnetic polarizabilities of the atomic bilayer can be defined as At the symmetric mode resonance frequency the induced dipoles for both lower and upper layers are almost identical, i.e. p eff d ≈ p eff u [see Fig. 3 of the main manuscript], thus we get the total reflection, i.e. r ≈ −1 occurs when p eff Fig. 3 of the main manuscript]. However, at the antisymmetric mode resonance frequency, i.e. p eff d ≈ −p eff u (see Fig. 3 of the main manuscript), we have the total reflection, i.e. r ≈ 1 occurs when p eff Appendix D: Atomic monolayer/bilayer in a planar cavity

Planar cavity
In this section, we consider a planar cavity consists of two identical distributed Bragg reflector (DBR) mirrors [see Fig. 4 of the main manuscript]. The mirrors are separated by a distance of L c . The optical properties of the system is described by the transfer matrix product [41] where ϕ = knd, n is the refractive index of the spacer and here is assumed to be the free space (n = 1). r M,L and r M,R are reflection coefficients of the DBR mirrors when illuminated from left and right, respectively. For the reciprocal DBR mirrors, the transmission coefficients are identical, i.e. t M = t M,L = t M,R . The transmission and reflection coefficients of the planar cavity are defined as we assumed that there is no nonradiative losses, thus the cavity completely transmits the light at ω = ω c . The finesse of the planer cavity can be defined as (D6)

Atomic monolayer/bilayer metasurface inside a planar cavity
In this section, we assume that the atomic monolayer is placed in a planar cavity with reflection and transmission coefficients r c , t c , respectively [see Fig. 4 of the main manuscript]. By using the transfer matrix approach, we can obtain the reflection and transmission coefficients of the atomic monolayer inside the planar cavity. The transfer matrix of the atomic monolayer/bilayer metasurface can be written as where r AL and t AL are the reflected and transmitted coefficients of the atomic metasurface, respectively [see Eqs. B4 and C2]. For the We assumed that the transmission and reflection coefficients are identical for forward and backward directions. The nonradiative losses is zero, therefore, the conservation of energy yields to following formulas thus the following relation holds for the transfer matrix, i.e. det (M ) = 1, and (D9) The transmission coefficient from an atomic monolayer/bilayer inside a cavity read as The reflection and transmission coefficients of an atomic monolayer metasurface (AMM) can be written as [see Eq. B6] Now, by using t AL = 1 + r AL = δ AL δ AL +iΓ AL /2 and substituting Eq. D11 into Eq. D10, we obtain . (D12) Note that the atomic metasurface is placed at a distance D (see Fig.4 of the main manuscript). The planar cavity consisting of two mirrors separated by L c . A similar expression can be obtained for an atomic bilayer metasurface (ABM) in a cavity . (D13) Note that r AL and t AL for the AMM and ABM can be obtained from Eq. B6 and Eq. C2, respectively.

Scattered fields from an atomic bilayer metasurface using a Gaussian beam excitation
For an experimental realization limited number of atoms and a Gaussian beam excitation would be necessary. The Gaussian beam is defined as the beam parameters are defined as where w 0 is the beam waist at its focal point, R (z) is the radius of curvature of the beam at z, and ϕ (z) is the Gouy phase at z. The Gaussian beam is propagating along the z direction. In our numerical calculations, we assumed the cross section of the Gaussian beam is smaller than the area of the finite atomic layer. The parameters of Gaussian beam is given in the caption of Fig. 7. The incident and scattered electric fields for an electric and a magnetic mirror using such a Gaussian beam are demonstrated in Fig. 7. For the symmetric mode (z > 0), the scattered field is opposite in sign with respect to the incident (both real and imaginary). Thus, the transmitted field which is the sum of the incident and scattered electric fields is zero (E t = E inc + E sca = 0) [Fig. 7, see the blue box]. However, for (z < 0), only the real part of the scattered field is opposite in sign with respect to the real part of the incident. Thus it acts as a electric mirror in the symmetric mode analogous to a perfect electric conductor. For the antisymmetric mode (z > 0) similar to the symmetric mode (z > 0), the scattered field is opposite in sign with respect to the incident (both real and imaginary). Thus, the transmitted field which is the sum of the incident and scattered electric fields is zero Fig. 7, see the red box]. However, for (z < 0), the imaginary part of the scattered field is opposite in sign with respect to the imaginary part of the incident. Thus it acts as a magnetic mirror analogous to a perfect magnetic conductor. Using Gaussian beam, we also calculated transmission and reflection for limited number of atoms [15 × 15 × 2 atoms]. The results for the two illuminations (i.e. Gaussian and plane wave) are in a excellent agreement [see the main manuscript Fig. 3].
(E3) Therefore, the electric and magnetic fields E p and H p of an electric dipole moment, respectively, read For a magnetic dipole m, the electric and magnetic fields E m and H m , respectively, read since the electric vector potential for the dipole m reads [2] A Note that we have used [2] A and in Eq. (E8). Also note that we have used identity a × b = a × Ī · b = a ×Ī · b in obtaining Eq.(E6). Finally, the fields created by an electric and a magnetic dipole from Eqs. (E4)-(E6) read where,Ḡ and can be written as where n = r−r |r−r | , α 0 = 6π k 3 and , ζ = k (r − r ) and can be also written as Note that Eq. E11 can be also written as where Appendix F: Enhancing the decay rate of a magnetic emitter

Coupled dipole theory
Let us consider N atoms with electric dipole transition moments in free space. The self-consistent equation for the induced dipole moments of ith atom placed at r = r i read [40,[43][44][45] where E inc (r i ) is the incident field at the atom position, α i is the atomic polarizability and i =j E sca (|r j − r i |) are the interaction fields created by the all atoms at r = r i . Using Eq. F1, we can obtain Thus, the total field at r = r i , can be calculated by using where we used E sca (|r i − r j | = 0) =Ḡ EE (|r i − r j | = 0) · p (r i ). Now by using the total field, we can compute the absorbed power Note that Im Ḡ EE (|r i − r j | = 0) = 1 0α0Ī [40,45,46] and for lossless dipoles Im 1 αi = − 1 α0 , therefore P abs = 0. The scattered power can be calculated as now by using power conservation, the extracted power can be defined as In conclusion, the absorbed, scattered, and extracted powers read as Using duality (p ↔ m c and E ↔ H Z0 see Ref. [2]), similar results can be obtained for a magnetic dipole moment, i.e.
In the next subsection, we used above expressions to obtain the radiated power of a test magnetic dipole emitter.

Emission rate enhancement of a magnetic emitter
The power radiated by a test magnetic dipole emitter, i.e. µ t = µ t n µ placed at r 0 is given by [2] P fs rad = where n µ is the unit vector in the direction of the dipole moment. The power radiated by a magnetic dipole emitter µ t = µ t (r 0 ) when placed close to a antenna consist of N atoms at position r i with only electric dipole moment p i , read as where G tot (r 0 , r 0 ) is the total Green function at the position of the emitter, and the H (r 0 ) is the electric field at the dipole position r 0 can be obtained by where n r0ri = r0−ri |r0−ri| , g M E is defined in Eq. E16 and p (r i ) can be calculated by using Eq. E16 where E µt (r i ) ≡ g EM (r i , r 0 ) n rir0 × µt c . Thus it can be written in the following form and we can write where is the shorthand for the (µ, ν)th matrix element ofḠ EE (r i , r j ) and (µ, ν) → (x, y, z). E µt = g EM (r 1 , r 0 ) n r1r0 × m0 c , g EM (r 2 , r 0 ) n r2r0 × m0 c , · · · , g EM (r N , r 0 ) n r N r0 × m0 c T and p = p (r 1 ) , p (r 2 ) , p (r 1 ) , · · · p (r N −1 ) , p (r N ) T are 3N × 1 vectors. p (r i ) = p x (r i ) , p y (r i ) , p z (r i ) and i = 1, 2, 3, . . . , N . A is the collective polarizability (a 3N × 3N matrix) and read as (F20) and can be written as Now we can calculate n r0ri × p (r i ) and using Eq. F16 and Eq. F21 we get Now by using g EM (r i , r 0 ) = g EM (r 0 , r i ) = −g M E (r 0 , r i ), the radiated power read as where Im n T µ G M M (r 0 , r 0 ) n µ = 1 0α0 . Now, by using Eq. F13 and Eq. F24, the emission rate enhancement can be obtained as In the following subsections, we consider a magnetic dipole emitter in the middle of i) an atomic dimer and ii) an atomic tetramer.

Atomic dimer
Let us consider a test magnetic dipole emitter µ t = µ t e y placed at r 0 = 0 close to an antenna consist of two atoms with only electric dipole response (electric polarizability α) at positionr u/d = ±l/2e z [see Fig. 8 (a)]. Now by using Eq. F26, the emission rate enhancement read as P ant rad P fs {g M E (r 0 , r i ) n µ · [n r0ri × p (r i )]} , {g M E (r 0 , r u ) e y · [n r0ru × p (r u )] + g M E (r 0 , r d ) e y · [n r0r d × p (r d )]} (F27) where n r0ru = −e z , n r0r d = e z , n µ = e y and the collective polarizability read as Now by using A and E µt (r i ) ≡ g EM (r i , r 0 ) n rir0 × µt c we obtain the dipole moments p (r u ) p (r d ) = A g EM (r u , r 0 ) n rur0 × µt c g EM (r d , r 0 ) n r d r0 × µt c , (F29) {g M E (r 0 , r u ) e y · [n r0ru × p (r u )] + g M E (r 0 , r d ) e y · [n r0r d × p (r d )]} , = 1 + 0 α 0 Im g EM (r u , r 0 ) g M E (r 0 , r u ) + g EM (r d , r 0 ) g M E (r 0 , r d ) where D + ≡ 1 + 0 αG xx EE (r u , r d ) and g EM (r u , r 0 ) = −g M E (r 0 , r u ). We used Eq. F33 to calculate the decay rate in Fig. 2 of the main manuscript. The Green functions for the atomic dimer (see Fig. 8) read as G xx EE (r u , r d ) = g M E (r 0 , r u ) = g M E (r 0 , r l ) = 3 2 0 α 0 e iζ 1 ζ + i ζ 2 ζ = k |r 0 − r u | = k |r 0 − r d | = kl/2.