{'fraction_non_alphanumeric': 0.03458835341365462, 'fraction_numerical': 0.011596385542168675, 'mean_word_length': 4.3825992974871655, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Inverse Design in the Complex Plane: Manipulating Quasi-Normal Modes

Utilising the fact that the frequency response of a material can be decomposed into the quasi-normal modes supported by the system, we present two methods to directly manipulate the complex frequencies of quasi-normal modes in the complex plane. We first consider an `eigen-permittivity' approach that allows one to find how to shift the permittivity of the structure everywhere in order to place a single quasi-normal mode at a desired complex frequency. Secondly, we then use perturbation theory for quasi-normal modes to iteratively change the structure until a given selection of quasi-normal modes occur at desired complex frequencies.


I. INTRODUCTION
Quasi-normal modes (QNMs) are the complex frequency bound states of a system. They were first used in quantum mechanics to describe alpha decay [1,2], and have since found utility in modelling radiation in many different systems, from black holes [3], photonic resonators [4] to leaky waveguides [5,6]. QNMs correspond to the poles of the scattering matrix in the complex frequency plane [7,8], where the waves at the boundary of the system are purely out-going. The effect of a structured environment can, for example, be analysed by decomposing the Purcell factor in terms of these QNMs [9], and through calculating how small changes in the system perturb the QNMs, deeper insight into sensing has been developed [10,11]. Here, motivated by the connection between the location of poles in the complex plane and physical properties such as transmission, we combine ideas from inverse design with the QNM approach to modelling resonator systems to design materials that have poles at specific complex frequencies. Perhaps the simplest example of a system supporting QNMs is a homogeneous dielectric slab (refractive index n R in some background index n B ).
For this simple case, the complex frequencies of the QNMs can be found analytically [3,4] as k m L = 2πm + i ln (n R − n B ) 2 / (n R + n B ) 2 2n R , where m is an integer and L is the width of the slab. Figs. 1(a-c) demonstrate that poles in the reflection coefficient as a function of complex k correspond to QNMs, which are in turn associated with peaks in transmission. Examining the field, shown in Fig. 1(c), at a complex k value associated with a QNM shows the characteristic exponential growth in space.
More complicated systems can also be understood in terms of QNMs. For example, multilayer dielectric absorbers (e.g. the mid-infrared absorber presented in [12]) can be understood this way. The absorption of the structure given in [12], along with the reflection coefficient in the complex wavelength plane is shown in Figs. 1(d-e). Fitting the Lorentzian to the absorption peak, we find the peak wavelength is λ 0 = 5.15µm and the linewidth Γ = 0.0138µm. This corresponds to a pole of the reflection coefficient in the complex plane at λ 0 + iΓ, as shown in Fig. 1(e).
While QNMs provide a valuable framework to understand resonators, the ability to design shows a single QNM. The absorption spectrum (e) shows a large resonance in the mid-IR, with a resonant frequency (λ 0 ) and linewidth (Γ) directly associated with the QNM, which can be understood in terms of the poles of the associated Lorentzian (red dashed line).
When designing spectral features, one can employ the physical insight provided by QNMs to greatly simplify the problem. For example, one way to approach the inverse design problem for absorbers is to try to move the QNM to a desired complex frequency [22]. In this way, one can tailor scattering effects [23], design absorbers [24] and manipulate exceptional points [25] with minimal numerical complexity. To date, however, these approaches address the forwards problem, finding how the pole moves if the resonator geometry is changed.
We instead solve the inverse design problem of designing materials with poles at specific complex frequencies, using only simple techniques.
We present two methods for placing QNM poles at arbitrary complex frequencies. Firstly, we re-formulate the eigenvalue problem of the Helmholtz equation to find a complex constant value by which the permittivity of a structure should be shifted to place a pole in the desired location. Secondly, we employ QNM perturbation theory to find how to change the spatial distribution of material to move around several poles in the complex frequency plane. These methods enable the simultaneous control of resonance wavelength and linewidth, for the design of absorbers and sensors.

II. EIGEN-PERMITTIVITIES
One way to find the locations of quasi-normal modes (QNMs) is to formulate the Helmholtz equation for the out-of-plane electric field φ, as an eigenvalue problem for complex wave-numbers k However, to find the QNMs the correct boundary condition must be imposed on φ. Originally derived by Sommerfeld [26], but since used to model black hole radiation [27,28], the appropriate boundary condition is that the wave is purely outgoing. For example, on the either side of a planar medium, as x → ±∞. To numerically find the QNMs of our system, we imposed this boundary condition within a finite difference approximation, adapting the elements of the Laplacian at the boundaries e.g. for N points the value of the field at the final point on the right of the system is fixed to be φ N +1 = φ N + ik∆xφ N , giving It is now evident that solving the eigenvalue problem required to find the QNMs is challenging [29] as the eigenvalue k 2 also appears in the boundary condition. To avoid solving this nonlinear problem, it has recently been noted by Chen et al. [30] that the analysis of QNMs can be simplified by working in terms of real wave-numbers but extending the permittivity into the complex plane. Despite the utility of the normal mode framework of Chen et. al. [30] for employing modal expansions we are trying to engineer the resonance location (related to

Re[k]) and linewidth (given by Im[k]
). The location of the QNM frequency trivially encodes these features we are trying to engineer. Employing the insight of Chen et. al., we write the permittivity as a spatial variation plus a constant background ε(x) = ε s (x) + ε b allows us to recast the Helmholtz equation as an eigenvalue problem for the permittivity Rather than using this to find the QNMs of a system, we show that this can be used to design the complex frequencies of the QNMs.
To do this, we take a known spatially varying permittivity, such as the dielectric step or absorber stack e.g. from [12], and choose a k ∈ C at which we would like a QNM to occur. We then numerically solve the eigenvalue problem Eq. (6) using the finite difference method Eq. (5), along with standard matrix libraries, to find a complex eigen-permittivity that allows us to form a structure with ε(x) = ε s (x) + ε b with a pole at the chosen complex frequency.
We first apply the method to the homogeneous slab. In Fig. 2 we design the new structure to support a QNM at the frequency k = 1.5 − 0.05i. For the N × N Laplacian matrix, there are N possible values for ε b that will satisfy this condition. Taking the lowest absolute valued background (to minimise numerical error) permittivity ε b = −4.99 − 2.32i, we find that the new structure now supports a QNM at our chosen k. This is shown in Fig. 2(a).
The transmission, Fig. 2 QNM and has values |t| > 1 due to the gain that has been added to the system. Although the location of the pole can be manipulated solely by changing the height of the barrier, in order to manipulate the real and imaginary parts independently, control over both the real and imaginary permittivity is required. As might be anticipated, in order to move a pole closer to the real frequency axis, without changing the resonant frequency, gain is required.
Conversely, loss is required to move the pole further away from the real axis. The field profile, shown in Fig. 2(c), still has the exponential growth characteristic of QNMs.
Next, we apply the same eigen-permittivity method to the absorbing stack shown in Fig. 1(e). For this structure, we must take care that the correct boundary conditions are imposed. The opaque metal substrate requires the Dirichlet boundary condition φ = 0, while the outgoing wave boundary condition must be imposed at the top of the stack.
Choosing two target bandwidths, for the same resonance wavelength, λ 1 = (6.5 + 0.03i)µm and λ 2 = (6.5 + 0.15i)µm, we obtain background permittivities of ε b,1 = 3.27 − 0.01i and ε b,2 = 3.28 + 0.29i. The effect of the background shift on the pole locations is shown in Fig. 3(a-b). Accordingly, the poles are found at the expected complex frequencies. The absorption, shown in Fig. 3(c) plotted along the white dashed line (Im[λ] = 0) is also provided, with a fitted Lorentzian to extract the properties of the resonances and verify that it corresponds to the QNM frequencies.
We can also apply this design procedure to impose the condition of coherent perfect absorption (CPA) at a given complex frequency. This can be understood as the time reverse of QNMs [32] were the wave is purely incoming rather than outgoing. The wavelengths at which a structure behaves as a perfect absorber are related to the locations of zeros on the real axis, rather than poles. With our eigen-permittivity formulation, we can find the background permittivity value required to make the device a perfect absorber at a frequency of choice. To do this, we simply take the outgoing boundary condition Eq. (4) and replace it with the incoming boundary condition as x → ±∞. This changes the boundary elements in the Laplacian Eq. (5) from ik∆x − 1 to −ik∆x − 1.
Applying the above changes to the Laplacian matrix, we can take e.g. a slab of dielectric, and rather than choose a complex frequency, pick a real frequency that we wish CPA to occur at. We take a dielectric slab of length L = 1 and initial permittivity π 2 and choose the arbitrary CPA frequency to be 125 MHz. The resulting background permittivity required is b = −9.55 + i0.63. To verify that there is coherent perfect absorption at the chosen frequency, we construct the scattering matrix for the slab under incidence from the left and noting that CPA occurs when an eigenvalue of the scattering matrix goes to zero [32].
The scattering matrix can be constructed analytically from the transfer matrix or found numerically in full-wave solvers such as COMSOL [31]. In Fig. 4 we plot the smallest For the broadband case, we must fit a sum of 3 Lorentzians to accurately model the spectral profile, and obtain the correct fitting parameters. So far, all of the examples provided have been in 1D. However our method is straightforwardly extended to higher dimensions. To illustrate this we consider a 2D square dielectric resonator, shown in Fig. 5(a). The resonator is a silicon cross inside a gallium arsenide square. To find how to change the permittivity to place a pole at a particular complex frequency, we must solve the eigenvalue problem Eq. (6) in 2D. To do this, we use COMSOL's coefficient form PDE interface, which allows one to solve problems of the form where λ is the eigenvalue. Choosing the coefficients to be e a = 0, c = 1, d a = 1, a = −k 2 ε, this becomes exactly the eigenvlaue problem we would like to solve where λ = k 2 ε b . The outgoing wave boundary condition can be applied to the outside edge of the resonator using the 'flux/source' boundary condition. Generally, this boundary condition is where n is a unit-vector normal to the surface of the resonator at a given point. It is not necessary for n to be normal to the surface, it only needs to point outwards. With our parameter choices this becomes n · ∇φ = −qφ.
Setting q = ik gives the correct out-going boundary condition. Solving this eigenvalue problem for the 2D geometry shown in Fig. 5(a), and choosing the location of the pole to be f = 500 + 1i THz, we find a background permittivity of ε b = −1.37 + i0.88. To verify that a QNM is now located at the correct complex frequency, we excite the resonator with a nearby point dipole and examine the total scattered power before and after the permittivity shift is applied. This is shown in Fig. 5(b). Once the shift is applied, there is a clear peak in scattered power at the desired wavelength. Additionally, the fields when the resonator is driven at 500 THz are shown in Fig. 5(c-d). Once the permittivty of the resonator is shifted, scattering at the desired frequency is greatly enhanced by the presence of the QNM.
Although simple to implement, this eigen-permittivity method only allows you to choose the complex frequency of a single QNM. We now explore the possibility of applying an iterative method to move one or more QNMs to desired complex frequencies, by changing the spatial variation of the permittivity profile.

III. OPTIMISATION APPROACH TO MOVING POLES
The second method we present to move quasi-normal modes (QNMs) to desired complex frequencies is to use an iterative procedure, based on perturbation theory. Standard Rayleigh-Schrödinger perturbation theory [33] of Hermitian quantum mechanics connects permittivities, ε 1 (silicon at 550 nm) and ε 2 (gallium arsenide at 550 nm). We apply our framework to find a permittivity offset to move a pole to the complex frequency (500 + 1i) THz. The background is ε b = −1.37 + i0.88. To verify the location of the pole, we excite the resonator with a point electric dipole, located at (-1100 nm, 0), and calculate the total scattered power, shown in b). A clear peak is present in the spectrum of the shifted structure at the desired frequency of 500 THz, which is not present in the spectrum of the un-shifted structure. Examining the fields of the resonator driven by a nearby dipole at a frequency of 500 THz, c) and d), we see that the excitation of the mode in the sifted structure greatly increase the scattering. a change in the potential δV to a change in the n th energy level E n through the matrix element δE n = φ n |δV |φ n , where the states are normalised so that φ n |φ m = δ nm . Usually the perturbation to the potential is known and the energy level shifts are calculated (e.g. in the textbook analysis of the Stark effect [33] §76). Being able to analytically connect structure and function is the key to inverse design, allowing one to find derivatives of a quantity of interest (here, the energy) in terms of derivatives of the structure (the potential). With this observation, it is possible to use perturbation theory backwards to find how one should change the potential to get a particular energy level. This idea can be extended to move the complex frequency of a QNM of an electromagnetic resonator. Instead of a potential, we seek to design a permittivity profile ε(x) that has a QNM, k n , at a particular complex frequency. However, as QNMs grow in space, they cannot be normalised. The expressions that connect a change in the permittivity profile to a change in the complex wave-number k n requires some modification.
Regularisation techniques have been used to develop a perturbation theory for QNMs in both quantum mechanics [34,35] and electromagnetism [36]. Perturbation theory can be used to connect a change in the permittivity δε(x) to a change in the complex frequency of the QNM [37] through where k = k + ik and the inner product is now [35] φ n |φ n = If we change the permittivity by a small amount ∆ε at a particular location x i so that As this is true for all x i , we can divide by the small change in permittivity to find the gradient of the wave-number with respect to the permittivity Importantly, this gives a continuous function for the derivative of the complex frequency of the QNM with respect to the spatial structure of the permittivity. For example, say we would like to move mode k n to the complex frequency k . We can write a suitable figure of merit and it's derivative as Updating the permittivity from iteration i to i + 1 is done according to where γ is the step size. This makes the evaluation of the figure of merit gradients extremely efficient, similar to the adjoint method [38]. Combining this with gradient descent optimisation [39], we have found how to update the permittivty distribution in order to arbitrarily change the complex frequencies of the QNMs.
An example of this procedure is shown in Fig. 6. We begin by selecting a QNM of the system: the frequency of which we want to modify. The complex wave-number of this mode can be found by root-finding in the complex plane, using i.e. Newton's method. Specifying a target frequency of the pole k , then using Eqns. (17,19,20) to iteratively update the permittivity distribution allows the pole to be moved to the desired complex frequency. At every iteration, φ n and k n must be re-calculated. In the example of Fig. 6 we move the pole originally at k = 1 − 0.1i to k = 0.8 − 0.01i, and show that yields a structure with a peak in transmission at the designed frequency with the designed width. It should be noted that while we can move the pole to an arbitrary complex frequency, complete control of both the real and imaginary parts of the permittivity is required.
As another example of this method, we consider trying to move several poles simultaneously. In Fig. 7 we take the poles originally at k = 1 − 0. and its transmission coefficient in c). Clear peaks are seen at the three target values of k.
The path of the poles over the optimisation is shown in d).

IV. CONCLUSIONS AND OUTLOOK
In this work we address the inverse design problem: 'how should one change a photonic system to ensure a quasi-normal mode appears at a pre-determined complex frequency?'.
We propose two approaches to answer this question. The first is to re-express the permittivity of a system as the original permittivity profile, plus some global background shift ε s (x) + ε b . This allows us to write the Helmholtz equation as an eigenvalue problem for the background permittivity ε b . By choosing a target complex frequency, we can find a (complex) background permittivity that can be added to the structure so that a QNM occurs at the desired complex frequency with the desired linewidth. This method could be used to modify existing structures to control the frequency and bandwidth of a resonant system.
We also show that we can apply this method in order to construct materials that, at a single frequency of operation, act as coherent perfect absorbers.
The second approach we develop is an iterative procedure based on perturbation theory: a small change in permittivity can be connected to the shift in complex frequency of a QNM.
By defining a suitable figure of merit, and combining with gradient descent optimisation, we can iteratively change the spatial permittivity profile to move a QNM closer to a target frequency. This procedure can also be used to move multiple QNMs to different target frequencies. This iterative approach can be further modified in many ways. For example by restricting the search space of δε to only allow loss rather than gain, or to ensure ε(x) > 1.
Also, rather than manipulating the full spatial form of ε, we could seek to change only a few free parameters such as width and height of the dielectric step.
The approaches we have developed open up several avenues of exploration to design, for example, broadband absorbers for solar cells and thermal emitters. Since the framework also applies to leaky waveguides, our methods could also be used to design leaky-wave antennas.
Rather than manually changing structural parameters until a QNM appears at the correct complex frequency, the methods we present leverage the benefits of inverse design to rapidly design materials that have the desired properties. Importantly, as our methods allow QNMs to be placed exactly, both resonance frequency and linewidth can be tuned with a high degree of accuracy.