Ab initio few-mode theory for quantum potential scattering problems

Few-mode models have been a cornerstone of the theoretical work in quantum optics, with the famous single-mode Jaynes-Cummings model being only the most prominent example. In this work, we develop ab initio few-mode theory, a framework connecting few-mode system-bath models to ab initio theory. We first present a method to derive exact few-mode Hamiltonians for non-interacting quantum potential scattering problems and demonstrate how to rigorously reconstruct the scattering matrix from such few-mode Hamiltonians. We show that upon inclusion of a background scattering contribution, an ab initio version of the well known input-output formalism is equivalent to standard scattering theory. On the basis of these exact results for non-interacting systems, we construct an effective few-mode expansion scheme for interacting theories, which allows to extract the relevant degrees of freedom from a continuum in an open quantum system. As a whole, our results demonstrate that few-mode as well as input-output models can be extended to a general class of problems, and open up the associated toolbox to be applied to various platforms and extreme regimes. We outline differences of the ab initio results to standard model assumptions, which may lead to qualitatively different effects in certain regimes. The formalism is exemplified in various simple physical scenarios. In the process we provide proof-of-concept of the method, demonstrate important properties of the expansion scheme, and exemplify new features in extreme regimes.


I. INTRODUCTION
Scattering theory is a major tool in a variety of platforms. However, particularly for quantum dynamical systems, solving the scattering problem is often difficult, not least due to the infinitely many degrees of freedom provided by the scattering continuum. Consequently, it is a crucial task to reduce the complexity of the theoretical description by extracting the relevant degrees of freedom of the system. In practice, these often turn out to be only few, especially when the system features resonances or long-lived decaying states [1,2], as is the case in various platforms of quantum dynamics. To name a few examples, electronic transport in mesoscopic physics [3][4][5] and resonances in atomic [6,7] and nuclear [8,9] physics can often be interpreted as particles scattering on a Schrödinger potential, while light scattering in cavity QED [10][11][12], photonics [5,13], and many other optical platforms is governed by Maxwell's equations.
In quantum optics, this idea of few relevant modes has been implemented in a famous model known as the inputoutput formalism [14][15][16]. It is based on a system-bath Hamiltonian where a few modes characterizing the system's dynamics are coupled to an external continuum. The few-mode character of this model enables a variety of approximations and as a result system-bath methods form the cornerstone for a large bulk of theoretical work [17,18] and an impressive toolbox has been developed to apply the input-output formalism to various problems and physical situations, including cavity QED [17,19], quantum networks [20,21] and photon transport [22][23][24]. It further allows to connect the scattering properties of such systems to well studied few-mode models for light-matter interaction, such as the single-mode Jaynes-Cummings model [25] and its generalizations, including the Rabi model [26][27][28], the Dicke model [29][30][31], and many more. However, despite their success, there are several open questions related to input-output models. In many cases, the input-output formalism is applied phenomenologically [17], that is the structure of its Hamiltonian is assumed and its parameters are fitted to data. For good cavities or more generally isolated resonances, this approach is natural, since one would not expect a weakly leaky system to differ grossly from a completely closed system. However, the applicability of input-output theory has been debated in the bad cavity and overlapping modes regimes [32][33][34], for systems with absorption [35], as well as more recently in the ultra-strong and deepstrong coupling regimes [36,37]. Besides these fundamental concerns, due to the unknown origin of the Hamiltonian there is often no systematic way to calculate the phenomenological coupling and decay rates, which inhibits design possibilities. Additionally it is unclear in what circumstances the method is appropriate, hindering applications in more general scattering theory settings beyond quantum optics [38,39], which have been sparse so far.
A number of ab initio methods have been developed to address these issues, and much progress has been made pursuing multiple avenues, such as macroscopic QED [35,[40][41][42][43][44] and modes-of-the-universe [45][46][47][48] approaches for quantum optics. In general wave mechanics and scattering theory, alternative ways to rigorously extract the relevant dynamics were investigated, including quasi-modes [33,[49][50][51][52][53][54][55][56], the related constant flux states [46,57,58], and various methods from the theory of chaotic scattering [9,[59][60][61], all of which have found multiple applications. While these approaches do not raise the concerns of few-mode Hamiltonians, they only rarely connect to the large toolbox available in fewmode input-output theory, and are consequently often limited in other ways. A major step forward was the ab initio derivation of a system-bath Hamiltonian with infinite number of system modes for Maxwell's equations by Viviescas&Hackenbroich [62]. This motivates the question whether such a connection to ab initio methods could also be established for few-mode theory, and how to rigorously reconstruct the scattering information from such Hamiltonians using input-output methods.
Here, we derive an exact link between standard scattering theory, few-mode Hamiltonians, and the input-output formalism. Our results are based on and extend methods from system-bath theory in quantum optics [62], scattering theory in quantum chemistry [63], and quantum field theory [47], with the goal to make input-output methods a general and rigorous tool for second quantized scattering problems. In combination, our work connects phenomenological models in cavity QED to ab initio quantization and shows that the input-output formalism can be applied in extreme regimes such as the overlapping modes regime [59,[64][65][66], and the ultra-strong or deepstrong coupling regimes [67][68][69]. We find crucial differences between the ab initio approach and common model assumptions, such as frequency dependent couplings and cross-mode decay terms, as well as a background scattering contribution, all of which are significant particularly in the overlapping modes regime and may cause qualitatively new effects. We emphasize that despite these differences, our ab initio version of the input-output formalism does not increase the theoretical complexity of the problem compared to phenomenological models, only the coupling constants have to be calculated from the scattering geometry as a first step. The latter further offers design opportunities.
Beyond cavity QED our results show the equivalence between the input-output formalism and standard scattering theory, paving the way for the application of simple system-bath models to more general quantum scattering problems. The latter promotes existing methods from wave scattering theory as they are used for example in chaotic scattering [70], nuclear physics [9], mesoscopic physics [3,5] and non-Hermitian systems [59,60,71] to the second quantized level [65]. Fig. 1 provides an overview of the results presented in this paper and explains its structure. The left hand side represents established ab initio methods based on the canonical quantization of the wave equation. In this paper we consider the Schrödinger equation, as well as a special case of Maxwell's equation for a dielectric medium as particular examples of wave equations. Fig. 1 depicts the more general principle illustrated by a model potential (blue) with a schematic normal mode (orange). The normal mode basis is convenient, since it diagonalizes the Hamiltonian, which is obtained from the canonical quantization procedure. In Sec. II A, this approach is reviewed for the Schrödinger equation. The normal modes then obtain associated operatorsĉ (Sec. II B). The equations of motion for these operators can be solved using standard scattering theory, to obtain the scattering matrix (Sec. III). Throughout the paper, we will denote this approach as the normal mode approach (NMA). On the right hand side, the few-mode approach (FMA) is de-picted, on which we focus here. It is usually employed in the form of phenomenological models, featuring a small number of discrete system modes coupled to an external bath with coupling constant W and complex energy shift / loss rate Γ. The input-output formalism is then used to calculate the scattering between the bath modes via the system modes.
As our first result, we project the full problem into a system-bath representation in Sec. II C and use it to derive an ab initio few-mode Hamiltonian for the Schrödinger field in Sec. II. As our main result, in Sec. IV, we rigorously reconstruct the full scattering matrix obtained in Sec. II from our Hamiltonian using a suitable input-output formalism. We in particular show in Sec. IV B that the equivalence to the full scattering solution obtained from NMA can only be established if a so-called background scattering term is included, which translates the bath modes scattering on the system into the asymptotically free modes. Our results thus not only connect the Hamiltonians on each side, which govern the dynamical equations of the system, but also the methods for computing scattering observables. This promotes the FMA and the input-output formalism to a rigorous theory and allows the two pictures to be used as equivalent approaches, which each have their advantages in practical situations. In Sec. V, we present corresponding results for the dielectric Maxwell equations, which form the basis for major fields of application of input-output models such as cavity QED. These results are brought into a practical context in Sec. VI by comparing the results derived here with corresponding phenomenological approaches. Finally, Sec. VII discusses a Fabry-Perot cavity with variable mirror quality and a double barrier tunneling potential as example systems to illustrate our results, before we conclude in Sec. VIII. The appendices give details on the formalism.

II. AB INITIO FEW-MODE HAMILTONIANS
In order to link the FMA to the NMA, we begin by establishing a direct connection between the typical Hamiltonians in the two fields (see Section II labels in Fig. 1). On the NMA side this is a diagonal normal modes Hamiltonian which can be obtained from the canonical quantization of a wave equation [72,73]. On the FMA side a "system" and a "bath" appear as coupled degrees of freedom [17] (see Fig. 1). Via a suitable basis transformation [62,63], we show that the two descriptions are equivalent for an arbitrary number of system modes. Based on this equivalence, we will promote the few-mode input-output model to an ab initio theory in Sec. IV.
Our technique can be applied to a general class of wave equations. In this Section, we demonstrate its working principle on the Schrödinger equation FIG. 1. Schematic of the theoretical connections presented in this paper. The left hand side represents the normal-mode approach (NMA) to quantum potential scattering, where one can rigorously obtain a Hamiltonian from canonical quantization. The latter is conveniently expressed in terms of normal mode operatorsĉ (top left picture). The right hand side represents the few-mode approach (FMA), usually employed in terms of phenomenological models. There, a discrete set of system modes is coupled to a continuum of bath modes (top right picture), corresponding to operatorsâ andb, respectively, with coupling constant W and loss rate Γ. We show that the Hamiltonians on each side can be connected by a basis transformation. A common method to calculate scattering observables in FMA, known as the input-output formalism, can further be connected to standard scattering theory by inclusion of a background scattering contribution. Having shown that the Hamiltonians as well as the methods for calculating scattering observables can be rigorously connected, allows the normal-mode and the few-mode approaches to quantized potential scattering theory to be regarded as equivalent.
where ψ(r, t) is the wave function, H = H 0 + V (r) is the first quantized Hamiltonian, V (r) is a real-valued potential that vanishes at large |r| and H 0 = K = − 1 2 ∂ 2 ∂r 2 is the free kinetic energy operator. For simplicity, we work with = m = 1 and restrict ourselves to one dimension, the technique is however not limited to this setting.

A. Canonical quantization
Second quantization (see Appendix A for details) of Eq. (1) yields the Hamiltonian whereψ(r, t),ψ † (r, t) are now operators with bosonic commutation relations

B. Normal mode basis & Fock space
It is useful to write the second quantized Hamiltonian in terms of normal mode creation and annihilation operators. To this end the field operator can be expanded in a normal mode basiŝ Here, the normal mode φ m (r, k) is defined as an eigenstate of the time-independent Schrödinger equation with energy E(k) and further quantum numbers denoted by the index m.
With appropriate mode normalization (see Appendix B) the second quantized Hamiltonian iŝ The normal mode operatorsĉ m (k, t) satisfy the canonical ladder operator commutation relations, for example, We note that in the normal mode basis, the Hamiltonian is diagonal. The normal modes generally form a continuum, since they include scattering states, and are also known as modes-of-the-universe in the context of electromagnetic radiation [45].

C. System-and-bath representation
To obtain a system-and-bath representation of the Hamiltonian [62], we would like to split the normal mode operators into a discrete set of system operatorsâ λ and a continuum of bath operatorsb m (k) via a basis transformation of the form where α * λm (k) and β * mm (k, k ) are expansion coefficients. This separation of the Hilbert space into two parts will give a Hamiltonian with couplings between the system and the bath modes, thus a non-diagonal Hamiltonian. A similar basis transformation with infinite number of system modes was obtained by Viviescas&Hackenbroich [62]. Our method extends their approach, such that the discrete set of system modes denoted by Λ Q can be chosen to contain only few or even a single mode, and does not need to span a region in position space as a basis. This way effective few-mode theories capturing the relevant resonant dynamics can be formulated.
However, constructing such a few-mode basis is nontrivial. For Eq. (8) to be a consistent basis transformation, the system and bath together have to span the original Hilbert space. To connect to quantum noise theory [17], we would also likeâ λ andb m (k) to be bosonic operators, which places a restriction on their commutation relations, and the Hamiltonian to be of so-called Gardiner-Collett form [16,17]. In the following we show that all of these conditions can be ensured by using Feshbach projections [63,74] to select a certain set of system states corresponding to the second quantized system operatorsâ λ .

Feshbach projection for states
The idea of the Feshbach projection formalism [74] is to reformulate the Schrödinger equation Eq. (1), which describes the wave propagation in the full Hilbert space, in terms of wave equations in two subspaces, which are then coupled to each other. In this spirit we follow Domcke [63] to first express the eigenstates of the Schrödinger equation in terms of the subspace eigenstates.
We start by defining projection operators Q, P such that P 2 = P, Q 2 = Q, P + Q = 1 .
Q will correspond to the system subspace and P to the bath subspace, which together span the full Hilbert space. However, we note that in the few-mode case, Q and P itself generally do not correspond to disjunct regions in position space. Specifically, the Q-space projector is defined by choosing a set of system modes Λ Q = {|χ λ }, which are discrete normalized states that span the Q-space such that We further require ‡ that these states be eigenstates of the projected Q-space Hamiltonian H QQ = QHQ, that is Analogously, we can define the bath modes |ψ m (k) as eigenstates of the P -space Hamiltonian These states form a continuum and can only be determined uniquely after choosing appropriate boundary conditions [63,75], which will become relevant in the context of scattering in Section III. We note that the hermicity of the subspace Hamiltonians implies certain orthogonality conditions for their eigenstates (see Appendix B for details), which will become relevant in the context of quantization in Section II C 2.
We can now write the eigenstates in full space as an expansion over the subspace eigenstates This can be interpreted as a system-and-bath expansion of the normal mode states. Importantly, the coefficients β mm (k, k ) = ψ m (k )|φ m (k) (15b) ‡ This requirement is imposed to obtain a Hamiltonian in the second quantized case, where the system states do not couple to each other directly. It does not restrict the generality since Q and H QQ commute.
can be calculated without direct knowledge of the normal mode functions φ m (r, k) by so-called separable expansions (see Appendix C for details), which can have computational advantages [63].

Feshbach projection for operators
The separation of the dynamics into two coupled subspaces can alternatively be formulated in Fock space by introducing operatorsâ λ andb m (k) corresponding to the system modes |χ λ and bath modes |ψ m (k) , respectively. It can be shown (see Appendix D) that analogously to Eq. (14), the normal mode operators relate to these system-and-bath operators viâ which is the operator system-and-bath expansion Eq. (8), with the coefficients now given by Eqs. (15). In addition, the operatorsâ λ andb m (k) fulfill the desired commutation relations [62] (see Appendix D for details), that is they are each bosonic degrees of freedom and the system commutes with the bath. It was previously unclear whether the latter holds in the bad cavity regime and alternative models have been suggested [34]. Now, the condition can be ensured constructively using the Feshbach projection method, even in the few-mode case.

D. Ab initio few-mode Hamiltonian
Applying the system-and-bath expansion Eq. (16) to the second quantized Hamiltonian Eq. (6) and using Appendices D, E we obtain with the coupling constants We have thus derived an ab initio few-mode Hamiltonian of Gardiner-Collett form for the Schrödinger equation.
Note that the few-mode Hamiltonian exactly captures the system's dynamics, equivalently to the Hamiltonian in its normal mode representation Eq. (6), even though the system modes are discrete and their number is finite. We expect this feature to be useful when interactions such as atoms are present inside the cavity, since then few-mode approximations for the cavity-atom coupling can be constructed systematically while the cavityenvironment coupling is treated exactly. We note that Eq. (17) generalizes the Hamiltonian derived by Viviescas&Hackenbroich [62] from an infinite to an arbitrary number of system modes and to a general class of wave equations. More importantly, as we will show in the following sections, an ab initio input-output formalism can now be used to reconstruct the scattering information, which for Viviescas&Hackenbroich's Hamiltonian [62] is hindered by the appearance of divergent series in the infinite mode case (see Appendix F). Due to the non-trivial behavior of this limit, which was already noted in [63], the few-mode Hamiltonians proposed here are better suited to achieve this task.

III. QUANTUM POTENTIAL SCATTERING
In practice, system-and-bath Hamiltonians are most commonly used as phenomenological models for quantum mechanical systems [17,19]. Their great value arises since scattering observables can be calculated using the famous input-output formalism [17,19], which is a standard tool in quantum optics. Despite its success, the input-output formalism only addresses the scattering problem from the perspective of a model Hamiltonian, which the inventors called a "simplified representation of reality" [17]. In the previous section, we showed how to rigorously derive few-mode system-and-bath Hamiltonians from canonical quantization, and thereby eliminated the need for the ad-hoc assumption of a model Hamiltonian. With this ab initio version of the Hamiltonian at hand, we now have the tools to connect the input-output formalism to scattering theory.
To set a foundation for comparison, in this section, we first derive scattering theory results in the first and second quantized setting as a reference (see also Section III labels in Fig. 1

).
A. First quantized potential scattering theory

Standard scattering theory
For a wave equation such as the time-dependent Schrödinger equation Eq. (1), the scattering problem is given by the question of how an incoming wave-packet defined in the infinite past evolves into an outgoing wavepacket in the infinite future [75]. For elastic scattering this information can be encoded in the on-shell scattering matrix S mm (k), which is defined by the linear relation between the states |φ The states |φ (±) m (k) are the normal modes defined in Eq. (5) as eigenstates of the Hamiltonian. The (±) corresponds to a choice of boundary conditions. As usual in scattering theory (+) is the state with a controlled incoming free state, and (−) is the state with a controlled outgoing free state [75].
Another useful scattering quantity is the transition operator T defined by where G (+) 0 is the free propagator given via the free Hamiltonian H 0 as and |k m is an eigenstate of The operator T thus quantifies transitions between a full eigenstate and a free eigenstate. It is linked to the onshell scattering matrix defined above via [75] S The scattering properties can thus be obtained by solving the eigenproblem for the full Hamiltonian and computing their transition probabilities to freely propagating states.

Potential scattering via projection operators
Domcke showed [63] that instead of using the eigenstates in full space, the scattering matrix can also be calculated from the system and bath states that we used in Section II. Details on the calculation are summarized in Appendix G. Here we will focus on the definitions and the interpretation of the results relevant to our work. The relation between the different states and scattering matrices used below is illustrated in the left part of Fig. 2.
We first define a transition operator T res by considering the bath modes as "free" states. Analogously to Eq. (20), omitting matrix subscripts for brevity, we can write whereG (+) is the Green function for P -space propagatioñ We can then quantify the scattering between bath states by a scattering matrix where T res (k) is the matrix element of T res on the basis of retarded bath states. However the bath states are not necessarily free states. Therefore there is a residual scattering contained in the asymptotic structure of the bath states, which can be for potential scattering problems. The full scattering matrix S can be used to relate asymptotically free states or operators to each other. The background scattering S bg arises from a basis transformation of the free states into the bath states. The bath states scatter via Sres on the system states, which span part of the region where the scattering potential V (r) is non-zero. Similarly on the operator level, the scattering between bath operators that are coupled to the system is given by the input-output scattering matrix SIO. To obtain the full scattering matrix, a background scattering contributionS bg has to be applied.
described by a transition operator for transitions from a bath state to a free state The background scattering matrix S bg is again defined as the corresponding on-shell scattering matrix where T bg (k) is the matrix element of T bg on the basis of free states. The effect of S bg (k) can thus be interpreted as an asymptotic basis transformation between bath states and free states. The full scattering matrix S is then decomposed into the resonant scattering matrix S res and the background scattering matrix S bg via [63] In terms of the system and bath states these matrices read (see Appendix G) We note that unlike in the quasi-modes approach, the "resonant" part in the Feshbach projection formalism does not necessarily correspond to the resonances of the wave equation, that is the poles of the scattering matrix. However by choosing the system states appropriately, certain resonances can be selected, such that their poles appear in S res , and the remaining poles appear in S bg . This behavior was partially investigated in [63] and we demonstrate its significance for extracting fewmode dynamics in Section VII. We further note that from the viewpoint of the entire scattering problem, both S res and S bg are unphysical on their own, since their properties depend on the arbitrary choice of the system states. However they individually may provide accurate approximations of the full scattering matrix in the vicinity of their corresponding resonances (see also Section VII), such that the choice of system states becomes a resource allowing the extraction of relevant properties of the whole system.

B. Second quantized potential scattering theory
In the second quantized setting, one investigates the dynamics of operators defined by the Hamiltonian and its corresponding Heisenberg equations of motion. That is, the quantization procedure promotes the wave equation to a non-relativistic quantum field theory, such that correlation functions can be computed.
For potential scattering we can define asymptotically free operators by expanding the quantum field in a free mode basis instead of in its normal mode basis. If φ (free) m (r, k) = r|k m are the field distribution of the free eigenstates, then the free state expansion of the field operator readŝ whered m (k, t) are now the free bosonic operators satisfying canonical commutation relations. One can solve the Heisenberg equations of motion for these operators (see Appendix H for details) to obtain a scattering relation where the asymptotically free in [out] operators are interaction picture operators in the infinite past [future], that are defined via adiabatically switching on [off] of the potential in the corresponding time limits (see Appendix H for details).
In the case of potential scattering, the operator scattering matrix can be shown to be exactly the first quantized scattering matrix Eq. (19) [47]. This correspondence between the solution to the wave equation and its second quantized analogue is also required for consistency, since on average the result from the wave equation should be obtained, that is d out (k) = S d in (k) .

IV. FEW-MODE SCATTERING
We will now show how to rigorously reconstruct the full scattering information from the ab initio few-mode Hamiltonian derived in Sec. II using the input-output formalism. We further show the equivalence of the inputoutput formalism results to that of standard scattering theory (see Section IV labels in Fig 1). The applicability of the input-output formalism is thus not limited to the good cavity regime, but applies to a general class of quantum scattering problems and in extreme regimes.

A. Ab initio input-output formalism
We now apply the input-output formalism [16,17,62] to our ab initio few-mode Hamiltonian Eq. (17). This constitutes solving the Heisenberg equations of motion for the Hamiltonian Eq. (17), which are We can solve Eq. (34) formally in terms of the initial time t 0 and final time respectively. As usual in quantum noise theory [16,62] and in analogy with the quantum field theory definition (see Section III B) we define the in-and out-operatorŝ respectively. Taking initial [final] times to negative [positive] infinity gives the input-output relation where the Fourier transform ofâ λ (t) is defined bŷ Substituting the formal solution Eq. (35) into Eq. (33) and inverting the resulting matrix equation giveŝ where we defined and the decay matrix (see also Fig. 1) where we have defined the real and imaginary parts of Γ λλ (k) as ∆ λλ (k) and γ λλ (k). In the latter equation, the limit → 0 + is implied. For λ = λ , the complex decay matrix Γ λλ (k) describes couplings between the system modes, whereas the diagonal parts correspond to frequency shifts ∆ λλ and loss rates γ λλ . We note that to obtain this expression the Fourier transform integrals were regularized (see Appendix I for details), analogously to what is usually done in timeindependent scattering theory [75]. We further note that a Markov approximation is not necessary in this derivation [62].
Upon substitution of Eq. (40) into Eq. (38) we can read off the scattering matrix The subscript 'IO' stands for 'input-output' to indicate that this scattering matrix was obtained from solving the quantum statistical operator equations of motion of the ab initio few-mode Hamiltonian using the input-output formalism of quantum noise theory [16,17].

B. Equivalence to standard scattering theory
We now show that the above calculation is equivalent to the full quantum scattering calculation, only expressed in a different basis. The relation is best understood by analogy to the state case (see Fig. 2).
Firstly we recognize that, using the definition of the coupling constants Eq. (18) as well as the completeness relations of the subspace eigenstates and Eq. (11), the decay matrix Eq. (42) can be written as We have now chosen the bath states fulfilling retarded boundary conditions |ψ (+) (k) [63,75], since by writing Eq. (40) in terms of the incoming operator we decided to solve an initial value scattering problem. From Eq. (41), the D-matrix therefore consists of the matrix elements Noting that the effective Q-space Hamiltonian is we see that the inverse of the D-matrix coincides with the matrix elements (44), again using the definition of the coupling constants Eq. (18) and the completeness relations of the subspace eigenstates, we find that Thus the expression for input-output scattering matrix S IO (k) coincides with the scattering matrix S res (k) in Eq. (29) obtained from potential scattering theory using the Feshbach projection formalism [63]. From our interpretation of the resonant scattering matrix in Section III A 2, it is to be expected that S IO (k) is not the full scattering matrix. The ab initio few-mode Hamiltonian Eq. (17) only contains information about the dynamics of the system and bath modes, which interact via the coupling terms. Despite capturing these dynamics exactly, it does not contain information about the structure of the bath modes. In addition, the bath operators are not asymptotically free. Therefore analogously to the first quantized potential scattering case in Section III A 2, an asymptotic basis transformation is needed to translate from the bath operators in Eq. (45) to the asymptotically free operators in Eq. (32), as schematically shown in Fig. 2. We further know from Eq. (28) that this transformation can be expressed as the background scattering matrix S bg (k). Therefore, the full scattering matrix can be calculated from the input-output result by To summarize, the background scattering contribution translates the bath mode scattering from the inputoutput formalism into free-state scattering as usually observed in spectroscopic experiments. We have thus clarified the relation of our ab initio FMA to NMA and conventional quantum scattering theory. The two approaches are equivalent if care is taken to compute the scattering between asymptotically free operators in both cases. Figures 1 and 2 illustrate the equivalence and the relation between the different operators.

V. APPLICATION TO MAXWELL'S EQUATIONS
While so far we presented the construction of ab initio few-mode Hamiltonians on the example of the Schrödinger equation, our technique is in fact quite general. The essential requirements are that the Hilbert space of the quantum system can be separated into two orthogonal subspaces and that each subspace is spanned by a set of orthonormal modes. In the Schrödinger case, these conditions were ensured by the hermicity of the corresponding operators. One can thus envision an application of the formalism to a variety of quantized scattering problems. One such problem with practical relevance in quantum optics and cavity QED is the scattering of light from dielectric materials, described by Maxwell's equations. Since this field is a main application of systembath theory and the input-output formalism as a phenomenological model, the question arises if our ab initio FMA can be applied to this setting as well.
In the following we analyze this question for the simplest possible case of a linear, isotropic, non-absorbing dielectric medium in one dimension, with only a single polarization considered. We show that within the rotating wave approximation (RWA), the correspondence between the input-output formalism and the potential scattering approach can be established.
Our assumptions allow us to write the wave equation for a component A(r, t) of the vector potential as [76] ∂ 2 ∂r 2 A(r, t) = ε(r) where ε(r) is the dielectric function and again c = 1. The applicability of this scalar Helmholtz equation to physical scenarios has been discussed in [5]. This problem is closely related to our treatment of the Schrödinger equation, since the corresponding time-independent equation for the normal modes f m (r, k) [62], can be written as a Schrödinger equation with an energydependent potential [5,50] The normal modes of this wave equation are still orthogonal, but under a modified inner-product [5,62] x|y = dr ε(r) x * (r) y(r) .
The Maxwell wave equation can be quantized canonically [47] (see Appendix J 1 for details), similarly to the Schrödinger case in Section II A. However due to the double time-derivative, the Hamiltonian now contains coordinate operatorsq and momentum operatorsp [47,62], such that the corresponding commutation relations differ [47,62]. The separation into system and bath operators via a Feshbach projection can also be performed analogously to the Schrödinger case (see Appendix J 2 for details). The resulting few-mode Hamiltonian is of the form [62] We note the appearance of counter-rotating terms in the system-bath coupling [62], which are also a result of the second time-derivative in the Maxwell wave equation.

A. Scattering in the rotating wave approximation
We proceed with the analysis by applying the rotating wave approximation, which simplifies the Hamiltonian Eq. (56) tô One can solve the equations of motion for this Hamiltonian analogously to Section IV A. The resulting scattering matrix is and In order to compare to scattering theory, we substitute the definition of the coupling constants W and translate to the Schrödinger normalization and energy labeling by (see Appendix J 1) where W λm (k) are the coupling constants corresponding to the scattering normalization. The scattering matrix then reads S (rot) with We now see that these integrals are different to the ones encountered in scattering theory, due to the squarerooted energy dependence. However since these expressions were derived under the assumption that the rotating wave approximation holds, we can approximate 2 √ E λ ≈ √ E λ + E(k) and 2 E(k ) ≈ E(k)+ E(k ) in the relevant energy ranges [62]. Substitution of these approximations shows that such that from comparing Eq. (62) with Eq. (44) we get This means that if the rotating wave approximation applies and is carried through consistently, the correspondence between the input-output operator scattering and the resonant state scattering matrix still holds. We note that the correspondence can alternatively be established within the slowly-varying envelope approximation, see Appendix K.
As a result, we find that within these approximations, our formalism can be applied straightforwardly to the scalar Helmholtz wave equation in the same way as for the Schrödinger equation, if a modified inner product and an energy-dependent potential are considered.

B. Scattering beyond the rotating wave approximation
Going beyond these approximations, we note that the input-output formalism does not require neglecting the counter-rotating terms [77]. Without RWA, an additional linear equation for the conjugated operators has to be considered, which couples to the original equations via the counter-rotating terms. The input-output calculation can thus in principle be performed analogously.
From the discussion in Section III and Fig. 2 it is clear that this will yield an input-output scattering matrix describing scattering between bath operators, which has to be multiplied by a background term to obtain the full scattering between asymptotically free operators. The key difficulty now is to relate the contour integrals appearing in the operator scattering calculation (such as Eq. (63)) to the matrix elements in the state scattering calculation (such as Eq. (29)). In the case of the Schrödinger equation a correspondence between the state scattering and the operator scattering was shown in Section IV B, using the relation of the contour integrals to the bath Green function. In the Maxwell case this correspondence is obscured due to the rooted energy dependence in the contour integrals. The origin of this can be understood since for Maxwell equations, the field satisfying the wave equation has mixed operator contributions A(r, t) ∼bψ +b †ψ * , while for the Schrödinger equation ψ(r, t) ∼bψ. We note that conceptually the lack of such a correspondence makes no difference and the input-output scattering matrix can still be calculated if these contour integrals are evaluated correctly. Only now it is not clear if S IO (k) = S res (k) can be invoked to simplify the calculation.
As a result, we conclude that even beyond the rotating wave approximation our formalism can be applied to calculate ab initio input-output scattering matrices, however the precise form of the corresponding background scattering matrix on the operator scattering level remains to be determined (see also Fig. 2).

VI. PRACTICAL ASPECTS
Before turning to an example calculation, we conclude our analysis with practical remarks, in particular focusing on applications in cavity QED. Applying the ab initio FMA discussed here in essence entails two parts. The first part is the calculation of the quantum optical parameters and coupling constants entering the Hamiltonian and the input-output relations. The second part is the solution of the equations of motion resulting from the Hamiltonian. Regarding the second part, it is important to note that the Hamiltonian and the input-output relations obtained from our FMA are quite similar in structure to that of the well-established phenomenological models. This is of great advantage, since it means that the solution methods established for phenomenological models can also be applied to our approach, once the coupling constants are evaluated.
Nevertheless, there are certain differences to standard phenomenological models, which we discuss in the following. The model input-output relation is usually written in the form [17] or alternatively in terms of the corresponding Fourier transformŝ from which a spectrum can be computed. Here, κ λ is the coupling constant between the cavity mode λ and the external bath mode considered. The corresponding input-output relation derived within our approach reads (compare Eq. (38) This expression is similar in structure to Eq. (67), only now the cavity-bath coupling is frequency dependent. It is important to note that this frequency dependence also includes the possibility that the couplings change considerably within the spectral width of a single resonance, which cannot be captured by fitting a phenomenological Lorentzian mode to the response of the system. An example for this will be shown in Sec. VII. Next, we turn to the equations of motion for the cavity modes. Including a loss constant γ, a typical equation of motion within a phenomenological model reads This can again be expressed in Fourier space as so that spectroscopic quantities such as reflection or transmission spectra can be obtained by substituting Eq. (70) into Eq. (67). When atoms or other quantum systems are present inside the cavity, additional terms are added to describe cavity-atom interactions. The corresponding Langevin equation in our ab initio few-mode theory reads (compare from Eqs. (40,60)) Comparing this with Eq. (70), we again find frequency dependent decay and coupling constants. Additionally, next to the loss rates γ λλ , an imaginary contribution ∆ λλ appears, which induces a frequency shift. Furthermore, both the loss and the frequency shift parameters are now matrices, such that cross-mode coupling terms with λ = λ are present. Such cross-mode terms bear the potential for qualitatively different phenomena, for example, spontaneously generated coherences [78][79][80]. Also the frequency dependence of the coupling constants may lead to qualitative differences to phenomenological models, since in the time-domain, it implies non-Markovian dynamics. For example, the input-ouput relation in the time domain can be obtained by Fourier transforming Eq. (68) and reads [62] b (out)  Model potential with two barriers. In the Maxwell case, this corresponds to the Ley-Loudon model for a twosided Fabry-Perot cavity [81], and the solid blue curve shows the spatial refractive index distribution. For simplicity, in the calculation, the thin-mirror limit d → 0 is considered, with n0 → ∞ such that η = n 2 0 d remains finite. In the cavity, the first two perfect-cavity modes χ1, χ2 are shown as magenta curves. For the Schrödinger case, the solid blue curve indicates the potential energy, which defines a tunneling problem.
We therefore see that our ab initio few-mode theory can be employed as a tool to calculate cavity spectra analogously to the phenomenological approach, and the computational simplicity of the phenomenological models is not destroyed by the ab initio method. In particular for spectral observables, including frequency dependent couplings does not incur significant additional complexity. The main task to apply the formalism will thus lie in calculating the frequency dependent coupling and decay constants from the cavity geometry by employing the projection operator equations in Section II. After this calculation, the complete tool box of the input-output formalism and system-bath theory can be applied and the various approximation schemes that are available for few-mode systems can be employed.

VII. EXAMPLE: DOUBLE BARRIER POTENTIAL
Finally, we illustrate our formalism on the example of a one-dimensional potential featuring two barriers, see Fig. 3. Because our derivation in the Maxwell case was analogous to the Schrödinger case, it is tempting to assume that the two wave equations will give similar results. Below, we show that this is not the case, because they lead to different potentials in the respective Hamiltonians, and thus to different scattering properties. In each case, we demonstrate how our few-mode formalism enables the extraction of relevant resonant dynamics.

A. Maxwell case: Fabry-Perot cavity
In the Maxwell case, the two-barrier potential is realized using a spatially varying index-of-refraction distribution, and corresponds to a two-sided Fabry-Perot cavity with a semi-transparent mirror at each end. For simplic-  [82,83] or as a product of the input-output and background scattering matrices.
ity, we consider the thin-mirror limit d → 0 with n 0 → ∞ such that η = n 2 0 d remains finite, which is known as the Ley-Loudon model [76,81]. This model is one of the simplest cavity geometries with tunable sharp resonances. The mirror quality can be characterized by η = n 2 0 d, which relates to the energy dependent mirror reflectivity via r(ω) = iωη/(2 − iωη) [76,81]. Within this model, the potential in the Maxwell case thus becomes V (r, ω) = − η 1 δ(r − L/2) + η 2 δ(r + L/2) ω 2 /2 . (73) For this system a natural choice of cavity modes are the "perfect cavity modes", that is eigenstates in the cavity region with Dirichlet boundary conditions at the mirrors given by The eigenfrequencies are ω λ = λπ/L and L is the cavity length.
Based on these states we numerically evaluate the input-output scattering matrix S IO and the corresponding background scattering matrix S bg in the rotating wave approximation. Due to the cavity being open on both sides, this is a two channel problem featuring transmission as well as reflection. Each part in the relation S = S bg S IO thus is a 2 × 2 matrix.
In Fig. 4, we show transmission spectra for the cavity as a function of the mirror quality, and compare it to the individual resonant input-output (S IO ) and background (S bg ) contributions. In all cases, the full transmissivity coincides with the product of the resonant and the background contributions, as was shown in Section IV B. The upper row illustrates the case in which the system space comprises a single mode with λ = 8. The lower row shows corresponding results with four resonant modes as the system part (λ ∈ {7, 8, 9, 10}). As expected, for a good cavity with high η, well-resolved transmission resonances are obtained, which naturally split into the resonant and the background contributions. Each mode that is included in the few-mode Hamiltonian removes a resonance peak from the background and adds it to the inputoutput scattering matrix. This means that in the vicinity of the included resonances, one can expect that the input-output result alone gives a good representation of the scattering behavior. But towards the bad-cavity limit (η → 0), the modes start to overlap, and the separation into resonant and background part becomes non-trivial. As a result, the background part is crucial, and more modes are required for the input-output matrix to capture the resonance behavior in the same frequency range. Also, the position of the mode resonance systematically shifts with the quality factor η, which is a consequence of the imaginary contribution δ found in the ab initio equations. Furthermore, the resonant modes become asymmetric with respect to their central frequencies, and are no longer of Lorentzian shape. This asymmetry can be understood since the width of the resonances decreases for this cavity with increasing energy. As a result there is more overlap of any particular resonance with its lower energy neighbor than with its higher energy neighbor, which also leads to the formation of two distinct pairs of modes in the case of multiple system modes in the lower row of Fig. 4. Next, we study the quantum optical parameters extracted from our ab initio approach. Fig. 5 shows the transmission coupling strength κ (T ) entering the inputoutput relation, the mode frequency shift ∆ and the decay rate γ as function of frequency and mirror quality η. All plots correspond to the upper panel of Fig. 4, with a single mode as the system subspace. In the upper panels of Fig. 5, the solid purple curve indicates the spectral width of the mode as function of η. The lower panels show three cuts through the plots in the upper panel, for different values of η. In these lower panels, the purple shaded area indicates the spectral width of the mode, which grows towards lower η. As expected, for a highquality cavity, the system parameters calculated using the ab initio method are approximately constant over the spectral width of the resonance. Thus again we find that a phenomenological approach with constant parameters is well-suited to model the cavity dynamics. However, towards the bad-cavity limit, the system parameters significantly change within the spectral width of the mode, rendering a modeling using fixed phenomenological rates difficult. Finally, the vertical lines in the lower panel indicate the difference of the actual mode frequency from the "bare" mode frequency, i.e., the effect of the imaginary part ∆.
From these results we conclude that our formalism can indeed be used to extract the resonant dynamics of the system, by choosing the relevant modes that participate in the dynamics. We further conclude that the input-output formalism is not limited to the good cavity regime, however has to be applied with care when the cavity features overlapping modes, since background scattering and frequency dependence of the quantum parameters become sizable and cannot be neglected.

B. Schrödinger case: Tunneling problem
In the Schrödinger case, the double-barrier potential structure shown in Fig. 3 defines a tunneling problem, and can be written as We note that this potential has prefactors independent of the energy, while the corresponding potential Eq. (73) for the Maxwell case is proportional to ω 2 , and thus energy dependent. This will give rise to crucial differences between the Schrödinger and the Maxwell wave equation, which we will discuss below. Figure 6 compares the transmissivity in the Schrödinger case and the Maxwell case, for the parameters ξ 1 = ξ 2 = 10L −1 and η 1 = η 2 = 0.5L. The three rows correspond to a system space containing one mode (top row: λ = 1), two modes (middle row, λ ∈ {1, 2}), or the many-mode limit (bottom row, λ ∈ {1, . . . , 100}).
The Schrödinger transmissivity features sharp resonances at low energies, which can be understood by noting that at low energies it is less likely for a particle to tunnel through or overcome the confining barriers (see Fig. 3). With increasing energy, these resonances become broader and start to overlap. Furthermore, the baseline  100}). In each case, the full (solid blue), input-output (dashed red) and background (dotted orange) transmissivity are shown. For both wave equations, each added system mode transfers a resonance peak from the background to the input-output contribution, such that in the many mode case featuring 100 modes, the input-output result alone agrees with the full transmissivity (bottom panels). For sharp resonance peaks, the input-output result captures the behavior in the relevant energy range, if the corresponding modes are included (top and middle left panels). For overlapping resonances, the background contribution is crucial even in the vicinity of the resonance peak (top and middle right panels).
of the transmissivity resonances raises with increasing energy.
In the Maxwell case, the transmissivity spectrum at low energies is entirely different. This is due to the prefactor ω 2 in the potential, which vanishes at low energies. As a consequence, the modes become broader and the baseline of the transmissivity resonances raises towards lower energies. In contrast, towards higher energies, the potential ∼ ω 2 is highly confining and features sharp resonances. On a qualitative level, the frequency dependence of the Maxwell case thus appears reversed as compared to the Schrödinger case.
Next, we investigate the behavior of the few-mode input-output results further in both cases by compar-ing the input-output and background transmissivity separately for different system mode numbers (see Fig. 6). As expected, we observe that for each additional system mode, a resonance peak gets transferred from the background to the input-output spectrum. For the case where a single mode with λ = 1 is included, the Schrödinger and Maxwell equations show very different behavior. In the Schrödinger case the corresponding resonance is sharp and isolated, such that the input-output transmissivity reproduces the full result in the energy range of the resonance peak, even without having to include the background contribution. In the Maxwell case however, these modes are broad and overlap, such that the background contribution is crucial. It is important to note, however, that this difference is a consequence of the ω 2 -dependence of the Maxwell potential, and not of the single-mode approximation. This can be seen from the top panel of Fig. 4, where the single mode λ = 8 is well-represented by the input-output part alone for the Maxwell case. As a result of the ω 2 dependence, the "perfect" system modes Eq. (74) for barriers of infinte height do not represent the λ = 1 case of shallow potential barriers well.
We further note that the transmissivity maxima in the Maxwell case of Fig. 6 lie between the ones for the Schrödinger equation, despite the identical geometry. On the level of wave equations, this also can be explained by the energy dependence of the potential causing the complex poles of the scattering matrix to shift. In the quantized few-mode Hamiltonian approach, the shift can alternatively be understood as radiative corrections to the bare system states, which we chose to be the perfect cavity states Eq. (74). These corrections arise from the system-bath coupling and are expressed as the complex decay matrix. The shifting effect can thus also be seen in Fig. 5, where the mode frequency shift ∆ remains larger than the mode width for large η.

VIII. SUMMARY AND CONCLUSION
We presented a systematic approach to derive ab initio few-mode Hamiltonians for second-quantized scattering problems. As our main result, we demonstrated how to rigorously reconstruct the entire scattering matrix from these Hamiltonians using an input-output formalism. For the Schrödinger equation, we thereby established an exact equivalence between our ab initio fewmode theory and the standard potential scattering approach. For Maxwell's equation, we demonstrated this equivalence within the rotating-wave approximation for a linear, isotropic, non-absorbing dielectric medium in one dimension with a single polarization.
These results can be interpreted in different ways. From the viewpoint of potential scattering theory, the equivalence provides a new exact solution method, which is particularly useful if the system's dynamics is dominated by resonances. On the other hand, our approach promotes input-output models frequently used, for ex-ample, in cavity QED, to an exact ab initio theory. We therefore conclude that ab initio input-output models are not restricted to the good cavity regime, but are broadly applicable and can be used also in extreme cases such as the overlapping modes or the ultra-strong coupling regime.
Our method is based on a systematic way to calculate all parameters of the theory from the given potential or cavity structure. After that, the resulting equations of motion are similar in structure to phenomenological input-output models, such that the established solution methods can be applied.
However, we find crucial differences to phenomenological models, which may lead to qualitatively different predictions. First, all model parameters acquire a frequency dependence, and this also includes the possibility that the parameters change considerably within the spectral width of a single resonance. Such behavior cannot be captured by fitting a simple few-mode model to the response of the system. Second, we find an additional frequency shift component in the equations of motion for the mode operators. Third, our approach predicts cross-mode coupling terms in these equations of motion, which may induce qualitatively different dynamics, for example, via the creation of additional cross-mode coherences. Fourth, the frequency-dependence of the coupling constants in general renders the temporal dynamics non-Markovian. Finally, the scattering matrix derived from the input-output approach by itself is not equivalent to the full scattering matrix obtained from scattering theory. Rather, it has to be augmented by a background contribution, which in particular for few-mode models in the extreme cases mentioned above has non-trivial effects on the observables.
As expected, we found that if the problem under study has well separated and narrow resonances, such as in a "good" cavity, our formalism simplifies in that the frequency-dependence of the parameters across the resonances is small and the background contribution in the vicinity of the resonance are not important for the system's dynamics. As a result, phenomenological models can be used to capture the system's properties. However there are regimes of interest where these effects become significant, such as the overlapping modes regime [59,[64][65][66], structures featuring exotic non-Hermitian effects [60,84], and the ultra-or the deep-strong coupling regimes [67][68][69]. One may then use our method to directly solve the system without narrow or isolated resonance approximations. We emphasize that even in these regimes our formalism directly connects to methods used in phenomenological input-output approaches, and does not necessarily increase the theoretical complexity after the ab initio parameters have been calculated. Alternatively one can try to understand how extended phenomenological models may be formulated in these extreme regimes, for example by parameterizing the frequency dependence of the couplings appropriately.
Since we have established a formal equivalence between our formalism and the full scattering problem, the product of the input-output and the background scattering matrices will always give the full scattering matrix. For the cavity dynamics alone, the formalism is thus exact and may be used as an alternative method to normalmode theories. The significant advantage compared to the normal-mode descriptions arises when the cavity field is coupled to additional quantum systems, such as atoms.
Then one can connect our approach to a diverse range of methods and approximation schemes based on the inputoutput formalism and system-bath theory known in the literature. In this case, systematic approximations become possible by varying the number of resonant modes included in the system, while treating the coupling between the atom and the cavity modes non-perturbatively. Our method therefore is ideally suited for the modeling of resonant light-matter interactions in extreme regimes. For the future, it remains to be seen if these methods can be generalized to further wave equations, in particular more general cases of Maxwell's equations, or even relativistic scenarios such as the Dirac equation.
Eq. (1) is an example of a wave equation that can be quantized using the standard canonical quantization procedure [73,85], which we recapitulate in the following. The Lagrangian for the system reads such that the Euler-Lagrange equations yield Eq. (1). The conjugate momentum of ψ(r, t) is then obtained as For quantization, we promote ψ(r, t) [π(r, t)] to operatorsψ(r, t) [π(r, t)] and impose the bosonic commutation relations Eq. (3). The second quantized Hamiltonian is then obtained from the Lagrangian as Eq. (2). Together with the commutation relations, the Heisenberg equations of motion can be verified to give Eq. (1).

Appendix B: Mode normalization and orthogonality
We choose the normalization of the normal modes such that the orthogonality condition reads The normal modes form a complete set in the sense that We note that k is simply a relabeling of the energy eigenstates, which we find convenient to introduce. A natural choice is E(k) = k 2 /2, since k then has a physical interpretation as the wave number. Similarly, hermicity of the subspace Hamiltonians [63] implies orthogonality of their corresponding eigenstates, the system and bath states. We choose their normalization such that Analogously to Eq. (11), the bath modes diagonalize the P -space projector via Since P = 1 − Q, the system modes can furthermore be chosen orthogonal to the bath modes [63] χ λ |ψ m (k) = 0 . (B6) We note that these orthogonality conditions are crucial for quantization.
where we defined [62] as system and bath operators, respectively. Inverting Eqs. (D2) by using the coefficient identities in Appendix E gives Eq. (16) [62]. Using Eqs. (D2) and the coefficient identities in Appendix E, the commutation relations for the system-andbath operators are obtained as which are indeed the desired bosonic commutation relations [62]. We note that due to the few-mode projection, the system states do not necessarily form a complete set in the region of the cavity. It is thus necessary to account for the bath state contribution in Eq. (D1), even when r lies inside the cavity.

Appendix E: Expansion coefficient identities
Using the completeness relation in full space and the orthogonality relations in the subspaces Eqs. (B3, B4, B6) we obtain the coefficient identities Similarly, Note that these relations are analogous to expressions obtained in [62] for the dielectric Maxwell equations, but refer to different modes since our few-mode projection scheme differs.
Appendix F: Scattering matrix in Viviescas-Hackenbroich quantization In this appendix we calculate the scattering matrix for an example cavity using Viviescas&Hackenbroich's Feshbach projection scheme [62,76].
From Eq. (68) in [62] their scattering matrix reads Here the matrix D is defined by Eqs. (65,66) in [62] as with Γ λλ (ω) = lim These expressions are similar to our input-output scattering matrix Eq. (58), except for the different projection scheme and the infinite number of system modes.
In [76], the authors demonstrated their formalism on the example of a one dimensional cavity with a single homogeneous dielectric layer of thickness d and refractive index n terminated by a perfectly reflecting mirror. In the following we will attempt a calculation of the scattering matrix using the input-output result Eq. (F1). The coupling coefficients for Neumann basis states are given by Eq. (46) in [76] as where the cavity mode frequencies are with λ ∈ {1, 2, . . . }. We can simply plug this into the Eq. (F2) above to get The inverse of this D-matrix can be calculated exactly using the Sherman-Morrison formula [63,86]. Substitution into Eq. (F1) yields, after a short calculation, Substitution of the resonance frequencies Eq. (F5) gives This sum indeed diverges. There is also no well defined notion of taking a limit of λ to infinity, since the projection is performed directly onto infinitely many modes. Similar behavior is observed for other one dimensional examples in [76], including a one-sided Ley-Loudon cavity. We conclude that in Viviescas&Hackenbroich's formalism [62], there is no straightforward way to calculate scattering matrices from the input-output formalism due to the convergence behavior of the infinitely many modes included in their projection scheme. For the example cavity we observed that truncation approximations or cut-off schemes can be used to approximate the spectra around a single resonance for good cavities. For multiple or overlapping modes, however, such approximations fail. In these regimes it is thus crucial to understand how to precisely reconstruct the scattering information in system-bath theory. By using a different projection scheme and few-mode Hamiltonians, the approach presented in this work addresses this topic.
Appendix G: Domcke's Feshbach projection formalism for potential scattering In Section III A 2 we focused on defining and interpreting the background and resonant scattering matrices. We further showed how the former corresponds to an asymptotic basis transformation. In this appendix we extract the relevant parts of Domcke's [63] derivation of this separation based on Lippmann-Schwinger equations and give his formulae for the T -matrices.
The goal is to expand the P -space projection of the full eigenstate, which contains all the scattering information, in terms of the various subspace eigenstates. During the quantization procedure, we already derived Eq. (C7), in which we now only have to expand the homogeneous part in terms of free states.
We first write down the Lippmann-Schwinger equation for the bath eigenstates where we have defined the free Green function in full space and the free eigenstates Upon substitution into Eq. (C7) we obtain [63] P |φ m (k) = |k m + G From there we obtain the separation of the T -matrix [63] T where, omitting subscripts for brevity, and The matrix element from the main text giving the resonant scattering matrix is Consequently one obtains [63] S(k) = I − 2πiT (k) = S bg (k)S res (k) (G9) as expected.
Appendix H: The operator scattering matrix in second quantized potential scattering In this Appendix we derive the result used in Section III B, that the operator scattering matrix relating asymptotically free in-and out-operators is the same as the conventional on-shell scattering matrix for the corresponding states [75]. We will proceed by solving the operator equations of motions for appropriately defined asymptotically free operators, following Glauber&Lewenstein's method [47].
To define the asymptotically free operators one has to adiabatically turn off the interaction in the infinite past and future, such that these operators are actually evolving freely in the corresponding limits. To do so we replace the potential V (r) by a potential V (r, t) slowly varying in time such that lim t→±∞ V (r, t) → 0 (H1) and V (r, 0) = V (r).
Consequently, the normal modes also become timedependent. In general they would fulfill an explicitly time-dependent form of the wave equation, however in the adiabatic limit they correspond to the timeindependent normal modes at each time slice, such that Eq. (5) becomes The in [out] operators are then defined as the corresponding free interaction picture operators in the infinite past [future], that iŝ In Eq. (4) and Eq. (31), two separate expansions of the quantum field were introduced, one in terms for normal modes and one in terms of free stateŝ Using the orthogonality properties of these states one obtains a linear relation between the two operator baseŝ (H8) The construction of the basis transformation between asymptotically free in-and out-operators proceeds similarly via comparing asymptotic expansions. Let us first asymptotically expand the field in the infinite past in terms of the in-operators using Eq. (H7) and Eq. (H4) to get (H9) To obtain a second expansion to compare to let us note that the normal modes are not uniquely defined since we have not specified their boundary conditions. The choice that is relevant in the infinite past are the states with a controlled incoming state |φ (+) m (k, t) [75]. The corresponding expansion readŝ whereÔ m (k, t) =Ô m (k, t)e iE(k)t is the relevant interaction picture operator [47], which is independent of t for the normal modes operators. These states by construction have the property that Comparing Eqs. (H9) and (H10), we thus find that Consequently, since Eq. (H10) applies at all times, there are now two ways to express the field at the time slice t = 0, At t = 0 our potential has the desired physical value such that φ From Eqs. (H13, H14) we can obtain the transformation between asymptotically free operators in the infinite past and free operators at the time slice t = 0 aŝ Analogously, by expanding in the |φ (−) m (k, t) basis and performing an asymptotic expansion in the infinite future, we obtain a second expansioñ Upon combining Eqs. (H15, H16) and using that the matrix elements vanish off the energy shell, we obtain the operator scattering relation Indeed, the matrix element in this expression is the scattering matrix [75] S mm (k, which is related to the on-shell scattering matrix S mm (k) used in the main text by [75] S mm (k, k ) = S mm (k) δ(E(k) − E(k )) .
We thus obtain the result Eq. (32) aŝ Appendix I: Regularization of Fourier integrals in the input-output formalism In this Appendix we provide a derivation of Eq. (40). In the process we show how the Fourier integrals are regularized in the input-output formalism and how this relates to time-independent scattering theory [75].
We start by Fourier transforming Eq. (33) to get Substitution of Eq. (35) gives We note that for the integration over energies from negative to positive infinity enters via the inverse of Eq. (39), where the energy definition range has to be suitably extended beyond the physical spectrum for the inverse Fourier transform to be defined. This does not constitute an approximation, but rather a definition of an energy dispersion beyond the physical spectrum, such that inverse Fourier transforms can be used as a mathematical tool. The first of the three terms in this Eq. (I2) is simple enough already, the second can be reduced using the definition of the input operator and the Fourier identity ∞ −∞ dte i(E(ω)−E(k))t = 2πδ(E(ω) − E(k)). (I3) The third term can be simplified in the scattering limit t 0 → −∞. However we notice that the integral is in fact divergent in this limit. This is a well known feature of time-independent scattering theory and can be dealt with through regularization [75]. In our case we require a substitution and taking the limit → 0 + at the end, which regularizes the integral as t 0 → −∞. Physically this corresponds to solving an initial value problem [75]. Evaluation of the integrals in Eq. (I2) then yields Eqs. (40)(41)(42).
Appendix J: Few-mode Hamiltonian for the scalar Maxwell wave equation In this Appendix we provide details on the application of our formalism to the dielectric Maxwell wave equation Eq. (52), which constitutes a combination of the systemand-bath formalism by Viviescas&Hackenbroich [62], the projection scheme by Domcke [63] and the relation of the input-output formalism to scattering theory presented in the main text for the Schrödinger equation.

Canonical quantization
The quantization of the vectorial dielectric Maxwell equation was presented by Glauber&Lewenstein [47]. Here we follow their approach, simplifying the results to the scalar wave equation Eq. (52). For simplicity we work with = c = 1. The Lagrangian for the system is [47] L = 1 2 dr ε(r)Ȧ 2 (r) − ∂A(r) ∂r such that the resulting Euler-Lagrange equations can be checked to give Eq. (52). The conjugate momentum of A(r) can then be obtained as [47] Π(r) = δL δȦ(r) = ε(r)Ȧ(r) .
To obtain a few-mode Hamiltonian, we now have to apply the resulting operator basis transformation to a different normal mode Hamiltonian given by Eq. (J7). A related expansion of this form was already performed by Viviescas&Hackenbroich [62]. There are two differences to our case that have to be considered. Firstly, we have a finite number of system modes |χ λ , while in [62] an infinite set of modes was defined by imposing boundary conditions on a spatial region. Secondly, we use the energy-dependent potential form of the wave equation, while Viviescas&Hackenbroich performed a variable substitution to obtain a wave equation that is Hermitian under the ordinary inner product. These modifications are necessary for the input-output scattering matrices to be well defined and convergent. The reason is that the infinite mode limit has to be taken with care due to certain coupling contributions that vanish in this limit, but still contribute to the scattering, as was already noted by Domcke [63].
Apart from these differences, the derivation (see Appendix J 3 for details) of the Gardiner-Collett Hamiltonian follows analogously to [62], yielding the Hamiltonian Eq. (56), where The system and bath operators fulfill the equal time commutation relations â † λ ,â λ = δ λλ , We note that, unlike in Viviescas&Hackenbroich's approach [62], the external modes contribute to the field even inside the cavity, as noted in Appendix D.
These relations can again be inverted (cf. Section II C) to give [62] q m (ω) = Applying these two expansions to the Maxwell normal mode Hamiltonian Eq. (J7) and using the coefficient identities analogous to Appendix E gives the system-andbath Hamiltonian [ with the coupling coefficients in Maxwell normalizatioñ W λm (ω) = χ λ |H|ψ m (ω) .
For the Schrödinger equation we were done at this point. However now the operators in the Hamiltonian are not ladder operators, instead the system operators fulfill the commutation relations [62] Q m (k),P m (k ) = iδ mm δ(E(k) − E(k )) , (J30c) Q m (k),P † m (k ) = iN * mm (k, k ) .
To obtain a Gardiner-Collett Hamiltonian in terms of ladder operators, we have to perform an operator rotation on the system operatorŝ and on the bath operatorŝ Q m (ω) = 1 2ω P m (ω) = i ω 2 Here, we have defined the overlap matrices [47] N λλ = χ * λ |χ λ = dr ε(r) χ λ (r)χ λ (r) , The only differences are now the changed inner product in the couplings definition and that the system and bath states are defined by the eigenvalue equation Eq. (K4) with an energy dependence of the potential. Therefore, the equivalence between input-output formalism and scattering theory follows analogously to Section IV B.