Mean path length invariance in wave-scattering beyond the diffusive regime

Diffusive random walks feature the surprising property that the average length of all possible random trajectories that enter and exit a finite domain is determined solely by the domain boundary. Changes in the diffusion constant or the mean-free path, that characterize the diffusion process, leave the mean path length unchanged. Here we demonstrate experimentally that this result can be transferred to the scattering of waves, even when wave interference leads to marked deviations from a diffusion process. Using a versatile microwave setup, we establish the mean path length invariance for the crossover to Anderson localization and for the case of a band gap in a photonic crystal. We obtain these results on the mean path length solely based on a transmission matrix measurement through a novel procedure that turns out to be more robust to absorption and incomplete measurement in the localized regime as compared to an assessment based on the full scattering matrix.

A fundamental result of diffusion theory is that the mean path length of particles diffusing across a certain region of space is entirely independent of the characteristics of the diffusion process [1][2][3]. In fact, only the shape of the outer boundary of this region determines the average length of particle trajectories between entering and exiting this region; whether the paths taken by the particles are straight lines or convoluted random walks is, however, completely irrelevant. As such, this mean path length invariance generalizes the so-called "mean chord length theorem" valid in the ballistic limit [2] and encompasses applications in basically all research fields where diffusion processes or random walks arise -ranging from nuclear physics [1] and solar energy harvesting [4] to the movement of bacteria [5].
The scope of this invariance property was recently expanded even further, when it was shown that not only particles, but also waves that scatter through a region of space are subject to the same invariance property [6].
The key insight here is that the average "time-delay" associated with a scattering process is directly linked to the density of states (DOS) inside the scattering region [1][2][3][4]. From the Weyl law [11,12] we then know that the DOS remains invariant when transforming a homogeneous medium in the ballistic limit into a diffusively scattering disordered medium of the same size [6]. A recent experimental implementation followed exactly this line of thought by changing the turbidity of a liquid from nearly transparent to very opaque and demonstrated that the mean path length of isotropically incoming light inside the liquid stays, indeed, unchanged over nearly two orders of magnitude in scattering strength [13]. In spite of its coherent nature, laser light could thus be observed to obey the same universal invariance property as particles when scattering ballistically or diffusively.
Coherent wave effects can, however, also lead to very strong deviations from any of the transport regimes that particles can be in. Consider here, e.g., the regime of Anderson localization [14,15] or the formation of a band gap in a photonic crystal [16], to cite just two genuinely wavelike phenomena that both rely on wave interference. The natural question to ask at this point is whether any such effects going beyond a trajectory-based description may lead to a violation of the mean path length invariance since they clearly fall outside the scope of both the mean chord length theorem and a random walk picture. More specifically, since both Anderson localization and a band gap prevent incident waves from propagating inside the scattering region, one naturally expects that the mean path length invariance should break down in these cases. Insights into such questions are not just of academic interest: consider, e.g., that the mean path length invariance is strongly linked to the so-called "Yablonovitch limit" that imposes a cap on the optimal intensity enhancement inside solar cells [17]. A break-down of the invariance property may thus also provide a strategy for overcoming current limitations in solar cell design [4].
Here we will address these questions through an experiment that gives us direct access to these scattering regimes beyond both the ballistic and the diffusive limit. We test the invariance of the mean time-delay in microwave measurements using a multichannel cavity for which the scattering strength of a random sample can be tuned by changing the number of scatterers within the cavity and for which an ordered arrangement of the scatterers mimics a photonic crystal.
The scattering region is formed by an effectively twodimensional cavity (see Methods) of length L = 0.5 m and width W = 0.25 m with two arrays of N = 8 antennas attached on the left and right interfaces, respectively [8]. The antennas are single mode waveguides fully coupled to the cavity between 11 and 18 GHz (see Fig. 1a). Having full control over all these waveguides enables the measurement of the frequency-dependent N × N trans-a 11 11.1 11.2 11.3 11.4 11.5 Frequency (GHz) Experimental setup and path length spectra. a, Sketch of the experimental setup, where the cavity is represented for a random arrangement of 40 aluminum cylinders. The top plate has been removed to visualize the interior of the sample. The embedded intensity distribution corresponds to the highest transmitting transmission eigenstate in this scattering configuration obtained from a numerical simulation. b, Experimental data for the variation of the inverse of the statistical conductance, (1/g ) = 3var(sa)/2 as a function of the conductance g to estimate whether the experiment operates in the diffusive [(1/g ) < 1] or in the localized regime [(1/g ) > 1] [18]. c, Spectra of the mean path length s(ω) = s[2Qt(ω)] for a chaotic cavity (blue line), a diffusive sample with nscat = 100 scatterers (green line) and a localized sample with nscat = 280 scatterers (red line). The values of 1/g corresponding to these samples are shown with red, green and blue markers in b. mission matrix (TM) t ba (ω), which contains the complex and flux-normalized transmission coefficients between the two arrays. The TM is complete, but strong internal reflections occur at the left and right interfaces of the cavity as the spacing between two adjacent antennas is metallic (unlike in open waveguides).
To induce a transition from the ballistic to the chaotic, diffusive and the localized regime we gradually increase the scattering strength within the cavity. Specifically, we measure the transmission matrix t(ω) for an empty cavity (ballistic system), for a cavity with an aluminum semicircle of 53 mm diameter [chaotic system, see Supplementary Material (SM) for details] and for disordered samples with n scat randomly distributed aluminum cylinders of radius r s = 3 mm. For the disordered systems the conductance g = Σ N n=1 τ n (i.e., the frequency-averaged sum of transmission eigenvalues τ n of t † t) ranges over more than two orders of magnitude from 4.36 for the empty cavity to 0.01 for the sample with the strongest disorder (n scat = 280).
Because of dissipation within the system and strong internal reflections, the scaling of the conductance g may not reflect the crossover from diffusive to localized waves found at g = 1 in open random systems [20]. We ex-ploit instead the statistics of the transmitted intensity as a reliable indicator of the localization transition even in the presence of absorption [18]. Specifically, the variance of the normalized total transmission s a = T a / T a , with T a = Σ b |t ba | 2 , is given for non-dissipative diffusive samples by var(s a ) = 2/(3g). In the case of finite dissipation the so-called statistical conductance g = 2/[3var(s a )] has been found to indicate localization reliably when taking on values (1/g ) > 1 [18]. In Fig. 1b, we thus show the change of 1/g with the conductance g and observe values for (1/g ) that considerably exceed 1 for g < 0.6. This confirms that the increased disorder in our twodimensional system leads to wave localization.
In multichannel systems, the mean path length can be estimated from measurements of the Wigner-Smith (WS) time-delay operator Q = −iS −1 ∂ ω S applied to the scattering matrix S which relates incoming and outgoing channels [21][22][23][24][25][26][27][28][29]. The operator Q is a multichannel generalization of the phase derivative dφ ba /dω, which provides the time-delay of a spectrally narrow pulse between two channels a, b. Averaging over all channels leads to the mean Wigner-Smith time-delay given bȳ t WS (ω) = Tr[Q(ω)]/(2N ).
In principle, estimating the mean time-delay requires a measurement of the complete scattering matrix S(ω) including the two reflection matrices on the left and right sides of the sample, respectively. Experimentally, such a measurement is highly challenging, however, since most setups provide access either only to a one-sided reflection matrix or to the TM. To overcome this difficulty, we show in the SM that the trace of Q(ω) and the trace of the Wigner-Smith operator involving only the TM from left to right, Q t (ω) = −it −1 ∂ ω t, are connected through the following equivalence relation, where is the mean length obtained with an operator O. The above simple relation is proven in the SM for non-absorbing systems using the decomposition of the TM into transmission eigenchannels. The key ingredient is the correspondence between transmission and reflection eigenchannels as a consequence of the unitarity of the scattering matrix, S(ω)S † (ω) = 1 [30,31]. The transmission eigenchannel time-delay t (t) n (ω) = dθ n /dω, found from the derivative of a composite phase shift θ n of the singular vectors of the TM [31], is then equal to the average of the corresponding reflection delay times at the right and left sides of the sample, t (t) n (ω)]/2 (as in 1D systems [32]), where a prime denotes the quantities at the other waveguide port. Equation (1) thus provides access to the mean path length s[Q(ω)] = c 0tWS (ω) through transmission measurements only.
In practice, evaluating s[2Q t (ω)] requires that eigenchannels of t(ω) with small transmission eigenvalues τ n (typically τ n < 10 −6 ) are removed from the experimental data since these eigenchannels may contain time-delays t (t) n (ω) that are corrupted by the noise level of the experimental setup. In diffusive and localized systems, eigenchannels with the smallest transmission values are typically associated with a small intensity build-up inside the medium and therefore with small time-delays [31]. Removing their contribution to s[2Q t (ω)] thus modifies the estimated length only weakly (see SM).
Spectra of the mean path length s[2Q t (ω)] corresponding to a chaotic cavity, a diffusive sample and a localized sample, are presented in Fig. 1c. In contrast to the diffusive regime in which the overlap of many resonances leads to small fluctuations of s[2Q t (ω)], the peaks observed in the localized regime correspond to the contributions of spectrally isolated resonances associated with localized modes. To meaningfully compare the mean path length obtained in the different propagation regimes, it is thus necessary to average s[2Q t (ω)] over a frequency range containing several of these peaks.
In Fig. 2 we compare the mean path length s(2Q t ) resulting from a frequency-average in single configurations (see Methods) with the theoretical predictions obtained  2)]. Absorption reduces the estimated mean path length. Background colors in rose, green, and white mark the localized, diffusive, and the ballistic regime as in Fig. 1b. b, The same quantity, s(2Qt) , found experimentally (blue circles with error bars). The squares and triangles are the mean path length in transmission and in reflection, respectively (see SM for details).
using the Weyl law [6,11,12] given by, This Weyl prediction for the mean path length involves the scattering area A = LW + 16lw − n scat πr 2 s corresponding here to the surface of the cavity, including the attached channels of length l = 38 mm and aperture w = 15.79 mm, from which the area of the impenetrable metallic scatterers is subtracted. A first-order correction term takes into account the external boundaries C = 16w and the internal boundaries B of the scattering system, that include the metallic boundaries of the cavity and the circumferences of the metallic cylinders [6]. Smaller values of g are reached with an increasing number of these cylinders, which reduces the effective scattering area and increases the length of the internal boundaries. The theoretical estimate of the mean path length s theo (ω) is then the average of s theo (ω) over the frequency range and decreases from 2.05 m for an empty cavity to 1.76 m for a sample with 280 cylinders. The theoretical mean path length for an empty cavity s theo (ω) ∼ 4L strongly exceeds its value for open waveguides s theo (ω) = πL/2 [6]. This enhancement is due to the metallic spacings between the antennas at the right and left interfaces of the cavity. Numerical simulations presented in the SM also show the existence of states with very long delay times in the empty cavity, corresponding to path lengths of a few hundred meters. These states are caused by bouncing orbits between the top and bottom interfaces of the cavity (in y-direction). Figure 2a shows perfect agreement between the Weyl prediction (see red line) and the mean path length s(2Q t ) obtained in numerical simulations (see black crosses) of the experimental setup in absence of absorption (see Methods). Even the small reduction in the mean path length predicted for an increasing number of scatterers is well reproduced. This confirms the validity of the mean path length invariance across the onset of the localization transition.
Also the experimental data shown in Fig. 2b are in good agreement with s theo (ω) (see blue circles). How non-trivial this invariance property is, can be appreciated when contrasting it with the strong enhancement (reduction) of the transmission (reflection) time-delays across the localization transition (see blue squares and triangles). We also observe that the mean path length is slightly underestimated, especially in the ballistic regime. Even though the DOS integrated over frequency is independent of absorption [33], the presence of absorption within the cavity makes the scattering matrix subunitary [34] and leads to a violation of the mean path length invariance [6] so that this deviation comes as no surprise. Indeed, the experimental data is well reproduced by numerical simulations when dissipation is included. For the data shown in Fig. 2a (see black circles), we introduce uniform absorption by adding an imaginary part to the effective refractive index of the cavity. We here use for the empty cavity as well as for all disorder configurations an average uniform imaginary part of the refractive index (n i = 2 × 10 −4 ) found by comparing the frequency-averaged transmission measured for the empty cavity with the numerical simulations.
In addition to its detrimental effect on the mean path length invariance, dissipation also breaks the unitarity of S and therefore the correspondence between s[Q(ω)] and s[2Q t (ω)] in Eq. (1). In the diffusive regime, all of these effects are sufficiently weak such that losses through outgoing channels dominate over uniform absorption over the sample. From the broadening of the average linewidth with respect to the number of ports connected to the cavity, we estimate that the ratio of losses through ports relative to uniform losses within the cavity is equal to 5.4 (see SM). With the scattering matrix then still being sufficiently close to unitarity, s(2Q t ) provides a reliable estimator of the theoretical value s theo in absence of absorption. Interestingly, the stronger deviations found for the empty cavity are a consequence of very specific states that bounce many times between the top and bottom cavity boundary (in y-direction). Due to their long cavity dwell times, these states are very strongly affected by dissipation and therefore lead to significant deviations from the mean path length invariance (see SM). The existence of these states is reflected by the large fluctuations of the mean path length in Fig. 2. In the diffusive regime, the disorder scattering naturally leads to a suppression of such states with strongly enhanced time-delays and thereby to a better agreement with the theoretical predictions.
Surprisingly, we observe that our estimate for the mean path length, s(2Q t ) , is more robust to absorption in the localized regime than in the empty cavity even though Anderson localization also gives rise to the large timedelays in the cavity and large fluctuations of the mean path length (see Fig. 2b). Using a toy model, we demonstrate analytically in the SM that in the limit of strong absorption s[2Q t (ω)] converges towards the most direct path in transmission L direct . As shown in Fig. 3, all eigenchannels feature a quasi-ballistic propagation in this limit providing the same contribution to the mean path length. In this way, the flux in the empty system (with n i = 10 −2 , see SM) becomes almost perfectly aligned with the x-direction from left to right as strong absorption suppresses all longer paths [35]. Indeed, the resulting estimate for the most direct path L empty direct ≈ 0.31 s theo is in very good agreement with the numerical value of s(2Q t ) = 0.32 s theo . In the localized regime, the presence of metallic and hence impenetrable scatterers elongates the direct path, which is found to be comparable to the mean path length ( s(2Q t ) = 0.66 s theo for the sample with 280 scatterers and n i = 10 −2 ). The increased absorption-stability of the mean path length in the localized regime as compared to the ballistic regime is thus explained by the difference in the most direct scattering contributions in these two cases. We emphasize that this robustness of s[2Q t (ω)] in the localized regime is in stark contrast to the much stronger dependence on absorption we observe for a corresponding estimate using the full Wigner-Smith matrix s[Q(ω)] (see SM). Q(ω) contains the full scattering matrix and thus depends on the sum of phase delay times of both transmitted and reflected waves [36]. In analogy to our analysis from above, the strong absorption reduces these contributions to those coming from the shortest possible paths. However, since the shortest paths contributing here are those that are directly reflected when entering the cavity, their extremely short time-delay values will dominate in the strong absorption limit (see SM). Compared to transmission eigenchannels whose direct paths have to traverse the whole system, the convergence of s[Q(ω)] to the direct paths in reflection leads eventually to a pronounced underestimation of the mean path length for strongly scattering samples. After having explored the validity of the mean path length invariance in the cross-over to very strong disorder, we will now consider the opposite limit of a structured medium with periodic order. For this purpose we form a photonic crystal (PC) by a periodic arrangement of alternating aluminum and Teflon cylinders (see Methods). The structure with 15 layers of scatterers in logitudinal direction exhibits a band gap centered at f 0 = 12 GHz with a width ∆f 0 ≈ 2 GHz as can be seen in Fig. 4a. Because the PC only fills the middle part of the entire scattering area of the cavity, the mean path length includes the contribution of the PC as well as the free space between the PC and the interfaces of the cavity. To isolate the impact of the PC, we subtract the theoretical free space contribution to s[2Q t (ω)], except in the band gap for which the transmission remains in the noise floor of the experimental setup (≈ 10 −6 ) and we set s[2Q t (ω)] = 0.
Numerical simulations are then performed in a cavity whose scattering region has the same dimensions as the PC with small disorder in the scatterer positions and absorption being added to mimic the situation in the experiment (see Methods). The central frequency of the band gap is now f 0 = 12.6 GHz with a width of 3.3 GHz, which is larger than in measurements. We attribute these differences to tiny air gaps between the top plate and the aluminum cylinders in the experimental setup, where scattering at the top cylinder edge causes the excitation The decrease of the mean path length within the band gap is followed by a strong enhancement starting at the band edges such that the frequency-averaged value progressively converges towards the theoretical Weyl prediction. The experimental data (blue solid line) shows the same trend, but stays slightly below the Weyl prediction for large ∆f due to absorption (see agreement with the simulations including absorption, black solid line).
of evanescent modes. The effective properties of the scatterers are thus modified locally due to the coupling of such evanescent modes to neighboring Teflon scatterers. The mean path length is also strongly reduced within the band gap in simulations (see Fig. 4b), but s[2Q t (ω)] is not vanishing as a consequence of the finite length of the PC. We also note that the dwell time can be negative as a result of absorption [37] and since the dwell time operator is related to the time-delay operator and thus also to s[2Q t (ω)], this explains the negative values in Fig. 4b.
From such an observation one may be tempted to conclude that the mean path length invariance does not hold in such periodic systems. Following prior theoretical work on frequency sum rules [33,38], we know, however, that in a sufficiently broad spectral window, reductions and enhancements of the DOS should compensate each other in arbitrary systems including the case of photonic bandgap materials. Due to the connection between the DOS and the mean path length, we should find, correspondingly, that the strong decrease of s[2Q t (ω)] within the band gap is compensated by a corresponding enhancement right outside of the band gap. As can be seen in Fig. 4b, we indeed observe such an enhancement of the mean path length close to the band edges, with values for s[2Q t (ω)] even exceeding 3s theo (ω) in measurements and in simulations.
In Fig. 4c we now show the mean path length normalized by Weyl prediction, s[2Q t (f )]/s theo (f ), integrated over a frequency window ∆f centered around the middle of the corresponding band gap f 0 obtained in the experiment or the simulation, for this quantity is N s (∆f ) = ∆f . Note that the bandgap is not located in the center of our frequency range. Thus, once the lower end of the integration frequency window has reached 9.5 GHz, we continue the integration with only the higher frequency range. In the experiment, this average ratio N s (∆f ) now almost vanishes for a spectral window ∆f smaller than the width of the band gap but then increases rapidly and progressively converges towards N s (∆f ) ≈ 0.86∆f as ∆f = 8.5 GHz. As in the case of the empty system or the disordered configurations, this 14% deviation from the Weyl law is due to absorption within the sample. This is confirmed by simulations without absorption for which N s (∆f ) indeed reaches N s (∆f ) ≈ 0.975∆f . The convergence of N s (∆f ) now demonstrates that the pronounced enhancements of s[2Q t (ω)] at the edges of the band gap compensate the vanishing mean path length within the band gap. The fact that we observe the experimental data and the simulations with absorption to converge towards the same value of N s for large ∆f in spite of the different band gap sizes for these two cases, further substantiates the invariance property of the mean path length.
In summary, we experimentally demonstrated with microwave measurements that the knowledge of the transmission matrix alone provides a robust way of estimating the invariant mean path length, even in scattering systems with strong wave-interference and weak absorption. Our results clearly show that this invariance property reaches far beyond the diffusive regime and thus provides a comprehensive bound on enhancement of the mean path length of broadband light in a medium.

Experimental setup.
Sixteen antennas that are waveguide-to-coax adapters operating in the Ku-band are attached to the system and fully coupled to the cavity between 11 and 18 GHz. We operate in a frequency window smaller than c 0 /2h = 18.75 GHz where only the fundamental mode in the vertical z-direction is excited, making the cavity effectively two-dimensional. Measurements of the frequency spectra of the TM are carried out with two ports of a vector network analyzer connected to two N × 1 electro-mechanical switches to successively excite each transmitting and receiving antenna. The ports of the switches that are not excited are terminated with 50 Ω loads so that the antennas mimic absorbing boundary conditions. The metallic spacing between adjacent antennas generate strong internal reflections at the interfaces of the cavity. The TM is measured between 11 and 13 GHz in the ballistic and diffusive regimes and between 11 and 12 GHz in the localized regime, with frequency steps of 0.4 MHz.
Photonic crystal. The period of the square lattice between a metallic and a dielectric Teflon scatterer is d = 1.2 cm in both the longitudinal and transverse direction. A picture of the experimental setup is shown in the SM. The photonic crystal consists of 15 longitudinal layers of scatterers. The variations of the theoretical mean path length s theo (ω) with frequency for a sample of 300 cylinders is given by Eq. (2), where the area of the Teflon cylinders has to be multiplied with their refractive index squared to account for the increased density of states in dielectric materials.
Numerical simulations. We solve the two-dimensional scalar Helmholtz equation ∆ + n 2 (r)k 2 0 ψ(r) = 0 using a finite element method [39? ? ]. Here, ∆ is the Laplacian in two dimensions, n(r) is the refractive index distribution, r = (x, y) is the position vector, k 0 = 2π/λ is the vaccum wavenumber and ψ(r) is the z-component of the TE-polarized electric field. In our simulations we use the exact dimensions of the experimental setup (see Fig. 1), where the single mode leads are terminated with perfectly matched layers which absorb the outgoing waves without any back-reflections and thus mimic semi-infinite leads. To account for the global losses in the experiment, we add a frequency-independent uniform imaginary part of 2 × 10 −4 to the effective refractive index of the cavity which yields the same frequency-averaged transmission in the empty system as in the experiment.
In case of the disordered systems, we use -just like in the experiment -a single random configuration for each number of scatterers and average the calculated mean path lengths in the range of 11-13 GHz (11-12 GHz for 280 scatterers).
The simulations of the photonic crystal are performed in the frequency interval of 9.5-17 GHz. To mimic experimental uncertainties, we introduce a slight disorder to the positions of the scatterers, i.e., we displace scatterers in the transverse and longitudinal direction by a random value drawn from the interval [−r s /10, r s /10]. We then define our bandgap as the frequency interval in which the transmission in the numerical simulation reaches the experimental noise floor (≈ 10 −6 ).
To calculate the time-delay operators Q, Q t , Q r and Q r we have to invert the corresponding scattering, transmission or reflection matrices. Since these matrices can be singular, we perform a singular value decomposition and project our matrices onto subspaces containing only singular vectors corresponding to singular values greater than 10 −10 which enables us to compute their pseudoinverse (see Supplementary Material of [28] or [42] for details).

ACKNOWLEDGMENTS
This publication was supported by the European Union through the European Regional Development Fund

COMPETING INTERESTS
The authors declare no competing interests.

DATA AVAILABILITY
The data that support the plots within this paper and other findings of this study are available from the corresponding authors on reasonable request.  S1. a, Picture of the cavity with a semicircle. b, Picture of the ordered arrangement of aluminum and teflon cylinders. Figure S1a shows a picture of the chaotic cavity. The cavity is made chaotic by including an aluminum semicircle of 53 mm diameter. The semicircle is located near a boundary.
We also present in Fig. S1b a picture of the the structured medium forming a photonic crystal. The periodic order is made by the arrangement of aluminum and teflon cylinders. The distance between two cylinders is equal to d = 1.2 cm in both the longitudinal and transverse direction. The number of layers of scatterers is equal to 15.

Mean path lengths in transmission and reflection
In Fig. 2 of the main text, we compare the mean path length with the mean path lengths in transmission s t and in reflection s r . In transmission, s t is found using the average of the single-channel delay times with Here T ba and φ ba are the transmitted intensity and the phase associated to the element t ba of the transmission matrix, i.e., the transmission coefficient between incoming channel a and outgoing channel b, t ba = √ T ba exp(iφ ba ). The averaging is performed over incoming and outgoing channels as well as the frequency range and c 0 is the speed of light.
In case of reflection, our experimental setup does not allow the measurement of the full reflection matrix. However, we obtain its diagonal part with elements r aa = √ R aa exp(iφ aa ) using the S 11 parameters of the Vector Network Analyzer. The mean reflection length is then computed from

DERIVATION OF EQ. (1) OF THE MAIN TEXT
In the following we give an analytical proof of Eq. (1) of the main text which reduces to with the time-delay operators in case of a two-port scattering matrix which is unitary, i.e., S −1 = S † and thus S † S = 1. Here, primed quantities denote the transmission or reflection from the other port. Thus, we can write the Q-operator as where its trace is given by To calculate the first term, we use a singular value decomposition (SVD) of the transmission matrix t = U ΣV † , where U = ( u 1 , u 2 , . . . , u N ) and V = ( v 1 , v 2 , . . . , v N ) are the matrices which contain column-wise the left and right singular vectors of t and Σ = diag{σ n } is a diagonal matrix containing the singular values σ n . Making use of U † U = 1 and V † V = 1 and the invariance of the trace with respect to cyclic permutations we can write Using V † V = 1, we can rewrite the second term in the trace as dV † dω V = −V † dV dω . Making further use of the fact that the singular values of t are the square root of the eigenvalues of t † t and tt † , i.e., σ 2 n = τ n are the transmission values, we arrive at (S10) Here we have introduced the channel delay times as where the superscript denotes in the following to which matrix a singular vector (or singular value) belongs to. To calculate the remaining terms, we make use of the relations between the singular vectors which follow directly from the unitarity of the scattering matrix. For the right singular vectors v n we get The left singular vectors u n are related as follows Furthermore, we know that t = t T which implies that t and t share the same eigenvalues. Thus, σ . Using now Eq. (S10) and similar expressions for the terms in Eq. (S8) containing t , r and r yields where we have already used the relations (S12)-(S15). The last term corresponds now to the imaginary part of the Q-eigenvalues which has to vanish because Q is a Hermitian operator (if S is unitary) featuring real eigenvalues. Using τ ( ) n +ρ ( ) n = 1 which follows from the unitarity of S then indeed yields Eq. (S16) can now be written in two different ways: (S18) Next, we want to connect this result to the trace of Q t , which can be simplified as follows: (S19) Please note that the channel delay times dθ (t) n /dω correspond to the delay times of transmission eigenchannels and thus they differ from the real part of the Q teigenvalues. However, the invariance of the trace under similarity transforms used in the derivation above keeps their sum the same.
Since we know that t = t T , it follows that Q t = t −1 Q T t t . Thus, Q t is a similarity transform of the transpose of Q t which implies that they also share the same eigenvalues and thus their trace is the same. In case of the reflection matrix we, however, do not have a direct relation between r and r and hence there is no direct relation between the eigenvalues of Q r and Q r , but unitarity still enforces that the sum of the corresponding channel delay times in (S18) is equal to the sum of transmission channel delay times. With the help of Eq. (S19) and similar trace expresions for Q t , Q r and Q r , Eq. (S18) can then finally be written as It is important to note that there is no relation between the transmission and reflection delay times for single eigenchannels. This can easily be seen by comparing the expressions n . However, unitarity implies that the sum of delay times in transmission for a single eigenchannel is equal to the sum of delay times in reflection, i.e.,

INFLUENCE OF ABSORPTION IN THE EXPERIMENT Empty cavity
We have seen in Fig. 2 of the main text that the estimated mean path length is underestimated for an empty cavity, whereas it almost reaches the theoretical prediction as soon as a few scatterers are added to our system. This underestimation can be explained by the existence of very long delay times in the empty cavity for which the impact of absorption is stronger. This is illustrated by the spectrum of the mean path length found in simulations in absence of absorption [see Fig. S2a]. Strong peaks corresponding to mean path lengths of a few hundred meters are found which are caused by bouncing orbits between the top and bottom interfaces of the cavity as shown in Fig. S2b. Due to their very long dwell times in the cavity, weak absorption already affects these states strongly giving rise to a dampened and statistically inhomogeneous intensity distribution which results in an underestimation of the mean path length.

Ballistic and diffusive regime
In contrast to the empty cavity, the presence of scatters fully randomizes incoming waves in the ballistic and diffusive regime which then does not allow the existence of such orbits yielding a noticeably better estimate of the mean path length in the presence of absorption. To further explain the experimentally observed enhanced robustness to absorption in the diffusive regime compared to the empty cavity, we consider a varying number of ports attached to the system, increasing from N = 1 to N = 8. For N < 8, the unused ports are disconnected and behave as metallic boundary conditions. To conveniently estimate the impact of absorption as a function of N , we consider the quantity N s = N c 0 t WS , which, in the absence of absorption, should take the same value for all systems with a different number of ports N .
In the diffusive regime, as shown in Fig. S3a, the values for N c 0 t WS converge towards the theoretical prediction only for N = 8. This corresponds to the number of ports for which losses through incoming and outgoing channels dominate the dissipative losses within the sample such that s[2Q t (ω)] provides a robust estimation of the mean path length. This can be shown by separating these two sources of losses using a decomposition of the average linewidths as a sum of losses through the ports Γ n and uniform absorption Γ a , i.e., Γ n = Γ n + Γ a . The average losses through the 2N ports connected to the cavity scale linearly with the losses through a single channel Γ c , i.e., Γ n = 2N Γ c . To extract the values of Γ a and Γ c , we use that the average transmission through the sample in the time domain decreases exponentially such as |t ba (t)| 2 = exp(− Γ n t), where |t ba (t)| 2 is found from an inverse Fourier transform of spectra of transmission coefficients t ba (ω). We therefore find Γ n for each N and we fit this curve as Γ n = 2N Γ c + Γ a [see S3b] which yields Γ c ∼ 7.8 MHz and Γ a ∼ 23 MHz. For N = 8, 2N Γ c = 125 MHz and the ratio 2N Γ c /Γ a shown in Fig. S3c is equal to 5.4. In this case, losses through ports indeed dominate so that the estimation of the mean path length is robust to the uniform absorption present in the experiment.

Localized regime
Just like in the diffusive regime, we have seen in the main text that the transmission matrix provides a reliable estimate of the Weyl prediction also in the localized regime. This is the case even though the probability distribution of the eigenchannel delay times is substantially broadened, i.e., there exist very short as well as very long paths. In the following, we provide an explanation of the robustness of the mean path length to the absorption present in the experimental setup using its connection with the density of states (DOS).
We employ the connection between the mean Wigner-Smith time delay operator and the density of states (DOS) [1][2][3][4] Tr[Q(ω)] = 2πρ(ω) (S23) to explain the robustness of Tr(Q t ). The DOS ρ(ω) can be decomposed into a superposition of individual contributions from quasi-normal modes (QNM) of the system. These QNMs (or resonances) are associated with complex eigenfrequenciesω n = ω n − iΓ n /2, where ω n is the central frequency of the n-th mode and Γ n is its linewidth, such that [5] ρ(ω) = 1 π n ρ n (ω) These eigenfrequenciesω n are also the poles of the scattering matrix. The contributions of a mode ρ n (ω) satisfies ∞ 0 dωρ n (ω) = 1 so that the average DOS is independent of absorption. Hence, adding absorption to our system results in broadening of the linewidths, Γ n → Γ n + Γ a , where Γ a is the linewidth associated to the losses within the sample.
The transmitted speckle pattern at the output for a spectrally isolated mode does not depend on the position of the excitation so that the transmission matrix is of unit rank [6][7][8]. Measuring the transmission through a single channel (N = 1) then yields the DOS using its connection to Tr(Q t ). When several resonances overlap spectrally, however, the number of ports N has to be larger than the number of resonances contributing to the DOS. We now quantify the number of ports that are required for an accurate estimation of the DOS. Following Breit-Wigner theory, the modal expansion of the transmission matrix is where W R and W L are the projection of the eigenstates of the open system onto the right and the left channels. Furthermore,ω n = ω n − iΓ n /2 are the complex eigenfrequencies of the eigenstates of the open system, i.e., the poles of the scattering matrix, where ω n is the central frequency of the n-th mode and Γ n is the corresponding linewidth. The W -matrices are assumed to be independent of frequency and of dimension N × M , where N is the number of incoming channels and M is the number of modes of the open system. Denoting their pseudoinverses as W −1 L and W −1 R we can write and thus where we have assumed that W −1 The latter is only true if M < N and rank(W R ) = M in which case W R features orthonormal columns which results in W −1 R being the left inverse of W R . Equation (S28) now shows that modes with resonances far from ω only weakly contribute to the transmission matrix. The size of (ω −ω) −1 can hence be restricted to the participation ratio of modal contributions ρ n (ω) to the DOS, M = [ n ρ n (ω)] 2 /[Σ n ρ 2 n (ω)], so that W L and W R become of dimension N × M . M is obviously linked to the modal overlap δ = Γ n /∆ω, where ∆ω is the level spacing, ∆ω = ω n+1 − ω n . For M < N , the similarity-invariance of the trace operator gives where we have used in the first step that W −1 L is the left-inverse of W L in case of M < N . Inserting now Eq. (S29) into Eq. (S23) finally yields This result now shows that the mean path length is not only well estimated from measurement of the transmission matrix only, but can also be well estimated in the presence of absorption as long as M < N . However, M increases with absorption and when M > N , the pseudoinverse coupling matrices are no longer left-inverse, i.e., W −1 L,R W L,R = 1, which results in an under-estimated mean path length, i.e., Re [Tr(Q t )] < ρ(ω). Last, we want emphasize that this result is not only valid in the presence for absorption, but it also applies in the case of incomplete channel control.
In non-dissipative systems, the modal overlap δ of localized waves is small and M ∼ 1. However, as already explained above, absorption in our experimental setup can give rise to an increase of these two quantities. Looking at our measurements through a cavity with 280 scatterers, we find that M ≈ 3.2 so that M < N and the estimation of the mean path length is robust. The impact of the modal overlap is illustrated in Fig. S4 in which the transmission matrix is measured with a number of ports attached to the system increasing from N = 1 to N = 8. s theo is seen to be accurately estimated for N > 3, in agreement with M ≈ 3.2. In this small modal overlap regime, the first eigenchannels correspond to the contribution of single localized long-lived modes with isolated resonances. For these eigenchannels, values as large as t (t) n = 100 ns corresponding to travel path of 30 m in a 0.5 m long-cavity are found. Despite such long paths, we observe in Fig. S4 that the mean path length estimated with respect to the number of connected ports, N c 0 t WS , reaches a plateau already when the number of connected ports to the cavity satisfies N > 3.
It is worth pointing out that the transmission eigenvalues τ n do not contribute to the real part of the eigenvalues of Q t since the latter only contains the frequencyderivatives of the singular vectors of t which allows an accurate estimation of the mean path length even in such localizing systems featuring very low transmission.

CONVERGENCE TOWARDS THE MOST DIRECT PATH IN THE LIMIT OF STRONG ABSORPTION
To investigate the effect of strong absorption on all operators involved in Eq. (S20), we consider the twodimensional toy-model shown in Fig. S5 which consists of two scattering regions with scattering matrices separated by free space described by the scattering matrix S free 2 , where we also add a free space section described by S free 1 (S free 3 ) in front of the first (after the second) scattering region for generality. The corresponding scattering matrices for these free space sections are given by where the propagation matrices are defined as S5. Sketch of the two-dimensional toy-model, where S free j with j = 1, 2, 3 are the scattering matrices of the free space sections and S1 and S2 are scattering matrices of the two considered scattering regions.
Here, k x,n = k 2 − k 2 y,n are the longitudinal propagation constants of the waveguide modes, k = 2π/λ is the free space wave vector, k y,n = nπ/W are the transverse wave vectors of the modes in a waveguide of width W and L j are the lengths of the corresponding free space sections.

Trace of Qt
To calculate the transmission matrix of such a system, we employ the Feynman path integral formulation and sum over all possible paths which yields t = P 1 t 1 P 2 t 2 P 3 + P 1 t 1 P 2 r 2 P 2 r 1 P 2 t 2 P 3 + P 1 t 1 P 2 r 2 P 2 r 1 P 2 r 2 P 2 r 1 P 2 t 2 P 3 + . . . Hence and using these expressions to calculate the trace of Q t = −it −1 dt/dk then gives being the time-delay caused by the direct path and corresponds to the contributions from the multiply scattered paths, where we have used the linearity of the trace and its invariance under cyclic permutations of matrices. We now add uniform absorption by adding an imaginary part to the total wave vector, i.e., k → k + iκ, where κ = n i k with n i being the uniform imaginary part of the refractive index. This imaginary part then causes a change of the propagation constants k x,n →k x,n 1 + in i k 2 /k 2 x,n (S39) withk x,n = (1 − n 2 i )k 2 − k 2 y,n in case of n i 1. Thus, we get where its derivative evaluates to Taylor-expanding now the inverse matrix expression in (S38) yields and due to (S41) we find that This reveals now that Tr(Q t ) multi ∝ O(P 2 2 ) → 0 in the limit of strong absorption due to the exponential decay in (S40) and thus This means that the transmission delay times converge to those of the most direct paths in the limit of strong absorption which is already reached for n i 1 due to the fast exponential decrease in (S40). In a less complex one-dimensional system featuring barriers of finite height, it can be even shown that Q t reduces to the optical path length of the direct path through this system if absorption is strong. It is also worth pointing out that Tr(Q t ) direct is independent of absorption in the sense that the exponential decay drops out in (S37), but absorption still enters in form of a correction term in (S41). However, since usually n i 1, these corrections are small and one can approximatek x,n ≈ k x,n and dP j /dk ≈ diag(ikL j /k x,n ) where the latter expression yields the free space propagation delay time in the absence of absorption in (S37).

Trace of Qr
Next, we investigate the effect of absorption on Q r . To set up the reflection matrix of our toy-model system, we again sum over all possible paths and get r = P 1 r 1 P 1 + P 1 t 1 P 2 r 2 P 2 t 1 P 1 + P 1 t 1 P 2 r 2 P 2 r 1 P 2 r 2 P 2 t 1 P 1 + . . .
To calculate the inverse of r we first rewrite the above expression as follows Next, we assume strong absorption which causes the term in the square brackets to be small thus enabling us to approximate its inverse by (1 + x) −1 ≈ 1 − x which yields Following the same strategy as above and calculating dr/dk and then Q r , we find that with the contributions from the direct path being where the contributions from the mutliply scattered paths are again In the limit of strong absorption, we thus again find that Tr(Q r ) multi → 0 which yields Hence, for strong absorption and n i 1, the eigenchannel delay times in reflection reduce to the delay times of the most direct paths in the absence of absorption as was the case for the time delay operator containing the transmission matrix.
Trace of Q Last, we investigate the effect of absorption on Q which contains the full scattering matrix of the system S = r t t r . (S52) The scattering matrix S can then be inverted blockwise with M = (r − tr −1 t ) −1 which is valid if r and M are non-singular. The trace of Q = −iS −1 dS/dk is then given by Since absorption causes an exponential decrease in transmission, strong absorption will lead to t → 0 and t → 0. In this limit, M → r −1 and

Numerical results
To investigate the influence of strong absorption in more detail, we perform numerical simulations of the experimental setup between 11 and 13 GHz and introduce uniform absorption of increasing strength by adding a progressively increasing imaginary part to the effective refractive index of the cavity. The results in the empty cavity and localized regime are shown in Fig. S6a,b, where each data point is the result of a frequency-and configuration average over 200 random configurations. In both cases, we observe that the path lengths obtained with the different operators decrease with respect to absorption.
In the empty system, the transmission matrix and reflection matrices as well as the full scattering matrix provide mean path lengths that are much smaller than Weyl prediction in the strong absorption limit. To understand the rapid decrease of the path lengths for an increasing absorption strength, we show in Fig. S6 the spatial Poynting vector distribution of the eigenstate featuring the highest transmission in the empty cavity at 10 GHz. In the absence of absorption, complex patterns in the Poynting vector distribution are visible (see Fig. S6c). However adding strong absorption causes the flux to align with the positive x-direction (red color) which illustrates the convergence towards the most direct path from the input to the output ports (see Fig. S6e). To estimate the most direct path in the empty cavity, we use that the time-delay of a straight section of length without any scatterers is k/k x,n with k = 2π/λ being the total free space wavevectora and k x,n = k 2 − (nπ/W ) 2 being the propagation constant of the n-th mode in a section of width W . In the limit of strong absorption, only the most direct path will survive which is given by the time-delay of the lowest transverse waveguide mode in the corresponding sections and thus our estimate reads This value is in very good agreement with the value of s(2Q t ) / s theo for the largest absorption strength which is slightly larger (0.32) due to the fact the direct paths can also contain contributions featuring a slight angle to the longitudinal axis causing the waves to exit the system through one of the output ports not exactly opposite to their input port. Moreover, this absorption strength might still be not strong enough, i.e., we might not have fully converged to the direct path yet.
In the localized sample, the transmission delay times in the limit of strong absorption also reduce to the ones of the most direct paths which still have to traverse the system. However, adding impenetrable metallic scatterers to the scattering region increases the length of the most direct path as can be seen by comparing the mean path length for strong absorption in Fig. S6b with Fig. S6a. The distribution of the Poynting vector in Fig. S6f now shows a complex pattern made of tortuous paths within the sample even in the strong absorption regime. The transmission eigenchannel delay times hence converge to a value much larger than the one associated to L empty direct . This elongation of the direct path leads thus to an increased mean path length compared to the empty system in the strong absorption limit and thus to a better estimate of the value predicted by the Weyl law.
In contrast, the reflection delay times decrease and converge in the localizing configurations to small values which resemble the direct paths in reflection, i.e., direct reflections at the first scattering layers -as predicted by Eq. (S51) -where the trace of Q converges to the sum of reflection delay times due to the almost vanishing transmission [see Eq. (S55)]. Thus, estimating the mean path length using the transmission matrix provides a much more reliable estimator of the Weyl prediction in the localized regime than its estimation based on the full scattering matrix as illustrated in Fig. S6b.

INFLUENCE OF THE TRUNCATION OF SINGULAR VALUES OF THE TM
In this section, we take a closer look at the influence  Fig. 2a of the main text for which a cut-off of σcut = 10 −10 was chosen. The red line shows the theoretical value s theo obtained using the Weyl law (frequency average of Eq. 2 in the main text). The deviations observed here from the theoretical values are typically decreasing, when we average not only over frequency (as done here), but also over different disorder configurations (not shown). To make sure that the system with 280 scatterers is clearly in the localized regime, the frequency range was here reduced to 11-12 GHz, as compared to the range 11-13 GHz used for all the other scatterer numbers.
of the cut-off applied to the singular values for com-puting the pseudo-inverse of the scattering, transmission and reflection matrices. Figure S7 shows the mean path length s(2Q t ) obtained from the numerical simulations for different cut-off values σ cut , where σ cut = 10 −10 corresponds to the value chosen in the main text. In the empty system and in the diffusive regime, the transmission is high enough such that the cut-off does not affect the mean path length. However, in the localized regime we clearly see a decrease of the mean path length with increasing cut-off, which is caused by low transmission values σ < σ cut that are cut away in our SVD projection procedure.