{'fraction_non_alphanumeric': 0.03140590872514082, 'fraction_numerical': 0.011035751235774226, 'mean_word_length': 4.797920554518795, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Regularized quasinormal modes for plasmonic resonators and open cavities

Cavity mode theory and analysis of open cavities and plasmonic particles is an essential component of optical resonator physics, offering considerable insight and efficiency for connecting to classical and quantum optical properties such as the Purcell effect. However, obtaining the dissipative modes in normalized form for arbitrarily shaped open cavity systems is notoriously difficult, often involving complex spatial integrations, even after performing the necessary full space solutions to Maxwell's equations. The formal solutions are termed quasinormal modes which are known to diverge in space, and additional techniques are frequently required to obtain more accurate field representations in the far field. In this work we introduce a new finite-difference time-domain technique that can obtain normalized quasinormal modes using a simple dipole-excitation source and an inverse Green function technique, in real frequency space, without having to perform any spatial integrations. Moreover, we show how these modes are naturally regularized to ensure the correct field decay behaviour in the far field, and thus can be used at any position within and outside the resonator. We term these modes"regularized quasinormal modes"and show the reliability and generality of the theory, by studying the generalized Purcell factor of quantum dipole emitters near metallic nanoresonators, hybrid devices with metal nanoparticles coupled to dielectric waveguides, as well as coupled cavity-waveguides in photonic crystals slabs. We also directly compare our results with full-dipole simulations of Maxwell's equations without any approximations and show excellent agreement.


I. INTRODUCTION
Over the past few decades, optical cavity structures have been used for an incredibly wide range of photonic applications 1 . In many of these cavity devices, exploiting a modal description of the optical system is of great benefit, not only for providing good physical intuition, but also because of the significant efficiency that it brings to the theoretical investigations of a typical problem. Moreover, in quantum optics, a modal description is a requirement for second quantization. However, in contrast to normal modes (with real eigenfrequencies), that are suited for describing closed optical systems (and sometimes very low loss systems) where energy losses are not a major concern, for dissipative optical cavities in general, the open cavity quasinormal modes (QNMs) must be employed. This is particularly true for low quality factor (Q) resonators, though also for high-Q structures such as photonic crystal cavities 2 . Low-Q broadband resonators are also now widely exploited in plasmonic devices, which have been proposed and used for applications such as sensing [3][4][5][6][7] , hybrid integrated photonics [8][9][10][11][12][13][14][15][16][17][18] and broadband single photon sources [19][20][21][22][23][24][25][26][27] . For any material system, the open-cavity QNMs are associated with complex eigenfrequencies whose imaginary parts quantify the system losses, and thus they require a more generalized normalization 2,28-31 beyond the standard Hermitian theories. In recent years, cavity QNMs have been successfully used to calculate various optical quantities of interest, such as the generalized effective mode volume 2,28 , enhanced spontaneous emission factor of dipole emitters, and the electron energy-loss spectroscopy (EELS) maps for plasmonic resonators 32,33 .
Calculation and normalization of QNMs has been demonstrated using both time-domain techniques, such as finite-difference time-domain (FDTD), and frequencydomain methods (such as finite-element solvers) 2,29,31,34 . However, all of these approaches are somewhat specialized and all have pros and cons. Also, most of these computational methods require a complex spatial integration of the optical fields, involving volume and surface integrals 2,30,35,36 , or coordinate transforms that exploit PMLs (perfectly matched layers) as part of the cavity structure 29 . Therefore, implementation of such QNM normalization approaches is often quite involved and, for this reason, it is still quite common to compute cavity modes in a rather ambiguous way, often treating the mode of interest as a normal mode (in some finite computational domain), or as the solution to the scattering problem (which is obviously not a true mode). Moreover, in structures with a background periodic index, such as a cavity coupled to a photonic crystal waveguide, the spatial normalization approaches generally fail, and a more careful regularization is required 37,38 . Thus there is a need to develop simpler computational approaches to obtain the QNMs without the need for such a complicated integration procedure.
Recently, using a frequency domain approach, an intuitive dipole normalization technique was developed by Bai et al. 31 , implemented using COMSOL 39 , where the self-consistent response to a dipole excitation is used to obtain an integration-free normalization for the QNM. In this approach, a search in frequency space is first performed to identify the QNM resonant frequency (pole) and then an additional simulation is performed very near the resonance frequency to capture the dominant cavity mode of interest. This method relies on the ability of the frequency-domain solvers to locate a frequency pole of the resonance in complex frequency space. Such an approach can be highly accu-rate and insightful, but requires implementation in a frequency domain solver, which can often require significant amounts of memory for larger device simulations such as coupled resonator-waveguide systems, and even single resonator structures 40 . Additional frequency domain Maxwell's solvers have since been developed for obtaining QNMs of plasmonic devices 41 that can also be used to perform QNM calculations 42 , which is cited to work best for nanoparticles of a certain size 41 . Very recently, a generalization approach to normal mode expansion of the Green fucntion for lossy resonators has been introduced 43 , where modes are defined with permittivity rather than frequency. While the technique is quite general and insightful, it provides single-frequency information and can also suffer from already discussed memory requirement issues (the implementation has been done in COMSOL) for arbitrary sized devices.
In this work, we describe a new integration-free method for obtaining normalized QNMs of arbitrary open cavities, which uses a simple dipole source excitation technique in real frequency space. We also describe and show how this new technique calculates "regularized" QNMs 44 , which ensures well-behaved (nondivergent) fields far away from the resonator, without the need for including a sum over many modes or by carrying our formal regularization through a Dyson integration approach-which reconstructs the regularized fields outside the resonator using the QNM fields inside 44 . Although our approach is quite general, we will implement it using FDTD (from Lumerical Solutions 45 ) that is arguably one of the most general and well used computational techniques in nanoplasmonics 40,[46][47][48][49] , and in nanophotonics in general [50][51][52][53] . In Section II, we introduce simple transparent formulas that can be used by a general user of any FDTD software (or similar time-dependent Maxwell solver) to compute the system QNMs in an easy-to-use and reliable manner. In Section III, as an application of this technique, confirmed with full vectorial dipole calculations of Maxwell's equations, we study the spontaneous emission enhancement (generalized Purcell factor) of a dipole emitter placed nearby different plasmonic systems including hybrid systems of metals and dielectrics, as well as coupled cavitywaveguide devices in photonic crystal slabs; these resonator systems are motivated by recent practical interest in design of different devices such as transmission line filters and single photon sources [10][11][12][13][14]38,54 . In III A, we explore the gold cuboid and dimer structures, to confirm the accuracy of the technique over a wide range of spatial positions and frequencies, where we also comment on how efficient our new technique is compared to existing methods. In III B, we then explore the regularized nature of our newly developed technique in obtaining the far-field optical response that eliminates concerns regarding the divergent behavior of the QNMs, e.g., for use with studies such as transmission and scattering into the far field. In addition, we also show excellent agreement with a previous FDTD QNM approach that uses a spatial in- tegration approach with filtering 34 , and point out several clear advantages of the current approach (including a drastic increase in efficiency, and no spatial integration at all for normalization or far field regularization). In III C, we extend the applicability and reliability of the technique to hybrid devices where plasmonic resonators are coupled to periodic dielectric waveguides. Finally, in III D, we also provide some examples of dielectric cavities, including a complicated coupled cavity-waveguide design in a photonic crystal slab. This later is a particularly hard problem for obtaining the QNMs (of the coupled system), but is shown to be easily computed with the current technique. In section IV, we present our conclusions.

II. THEORY
In this section, we present our main technique for calculating the regularized QNMs. While our approach can be expanded for computing several QNMs, we focus on a single mode picture, as it is quite often the most desired case, e.g., for applications with single photon sources and lasing. While all time-domain techniques can become problematic for computing closely overlapping QNMs (in frequency), there are no additional limitations beyond those that are well known to most time domain Maxwell solvers.

A. Existing QNM theory
In general, any open cavity system can support several QNMs,f µ (r), over the frequency band of interest. These QNMs can be defined as the solutions to the Helmholtz equation, with open boundary conditions, through the Silver-Müller radiation condition 30 . Here, ε (r, ω) is the dielectric function (possibly complex) of the system and ω µ = ω µ − iγ µ is the complex resonance frequency that can also be used to quantify the system quality factor as Q µ = ω µ /2γ µ . These QNMs, once normalized, can be used to construct the transverse Green function through 28,44 at all frequencies around the mode and at all locations nearby the scattering geometry, where the QNMs can form a complete basis 35,55 . For simplicity, we have defined the spectral function A µ (ω) = ω 2 /2ω µ (ω µ − ω). Considering a single QNM,f c (r), the single mode Green function can be written as where again this strictly holds only nearby the "cavity region" (typically at distances where a quantum emitter still feels a Purcell factor enhancement) and diverges at locations far away. The exact position for which the divergent behavior of the QNM appears, depends on the quality factor of the open cavity under investigation. For low quality factors such as those in plasmonics, the divergent behavior can appear at around a few microns away from the resonator (which will be farther away for higher quality factors such as those in photonic crystal cavities). In any case, the divergent behavior is clearly unphysical for real fields, as we know there should be no enhanced emission in the far field, and the total field must be convergent. This problem can be partly avoided (or fixed) by employing a Dyson equation formalism to reconstruct the full Green function at locations away (outside) from the cavity region 44 . The idea behind the Dyson equation is to self-consistently obtain the solution to the scattering geometry at all locations using the preexisting knowledge of the background Green function and field solution inside the scattering geometry 56 . Using an accurate QNM solution within the cavity region, one can obtain a "regularized" mode from, for any position R outside the resonator. Here, G 0 is the Green function for the background medium and ∆ε(r, ω) = ε(r, ω) − ε B (r) is the total dielectric constant minus the background term ε B (r). In the case of isolated resonators, G 0 can be considered as the (analytically known) homogeneous space Green function 57 , and for resonators coupled to waveguides, could be the background waveguide Green function 58 . Notably, the only assumption used to derive this expression is the validity of the single QNM description within the resonator. Indeed, one can also use this expression in complex frequency space to self-consistently obtain the divergent QNM outside the resonator: In any case, the regularized QNM,F c (r) can be used in a similar Green function expansion as in Eq. (3) to obtain physically meaningful quantities far outside the resonator, where it is fully expected that a single QNM approach will breakdown. This "regularized" mode can then be used at all positions outside the resonator, and has previously been shown to be highly accurate when compared to full dipole calculations 44 . Thus, the general goal with practical QNM theory is to obtainf c and thenF c ; however, this now requires two complex integrations, one to first obtain the normalized QNM, and one to obtain the regularized QNM; especially with metallic resonators, this additional integration can be a complicated process (typically using nm-size grids) and indeed particularly problematic when the background is not so well defined (e.g., in the case of a resonator coupled to an infinite waveguide).

B. Integration-free QNM calculation
We now describe our new integration-free dipole technique for accurately obtaining the QNM, and we also show how it naturally provides the regularized QNM in the far field without the need for further treatment. As discussed before, QNMs form a complete basis only nearby the resonator and result in divergent fields in the far-field region. In general, to assure the correct behavior when propagating to the far-field, it is essential to involve all other system modes into our Green function expansion. This may include all QNMs in complex frequency space as well as the homogeneous medium propagating fields in real frequency space. Mathematically this can be written as G = G c + G others where G others accounts for all necessary additions to Eq. (3) in the far-field. Indeed, the Dyson regularization technique discussed above selfconsistently includes such effects. In contrast, we will adopt an even simpler approach to regularization; we introduce the following ansatz: wheref r c (r) is the real-frequency obtained QNM that is now also regularized in the far-field, and thus we call it a renormalized QNM (rQNM) to distinguish it from the usual far field behavior from a (spatially) divergent QNM. This means that, even in the far-field, a single mode expansion (using a rQNM) can be used to obtain physically meaningful quantities. Note that the subscript "c" on the Green function is no longer needed as we assume that the Green function of Eq. (6) is an accurate representation of full system Green function at all positions, at frequencies close to the resonance frequency ω = ω c .
Consider now a point-source simulation of Maxwell's equation at location r 0 , that can be used to obtain the system response at any location, also returning the dipole self-response term, G (r 0 , r 0 ; ω). This is achieved by monitoring all three components of the electric field at the dipole location to obtain the numerical Green function: where E i (r 0 , ω) is the ith component of the monitored electric field and P j (ω) is dipole polarization introduced along the jth direction, with i and j representing Cartesian coordinates. Assuming that a relatively accurate estimation of the complex frequency for the localized resonance is available, the ansatz of Eq. (6) can be solved to find the complex rQNM field value at the dipole location, where a real-valued dipole moment, d, is assumed. The above quantity is, in fact, all one needs to perform an integration-free normalization for the rQNM. Indeed, when inserted back into Eq. (6), one obtains Note that Eq. (9) now provides the full spatial profile of the rQNM given that one also keeps track of the dipole response at all other locations. However, in practice, the real part of the Green function is problematic for obtaining transverse system modes. In general, the system Green function includes contributions from both transverse and longitudinal modes. In the presence of inhomogeneous and lossy media, these modes can be hard to separate 59,60 , therefore, solutions to Maxwell's equations subjected to dipole excitation can contain both types of modes, and it is not clear how to obtain only the transverse modes, especially for lossy materials. However, as a remedy to this problem, the (well behaved) imaginary part of the Green function at two different frequency points can be used to reconstruct the normalized transverse field, as we discuss below. We begin by finding the rQNM value at the dipole location, r 0 . Consider Eq. (6) at two different real frequencies, ω 1 and ω 2 , that are, for example, located at either side of the rQNM resonance frequency. By using the imaginary part of both sides for each equation and following some simple algebra, we arrive at two independent expressions for the real and imaginary parts of the complex rQNM, at the dipole location: and where Similarly, using the two space-point Green function, one requires the following additional set of two equations to obtain the normalized rQNM at all other locations away from the dipole, given the previously obtainedf r c (r 0 ): and where Note that, as can be seen from Eqs. (10) and (11), only the modal projection along the dipole direction is used to obtain all modal components at all other locations through use of Eqs. (13) and (14). It is worth mentioning that the technique presented here is found to be quite robust against the chosen frequency values (within a maximum 5% discrepancy for metal resonators and 1% discrepancy for dielectric cavity systems).

C. FDTD implementation
As mentioned before, our proposed technique above is quite general in its construction and can be applied, in principle, to any Maxwell solver, both in the time domain and in frequency domain. However, in this work, we will implement our method in FDTD, since it is arguably one of the most popular Maxwell solvers among photonics and plasmonics communities. Indeed, the lack of efficient QNM calculation recipes in real time Maxwell solvers was one of the original motivations behind this work. To explain such motivation and the difficulties behind it in more detail, below we briefly review some of the previous works and attempts in dealing with FDTD Green functions and cavity mode calculations in the time domain.
Regarding the issue of obtaining the complexfrequency Green function in FDTD, there has been some work for studying Casimir effects 61,62 , where a mathematically modified permittivity function is used to map the problem onto a complex frequency space, but it is limited to positive imaginary parts for the frequencies and therefore cannot be adopted to complex frequencies associated with QNMs. In an earlier attempt to extract leaky mode behaviour in FDTD 63 , a simple dipole-response normalization technique was proposed for leaky photonic crystal cavities, but a normal mode picture was taken; indeed, a real-valued mode function was obtained that is known to lack the correct modal phase information (of an open cavity), and the method was cited to apply to dielectric structures only, for reasons that were not explained. The phase of the QNM is a necessity, e.g., for obtaining the correct Purcell factor as a function of position, particularly in plasmonics where very low quality factors are involved. A single dipole appoach with FDTD, with proper time windowing, can return the QNM, but, to allow a proper time windowing of the scattered field, this is usually restricted to dielectric cavities 2 and is again is not in normalized form.
There are other good reasons for why implementing a dipole-response normalization of the QNMs in FDTD is so challenging. For example, a well known problem with using FDTD and other self-consistent Maxwell solvers, stems from the in-phase field component of finite-size dipoles, causing unwanted frequency shifts and a gridsize dependence to the real part of the Green function with equal space arguments, namely G(r 0 , r 0 ), a problem that also occurs with self-consistent local oscillators in FDTD, e.g., through the optical Bloch equations 64 . The Green function in FDTD can be directly obtained by using a point dipole source, defined through where k 2 0 = ω 2 /c 2 , ε(r, ω) is the complex dielectric constant, and we assume non-magnetic materials. For some applications, one can remove the grid-size dependence of FDTD dipoles, by subtracting off the solution from a homogeneous medium with the same computational gridding, so that the scattered Green function for an inhomogeneous medium is G scatt FDTD (r 0 , r 0 ) = G tot FDTD (r 0 , r 0 ) − G hom FDTD (r 0 , r 0 ). However, for the purpose of obtaining the transverse QNMs, particularly in the context of plasmonic resonators, the real part of the scattered Green function is not reliable, because the dipole response is contaminated by the influence of longitudinal modes.
Before assessing the accuracy of this FDTD dipole technique for obtaining normalized rQNMs (and QNMs), we make a few remarks: (i) our normalization technique is quite easy to use with any FDTD method, as it simply involves using the set of analytical equations given by (10) to (15); moreover, the method is practically instantaneous in time once the FDTD dipole simulation is finished; (ii) because the normalization technique requires no spatial information of the mode, from a practical perspective, the computational domain termination using PML can be done as close as possible to the scattering geometry before it alters the modal shape and eigenfrequency, resulting in significantly increased efficiency and less memory/run-time requirements.

III. APPLICATIONS TO VARIOUS CAVITY SYSTEMS IN NANOPHOTONICS AND NANOPLASMONICS
To demonstrate the reliability and capability of our normalization technique, below we consider five different cavity systems, including two hybrid cavity-waveguide designs and a cavity-coupled photonic crystal waveguide. For all calculations, we use Lumerical FDTD 45 and a single mode performance over the frequency region of interest is assumed (and confirmed).

A. Gold cuboids and dimers
First, we study a cuboid gold nanorod with dimensions of 30×100×30 nm 3 placed in a homogeneous background with refractive index of n B = 1.5. This acts as a single mode resonator over a wide range of frequencies of more than 400 meV, as shown in Fig. 2. For metallic regions, the dielectric function can be described using the local Drude model, where we use ω p = 8.29 eV and γ p = 0.09 eV for the plasmon frequency and collision rate of gold 34 , respectively. For the second example structure, two of the same nanorods are used to form a dimer of gap spacing h g = 20 nm. This forms a plasmonic hot spot in the gap, but still behaves in a single mode manner over a similar range of frequencies as the single nanorod.
As an important application of the mode technique, we study the spontaneous emission enhancement factor for dipole emitters when placed nearby the resonant cavity structures of interest. Considering a quantum dipole emitter polarized along n, placed at position r, the generalized Purcell factor can be calculated using 65 F P (r; ω) = 1 + 6πc 3 ω 3 n B n · Im{G (r, r; ω)} · n.
For convenience of studying positions outside of metals (or outside the scattering geometry in general), we have added the extra factor of 1, which is derived from a Dyson equation scattering problem for dipole positions outside the resonator 44 ; otherwise the Purcell factor should be defined without the extra factor of unity (e.g., for dipoles embedded within photonic crystal slabs). For the two nanoresonator systems above, we use a computational domain of 300 × 500 × 300 nm 3 with a fine mesh of approximately 2 nm in every direction, terminated by PML in all directions. The complex resonance frequencies are found to be ω c = 1.46 − 0.09i eV and ω c = 1.29 − 0.11i eV, respectively. The corresponding mode volumes at the dipole location 2 , are also estimated to be V eff /λ 3 = 8.5 × 10 −4 and V eff /λ 3 = 1.6 × 10 −4 . As consequence of the integration-free nature of this technique, with the small computational domain chosen, the entire simulation completes in approximately 30 minutes on a standard desktop with 8 cores, even without spatial sub-meshing. It is of course useful to discuss how this approach compares with other QNM calculation techniques for general shaped cavity structures. First, in comparison to a previously developed FDTD technique 34 , which uses a plane-wave excitation with time filtering with the same sub-meshing: this simulation (for the same metal cavity) takes days to weeks to run as a much larger simulation volume is required to carry out the spatial normalization procedure of the QNM. However, some additional time savings can be made by implemented PML normalization 29 with FDTD 30 , but this requires one to use the PML data (often not available) and a volume integral with the electric and magnetic fields (which requires additional care for field points inside the resonator). Having implemented all three approaches in FDTD, we find that our newly presented dipole normalization method is easily the most efficient to work with, and the most powerful (e.g., it can also do periodic background media as we demonstrate later). With regards to the frequency-domain dipole approach using complex frequencies in COMSOL 31 , we have found that for a complete analysis, this approach takes about the same computational time as the proposed dipole FDTD method, but only for the smaller spatial domains, such as with the nanoresonator devices. However, in our experience, larger hybrid devices run into extreme memory requirements when using finite-element solvers (e.g. with COMSOL). Both approaches have their strengths an weaknesses though, and the COMSOl approach is better for solving multiple overlapping modes (given sufficient computational resources). For the metal resonator calculations here, we implemented a numerical dipole source, located 10 nm away from the metallic surface along the z-axis in the case of single cuboid, and at the center of the gap in the case of the cuboid dimer. One can use the same spatial dipole position to perform both full numerical Purcell factor calculations as well as the rQNM calculation, all within the same one-time simulation, but for different dipole positions, we stress that there is no need to recalculate the rQNM. In Fig. (2), we plot the computed mode profile of the single rQNM of interest for each case along with the rQNM-calculated Purcell factor (which is analytic, after obtaining the mode numerically of course) in dashed-red that compares very well with full dipole calculations using Eq. (7) in solid-blue (the accuracy is within a few %).
To more rigorously confirm the reliability of our rQNM technique, we next perform position-dependent Purcell factor studies for both of the structures discussed above. In Fig. 2, each circle shows an independent dipole calculation (e.g., with no approximations) done at a particular position, while the solid line is calculated using the same rQNM calculated before (which only has to be computed once). In both cases we move away along the x-direction up to 40 nm, where an excellent agreement between our semi-analytical results and the full numerical results is achieved in all cases. In particular, note that the Purcell factor behavior before reaching x = 10 nm is qualitatively different for the single cuboid and the dimer resonator, and clearly the rQNM calculation accurately captures both trends. Such a good level of agreement can be in principle obtained at every location around the resonator for which the rQNM expansion remains valid. At distances far from the resonator, as discussed below in subsection III B, our integration-free rQNMs also recovers the correct physical behavior, and thus we speculate that this rQNM picture can be used in both near and far fields from the resonator, with practically no distinction to the QNM in the near field-where the rQNM and QNM are identical.

B. Implicit far-field regularization: regularized QNMs vs divergent QNMs
In the above, we have shown how the rQNMs are practically identical to the QNMs in the near field (and certainly within the resonator), which is a consequence of the single mode approximation working very well. Unfortunately, in the far field, the single mode approximation of a cavity mode must fail. Although it may seem like an academic question, it is important to have physically meaningful fields at these far field locations as well, e.g., to compute the field that would be detected (e.g., by a detector) from the resonators in quantum optics 66 . In this section, we demonstrate the "regularized" nature of our rQNMs when going to the far-field space region.
As mentioned before, the system QNMs are solutions to a non-Hermitian Maxwell problems with open boundary conditions and are associated with complex resonant frequencies or complex wavevectors. The negative imaginary part for the complex frequency, that describes the energy decay in time domain, leads to an exponential growth of the QNMs in space through e (γcn B /c)x , as one gets far enough away from the resonator. As a general rule of thumb, the divergence behavior of the QNM is become significant around x divg such that (γ c n B /c)x divg ≈ 1. For example, using the imaginary part of the complex frequency for the cuboid dimer design, where γ c ≈ 0.11 eV, x divg = 1 − 2 µm is estimated using this simple argument, which agrees with what will be discussed shortly in Fig. 3. This known feature has been one of the main challenges in normalizing QNMs, and have raised questions as to whether these modes can be used to properly describe certain aspects of experiments in the far-field and with input-output formalisms.
As highlighted earlier, a Dyson equation approach can be used to regularize the divergent QNM in the far-field through use of Eq. (4) in real frequency space. But this approach also requires an additional spatial integration step and is rather complicated for metal structures to implement. However, the computed rQNM, f r c (r), is ob- Near-field and far-field behavior of the integrationfree rQNM versus QNM for the cuboid gold dimer (note the latter is calculated using a completely different FDTD technique 34 ). (a-b) Extended 2D map of the |Re(f r c (r))| and |Re(fc(r))|, respectively. Each colormap is individually normalized to one and the same nonlinear scaling is used to better show the differences. (c-d) Comparison of the corresponding Purcell factors, calculated in the near-field region and in the far-field region, respectively. The inset in (c) shows the relative difference between these two independent calculations. (e) Purcell factor calculations based on the Dyson equation treatment of Fc(r) using Eq. (4) in real frequency space, and fc(r) using Eq. (5) in complex frequency space. In all of these plots, x = 0 represents the origin placed at the dimer gap center.
tained in real frequency space and is thus already regularized. To demonstrate this regularization behavior, we next investigate the positional dependence of the generalized Purcell factor for dipole emitters coupled to the cuboid dimer structure, both in the near field and far field regimes. We first show extended 2D maps (10 µm along x-axis) of the rQNM and QNM spatial modes (as calculated in Ref. 34 ), respectively in Fig. 3(a-b). A nonlinear color scaling is used to enhance the differences be-tween the two approches. In particular, in the far-field the QNM diverges where as the rQNM does not, because our real-frequency QNM calculation technique captures the proper (sum over modes) propagation effects to the far-field. To better highlight these differences, we plot the Purcell factor at various positions using both rQNM and QNM, also in Fig. 3. In Fig. 3(c), for positions close to the resonator, our rQNM Purcelll factor gives an excellent agreement with the QNM as calculated based on the recipe given in Ref. 34. However, in the far-field region, as shown in Fig. 3(d), the rQNM behaves in a converged manner in comparison to the QNM. In particular, it follows the prediction of the post-calculated regularized QNM using the Dyson integral of Eq. (4), that is shown in Fig. 3(e). For completeness however, if one needs to obtain the true divergent behavior of the system QNM in the far-field using our integration free approach, one can easily use the complex-frequency Dyson treatment of Eq. (5); since, to a very good approximation, our rQNM is equivalent to the system QNM inside (and near) the resonator, as clearly demonstrated in in Fig. 3(e). Given the small value of the Purcell factor in the far-field (note we are zooming in from 1000 to 1), the minor discrepancies between (d) and (e) are attributed to small numerical errors (from the spatial integration primarily), and are not a general concern. Thus, these rQNM can be practically used at all spatial positions, without any spatial integration at all. If one desires the rQNM outside the simulation volume domain, then one can easily obtain either the QNM or the rQNM using the Dyson equation as shown above. Thus there is no need to simulate large regions of homogeneous space outside the scattering geometry, and for continuous waveguide one can also safely use PML to limit the space-and run-time requirements.

C. Hybrid metal-dielectric systems
To further emphasize the generality of our technique, and show its applicability for use in more complex emerging devices in hybrid plasmonics, we next study a set of two hybrid devices where the plasmonic single cuboid resonator is either embedded in a ridge waveguide or is placed inside a groove waveguide, such that the shortrange confined mode of the cuboid is coupled to the long-range propagating mode of the waveguide. The dielectric beam waveguide is made of silicon-nitride, with a refractive index of n diel = 2.04 and dimensions of 600 × 800 × 6000 nm 3 . One motivation behind such devices is to design transmission drop lines, but here, for consistency with our other investigations, we focus on the far-field collection efficiency of dipole emitters coupled to the plasmonic sub-system, that can be also of interest in the design of integrated broadband single photon sources; for example, one could excite embedded quantum dots incoherently, and monitor the output scattered field of a single exciton state. For both of these cases, a computational domain of 10 × 5 × 5 µm 3 is used to ensure a sufficiently long waveguide terminated by PML in all directions. Similar to before, a fine mesh of approximately 2 nm was used over the metallic region, that was then refined into the courser mesh of 40 nm everywhere else, using the non-uniform meshing technology in Lumerical FDTD 45 .
In Fig. 4(a) and Fig. 5(a), we plot the generalized Purcell factor, F P , of a dipole emitter placed 10 nm away from the metallic surface (see also Fig. 1). The complex resonance frequencies extracted are ω c = 1.08−0.07i eV and ω c = 1.26 − 0.08i eV, respectively. The corresponding mode volumes are also estimated to be V eff /λ 3 = 6.5 × 10 −4 and V eff /λ 3 = 6.3 × 10 −4 . Both full-dipole calculations (in solid-blue) and rQNM calculations in (dashed-red) are shown, once again with a good agreement. In comparison to isolated resonators, there is a small discrepancy between the rQNM and full dipole calculations at frequencies very far from the resonance, which is likely attributed to the non-negligible influence from dielectric wall/surface scattering effects (possibly yielding small background modes at other frequencies) and the fact that now the single resonator interacts with a propagating mode of the waveguide. Similar to before, a single mode performance is still achieved, but the resonance is red-shifted and sits lower in terms of maximum emission enhancement, due to the lower index mismatch provided by the waveguide.
With plasmonics, one always has some optical quenching of the mode, and it is also important to know how much of the radiative emission of a quantum emitter can couple to the target waveguide mode in the two different configurations mentioned above. This can be quantified for the radiation emitted into the waveguide, Γ rad wg , using the waveguide radiative "beta factor" and for the total radiation available in the entire 4π farfield space (away from the resonator), Γ rad tot , using where Γ P = F P Γ 0 , and Γ 0 the spontaneous emission rate in a homogeneous medium (free space or the dielectric). Thus the total nonradiative coupling is simply The radiative beta factors are shown in Fig. 4(b) and Fig. 5(b), where the solid-blue shows the total radiation available in the far-field, and the dashed-red shows only its portion transmitted through the waveguide interface. This factor also gives the quantum efficiency of a dipole emitter. It is seen that, depending on the waveguide design, the far-field emission can be quite different. In particular, the total far-field radiation from the dipole for the groove waveguide is higher than in the ridge waveguide over its frequency band, mainly because the nanoparticle is not embedded in the dielectric region. However, the dipole emission within the waveguide is considerably less for the groove design, again because the nanoparticle is not embedded in the dielectric. Moreover, the fact that close to 40% of dipole emission can be detected at the end of the ridge waveguide, offers some benefits in comparison to all-metallic plasmonic waveguides (which introduced additional waveguide losses), in applications where signal strength (brightness) from single emitters is more critical.
To better see the mode pattern in the waveguide, in Fig. 4 and For our final example, we apply our technique to a class of devices in photonic crystal platforms, namely cavities coupled to periodic waveguides, that are used for applications such as single photon sources and channel drop filters. This not only demonstrates the reliability of our technique for use in dielectric systems with large quality factors, but also tackles the very difficult problem of normalizing QNMs for the localized cavities that are subjected to the Bloch periodic propagation of the waveguide, as the dominant outgoing channel 37,38 ; in this regime, there are additional complexities and difficulties encountered to regularize an infinite spatial integration 37,38 .
We use a triangular photonic crystal slab of refractive index of n = 3.5, where the lattice constant is d = 240 nm, the hole radius is r = 0.28 d and the slab thickness is h = 164 nm. The structure is 9 × 25 d in size, and is finely meshed with 20 points per lattice period. In particular, we consider two devices, the isolated L3 cavity on its own, and the L3 cavity side-coupled to a W1 waveguide. To minimize any relevant numerical discrepancies, the L3 cavity is placed to the side such that exactly the same structure and computational domain is used for both devices; see   Figs. 6(a)-(b), as for the other cavity structures, we first confirm a very good agreement between the QNM-calculated Purcell factor and the fully vectorial dipole calculations; here we consider a dipole emitter placed inside the L3 cavity, at the antinode and aligned along the y-axis, according to the coordinate system shown in the schematic of Fig. 1. As seen, introducing the waveguide reduces the peak enhancement by close to a factor of 2. The resonance frequencies (real part) are computed to be ω L3 c = 1.3052 eV and ω L3W1 c = 1.3049 eV, with the corresponding quality factors of Q L3 = 5, 200 and Q L3W1 = 3, 300. The associated mode-volumes, calculated at the modal antinode at the center of the L3 cavity are also V L3 eff /λ 3 = 0.0142 and V L3W1 eff /λ 3 = 0.0145, which are found to be very similar for this particular structure (as is often assumed in the community without proof, but in general this may not be the case, especially for low-Q cavities).

Depicted in
In Figs. 6(c) and 6(d), we display the rQNM spatial profile as calculated for both photonic crystal devices, where the in-waveguide section for the coupled device is enhanced for visualization. These two represent xy cuts at the center of the slab. It is evident that the rQNM inside the waveguide behaves different than the waveguide Bloch mode and somewhat inherits the shape of the L3 mode, with repetitions occurring due to the phase dependence of the cavity QNM 58 . Therefore, the naive assumption that simply the system behavior inside the waveguide follows the usual W1 propagation, may not be taken. In addition, note that the details of the transition for the system mode to go from a localized mode within the cavity to propagating within the waveguide, that is nontrivial, is also well captured by the calculated rQNM.

IV. CONCLUSIONS
In summary, we have introduced a new normalization technique for obtaining regularized QNMs of leaky optical cavities and plasmonic resonators, and implemented it with the widely used FDTD algorithm in real frequency space. Our technique requires no spatial integration for post processing normalization of the QNMs, but rather a set of easy-to-use analytical equations are provided that only require the self-consistent response to a dipole excitation at two different frequencies, essentially exploiting an inverse Green function approach. We find this technique to be extremely efficient on both computational memory and run time requirements, and easy to use. We exemplified this dipole normalization technique for several different arbitrarily-shaped plasmonic resonators, dielectric photonic crystal slabs, and hybrid devices in order to show its generality and applicability to a wide range of nanophotonic systems. In particular, the spontaneous emission enhancement factor was studied for quantum emitters placed nearby these systems, where a very good agreement (within a few % at the desired frequency range) between our rQNM calculation and fully numerical solutions of Maxwell's equations were obtained. Moreover, this new technique requires no further regularization of the rQNM in the far-field, as it readily returns the non-divergent system response at distances far away from the resonator. Since the method is easy to implement in commonly used FDTD solvers such as those available from Lumerical solutions 45 and MEEP 67 , it is an attractive tool for the community seeking true "cavity modes" for a wide range of complex structures. support. We also thank Lumerical Solutions Inc. for support, and Philip Kristensen and Simon Axelrod for excellent suggestions and discussions.