Classifying topology in photonic crystal slabs with radiative environments

In the recent years, photonic Chern materials have attracted substantial interest as they feature topological edge states that are robust against disorder, promising to realize defect-agnostic integrated photonic crystal slab devices. However, the out-of-plane radiative losses in those photonic Chern slabs has been previously neglected, yielding limited accuracy for predictions of these systems' topological protection. Here, we develop a general framework for measuring the topological protection in photonic systems, such as in photonic crystal slabs, while accounting for in-plane and out-of-plane radiative losses. Our approach relies on the spectral localizer that combines the position and Hamiltonian matrices of the system to draw a real-picture of the system's topology. This operator-based approach to topology allows us to use an effective Hamiltonian directly derived from the full-wave Maxwell equations after discretization via finite-elements method (FEM), resulting in the full account of all the system's physical processes. As the spectral FEM-localizer is constructed solely from FEM discretization of the system's master equation, the proposed framework is applicable to any physical system and is compatible with commonly used FEM software. Moving forward, we anticipate the generality of the method to aid in the topological classification of a broad range of complex physical systems.


I. INTRODUCTION
Originally discovered in the context of electronic systems, the concept of topological insulators has been generalized to photonic structures thanks to the platformindependent framework of topological band theory used to classify such systems.Subsequently, over the past decade, there has been substantial interest in photonic topological insulators due to their potential to yield nextgeneration optical devices based on their topologically protected edge states [1].For example, non-reciprocal waveguiding modes can be achieved in photonic crystals exhibiting non-trivial topology from broken time-reversal symmetry, which can be realized using gyro-electric or gyro-magnetic materials [2,3] as well as in driven nonlinear systems [4].Similar waveguiding modes can also be found in a variety of metamaterials, such as those based on shifted ring-resonator arrays [5,6], helical waveguide arrays [7], or that use synthetic dimensions [8][9][10][11].Moreover, using solely the crystalline symmetries of the photonic crystal, different classes of non-trivial topology can also be attained, leading to robust waveguiding states along bends that preserve the crystalline symmetry [12][13][14][15][16] or robust cavity-like states for enhanced light-matter interactions [17][18][19].
Material topology in electronic systems is identified through the system's band structure and Bloch eigenstates using invariants defined on the system's Brillouin zone; similarly, topological robustness is defined in terms of the system's bulk band gap [20,21].Traditionally, these same invariants have been used to classify topology in photonic systems as well.However, the analogy between topological insulators in electronic systems Gapless environment for photonic crystal slabs.(a) Schematic of a free-standing photonic crystal slab in a three-dimensional (3D) geometry.Photonic structures are inherently 3D and are usually surrounded by an homogeneous material that features a light cone.As such, out-ofplane radiative losses, depicted by the red arrows, are inherent to such structures.The photonic crystal is a triangular lattice with lattice constant a = 1 µm composed of dielectric rods, εjj = 14 for j = x, y, z, of radius r = 0.37a and height t = 0.5a embedded in a gyro-electric material slab, εjj = 1 and εxy = −0.4i, of thickness t = 0.5a.(b) Band structure of the photonic crystal slab in (a) over the first Brillouin zone, for a transverse magnetic-like polarization.The photonic band gap at around ω = 0.42[2πc/a] is the "topological band gap" known from extrapolation from the two-dimensional photonic crystal approximation.The shaded region depicts those frequencies and wavevectors that are at, or above, the light line of the surrounding air.The red line depicts the light line, ω = c|k|.Above the light line, photonic crystal slabs generally exhibit resonances, not bound states.
and in photonic systems is not always exact.For realizations of photonic topological insulators operating at longer wavelengths [2,22,23], the system can be bounded by materials that provide excellent approximations of perfect electric conductors [24], yielding similar open boundary conditions to those that appear in electronic systems.In contrast, photonic topological insulators operating at technologically relevant wavelengths arXiv:2402.10347v1[physics.optics]15 Feb 2024 and length-scales are generally based on photonic crystal slab motifs, and border free space on at least one surface, which is gapless above the light cone [Fig.1].This gapless radiative environment has two relevant consequences for the classification of photonic topology: (1) For those wavevectors above the light-cone, the photonic crystal slab does not possess a true band structure consisting entirely of bound state solutions with real frequencies and instead only exhibits a resonance band structure characterized by complex frequencies.As such, it is not known whether standard topological invariants, defined by integrating over a system's occupied bands, can be meaningfully applied to the resonances of such photonic slab systems.(2) Similarly, the full system of photonic crystal slab plus surrounding environment is gapless above the light-cone, meaning that according to band theory the system's topological protection is not well-defined.Thus, as already noted by Raghu and Haldane [25], the radiative environment has traditionally limited the notion of topological protection-as defined by topological band theory-in photonic topological insulators.Therefore, although topological band theory can be applied to photonic systems to yield some insight into their topological properties, this cannot be viewed as a complete picture as the setting goes beyond the scope of band theoretic approaches; any complete picture of topological photonic crystal slabs must account for their inherent out-of-plane radiative losses, and provide a definition of topological protection despite these losses.
Here, we present a general framework for classifying topology in realistic three-dimensional (3D) photonic systems that directly accounts for both in-plane and out-ofplane radiative losses.To do so, we solve two interconnected challenges, demonstrating how to perform dimensional reduction to calculate invariants of 2D systems, such as Chern numbers, for photonic crystal slab systems that are inherently 3D, and showing how this generalizes to non-Hermitian systems so that radiative losses can be properly accounted for.The framework we develop is rooted in the spectral localizer, which combines the position matrices and the Hamiltonian matrix of the system to draw a local picture of a system's topology [26].Using the operator-based approach of the spectral localizer, we construct a spectral FEM-localizer built on an effective Hamiltonian directly derived from the full-wave Maxwell equations via finite-element method (FEM).We demonstrate the utility of the FEM-localizer framework through two fundamental examples in topological photonics: a 2D photonic Chern insulator and a 2D photonic Chern quasicrystal, proving that the spectral FEM-localizer approach is applicable to aperiodic structures that lie beyond the scope of topological band theory.Finally, we apply the spectral FEM-localizer to study the topology of a photonic Chern slab, showing how to generate a local strong 2D invariant for the 3D system while directly accounting for the out-of-plane radiative losses.Given the wide variety of systems that can be faithfully approximated by FEMs, we anticipate that our framework has broad applicability both within photonics and beyond, and will be useful for the study of the topology in complex physical systems where a band theoretic picture is not available.

II. OVERVIEW OF THE SPECTRAL LOCALIZER
Despite being a real-space approach to topology, the spectral localizer shares some conceptual similarities with topological band theory.A modern understanding of traditional band theoretic approaches to topology can be built from the concept of atomic limits-the limit in which the couplings between adjacent atoms, molecules, or structural decorations are turned off, and the system's band structure becomes completely flat.Atomic limits are topologically trivial as they always possess a complete symmetry-preserving localized Wannier basis [27,28].Moreover, different systems are topologically equivalent if one system can be smoothly deformed (i.e., path continued) into the other system without closing the relevant bulk band gap (i.e., the band gap at the frequency of interest) or breaking any necessary symmetry.Thus, from this perspective, the question of material topology becomes one of whether a system can be path continued to an atomic limit; if so, it is trivial.Band theoretic approaches offer a few different methods for making this determination, either using standard topological invariants [21], or by comparing a system's band structure against the possible elementary band representations [29].
In contrast, the spectral localizer framework has emerged as a method to diagnose a system's topology from the real-space perspective of the atomic limit.The key idea is that just as the wavevector-space description of atomic limits is as a material with completely flat bands [30], a real-space description of atomic limits can be understood in terms of the system's position matrices X j and Hamiltonian H via the commutation relations with d the dimension of the system.In other words, in an atomic limit, H (AL) is block diagonal, with each block corresponding to each decoupled atom, molecule, or structural element.Likewise, the position of each such interior degree of freedom is condensed into a single location.Hence, X (AL) j and H (AL) commute for atomic limits.
From this real-space perspective, the question of topology then becomes one of understanding whether a system's non-commuting H and X j matrices are nevertheless path continuable to commuting matrices, while preserving any necessary symmetry and maintaining the relevant bulk spectral gap.To perform this assessment directly in real-space for a d-dimensional Hermitian system in any of the ten Altland-Zirnbauer symmetry classes [30][31][32][33], one first forms the system's spectral localizer by combining X j and H using a Clifford representation [26], Here, Γ 1 , . . ., Γ d+1 are (d + 1)-dimensional Clifford representation satisfying Γ † j = Γ j , Γ 2 j = I, and Γ j Γ l = −Γ l Γ j for j ̸ = l, while I is the identity matrix.The spectral localizer is an inherently local approach to material topology; in Eq. ( 2), (x 1 , . . ., x d , E) ≡ λ is the spatial coordinate (x 1 , . . ., x d ) and energy E where the system's topology is being probed.Finally, κ is a hyperparameter chosen to make the units consistent between the position and Hamiltonian matrices, and to additionally balance the emphasis on the system's position information relative to its Hamiltonian.Typically, for gapped systems, it suffices to choose κ ∼ 2g/L [34][35][36] where g is the width of the bulk band gap and L is the length of the finite system considered.Extensive studies have demonstrated the spectral localizer's versatile applicability across a broad range of topological systems, even beyond the traditional topological band theory [26,[34][35][36][37][38][39][40][41][42][43][44][45][46][47][48].
Using results from the study of C * -algebras [26,34,38], the spectrum of the spectral localizer has been proven to be connected to local topological markers for every discrete symmetry class (i.e., Altland-Zirnbauer class [30][31][32][33]) for every physical dimension.For a 2D Hermitian system in class A, namely a system lacking any discrete symmetries, the appropriate local topological invariant is the local Chern number, defined as ) where sig denotes the matrix's signature, the difference between its total number of positive and negative eigenvalues.A non-zero local Chern number at (x, y, E) indicates that the re-centered position (X −xI), (Y −yI) and Hamiltonian (H −EI) matrices cannot be path continued to be commuting, meaning that the system cannot be deformed to the atomic limit.In other words, a non-zero local Chern number, C L (x,y,E) ̸ = 0 tells us that the system is topologically distinct from the atomic limit, and is locally topologically non-trivial at the spatial and energy coordinate (x, y, E).
Separate from its ability to identify material topology, the spectral localizer can be seen as a tool to identify localized states by looking at an approximate state ψ of both the position and Hamiltonian matrices of the system In particular, the localizer gap, defined as the smallest singular value of the spectral localizer with σ(L) being the set of eigenvalues of L, gives a measure about large of a modification of the system is needed to realize such state ψ.As such, a localizer gap closing µ C (x1,...,x d ,E) = 0 indicates that there exists such an approximate state ψ at energy E that is localized at spatial position (x 1 , . . ., x d ).
Altogether, the local topological markers and the localizer gap give a consistent picture of the topology locally in space and energy.The local topological markers are used to probe the topology locally at space-energy coordinate (x 1 , . . ., x d , E), and cannot change as long as the localizer gap does not close (µ C (x1,...,x d ,E) ̸ = 0).When the local markers change across some spatial or energy path from one topological phase to another topological phase, the localizer gap must close, resulting in a localized state [Eq.( 4)] at the interface between the two topological distinct phases: this is precisely bulk-edge correspondence.
The spectral localizer is not the only real-space theory of material topology that provides local topological markers [49][50][51][52][53][54][55][56][57][58][59].However, it is the only currently known theory of topology that preserves system sparsity, i.e., if H is sparse, L (x1,...,x d ,E) is sparse.Thus, unlike other local markers that typically require projecting into an occupied subspace, yielding still-relatively-large dense matrices, the calculation of local markers using the spectral localizer can leverage advances in sparse matrix algorithms to realize substantial numerical speedups.For example, finding a sparse matrix's signature does not require finding any of its eigenvalues, and can instead be found using Sylvester's law of inertia [60,61].

III. BUILDING THE SPECTRAL FEM-LOCALIZER
The spectral localizer is used to study a system's topology directly from its equations of motion, i.e., its master equation.For example, it is straightforward to apply the spectral localizer framework to tight-binding models [26,37,39,[41][42][43][44][45][46][47][48] where the position operators are diagonal matrices with entries being the spatial position (x 1 , . . ., x d ) of the model's sites, and H the tight-binding Hamiltonian.However, the spectral localizer is not limited to such approximate descriptions of physical system.Instead, so long as a system admits a discretization of some form (or some other method for generating a bounded matrix description of the system), the matrix of its discretized master equation can be inserted into the spectral localizer [Eq.( 2)], where practical parameters and geometry can be used.With such a choice of discretization, the entries of the position matrices X j can then be chosen as the grid mesh positions from discretization of the master equation and the Hamiltonian matrix H can be chosen as being any matrix whose eigenvector is a solution of the master equation, namely a matrix whose eigenproblem is physically meaningful in order to have a relevant joint-spectrum problem.As such, for the study of the topology in physical system within the spectral lo-calizer framework, no further approximation is required beyond the discretization of the master equation, yielding a potentially more accurate description of a system's topology.

A. The photonic master equation
The master equations for photonic systems are given by Maxwell's equations.Assuming that the materials used are linear and time-independent, the electromagnetic fields can be written in a time-harmonic form e −iωt such that a photonic system can be described by the source-free Maxwell's equations where ω is the angular frequency, E(x) and H(x) are the electric and magnetic fields, and ε(x) and μ(x) are the permittivity and permeability tensors.Previously, the spectral localizer framework has been applied to describe the topology of 2D photonic crystals [35,36,40].These prior studies took advantage of finite-difference discretizations of Maxwell equations [Eqs.( 6)- (7)] to automatically satisfy the divergence-free condition [Eqs.( 8)-( 9)].However, this approach is not easily scalable, as it requires a uniform mesh and therefore requires very large matrices for the simulation of realistic designs of 3D systems.
Instead, here, we use the finite-element method (FEM) for a more general approach to any physical system described by a master equation.The key advantage of FEM-localizer framework is that it allows for a much coarser meshing and therefore reduces the size of the matrices involved.Moreover, the method easily incorporates physical processes with different characteristic length scales, where additional equations of motion can be included to described the relevant processes and their couplings.For example, dispersion can be described by introducing auxiliary equations for the material's internal degrees of freedom responsible for this effect [62] that are then coupled to Maxwell's equations [Eqs.( 6)-( 9)].To best make use of the FEM approach for photonic systems, here we use the Helmholtz equation for the electric field E(x), derived from Eqs. ( 6)-( 9) as the master equation to probe the topology in photonic systems.

B. Overview of the finite-element method
In this section, we briefly outline FEM discretizations, with a focus on the relevant information for then incorporating the resultant equations of motion into the spectral localizer framework.A more detailed description of FEM can be found in FEM textbooks [24].
The FEM discretization starts by reformulating the master equation into its weak form, where the differential equation is no longer satisfied exactly at every point of the mesh.The weak form of the master equation consists in turning the differential equation into an integral equation, via the method of integration by parts, to improve numerical stability.Indeed, the differentiation of the solutions of the master equation may be limited at the boundaries of the simulation domain or at some material interfaces, where a jump in their values can be observed.The weak form is therefore obtained by multiplying the master equation with a weight function α(x) and by evaluating the overlap integral over the simulation region Ω.The weak form for the master equation Eq. ( 10) is then The solution vector, E(x) for Eq.(10), is decomposed in terms of the shape functions w n with unknown weights E n located along the extended mesh nodes [see for example the green crosses in Fig. 2].Importantly, these shape functions are chosen to satisfy the desired properties of the system's equation.For instance, when considering Maxwell's equations, it is imperative to fulfill both the divergence-free conditions and interface conditions.In this context, the so-called curl elements [63] can be chosen as shape functions.These curl elements inherently satisfy the divergence condition [Eqs.( 9)-( 8)] as they are divergence-free functions.Furthermore, the curl elements enforce the criterion that the tangential component of the electric field must be continuous while the normal component can be discontinuous across interfaces, in accordance with the interface conditions set by the Maxwell's equations.Altogether, the solution to the master equation is obtained by solving the FEM-discretized master equation after performing numerical integration, which can be written as a system of linear equations in the matrixform where Ψ = (. . ., E n , . ..)T is the solution vector, the electric field E(x), at frequency ω.The magnetic field H(x) can then be derived using Eq. ( 6).Notably, H eff (ω) is a good candidate to be an effective Hamiltonian for insertion into the spectral localizer as the eigenvector with zero eigenvalue is a solution to the master equation.

C. Incorporating boundary conditions
Although there are many available implementations of FEM, here we describe the methodology based on the FEM discretization from the commercial software COM-SOL Multiphysics [64] as this is a widely used software across many different physical platforms.Using details from this specific FEM implementation, we then show how to develop a Hamiltonian that incorporates the system's boundary conditions.
Using the Eigenvalue Solver algorithm in COM-SOL, the FEM discretization leads to solving the following set of equations for the solution vector in the extended mesh Ψ, where N F and N are respectively the constraint force Jacobian matrix and the constraint Jacobian matrix, and Λ is a vector made of the Lagrange multipliers for the boundary conditions and fictitious degrees of freedom.In Eqs. ( 14)-( 15), H eff is a matrix-valued function where ω ∈ C, M is the mass matrix, C is the damping matrix, and K is the stiffness matrix.The real part of ω corresponds to the solution's angular frequency while its imaginary part is its decay rate.In sum, Eqs. ( 14)-( 15) contain the discretized weak form of the master equation [see the term H eff (ω)Ψ in Eq. ( 14)], as well as additional terms that account for the boundary conditions.
In order to remove the additional terms that incorporate the boundary conditions and solve an equation that resembles Eq. ( 13), the constraint equation is first solved.Namely, Eq. ( 15) is solved as with Ψ d = 0. Then is a solution of Eqs. ( 14)- (15).Equations ( 14)-( 15) are therefore reduced to find Ψ c , the solution of the eliminated matrix equation where H eff,c is the matrix-valued function defined as with Null and Nullf being composed of basis vectors spanning the null space of N and N T F , respectively, Physically, the eliminated matrix equation [Eq.( 19)] considers the eliminated effective Hamiltonian H eff,c (ω) where all the degrees of freedom involved in the boundary conditions have been accounted for and removed.Consequently, H eff,c (ω) is the effective Hamiltonian compatible with the spectral localizer framework, and not H eff (ω).

D. The spectral localizer via finite-element method
As the eigenvector of H eff,c (ω) with eigenvalue zero is physically meaningful because it corresponds to a solution of eliminated Maxwell's equations, H eff,c (ω) can be chosen to be the effective Hamiltonian matrix in the spectral localizer framework.Accordingly, the position matrices X j,c need to be constructed in the same vector space as H eff,c (ω).In the non-eliminated vector space, the position matrices X j are diagonal matrices with entries corresponding to the j-th coordinate position of the n-th FEM degrees of freedom x j,n , i.e. the positions of the extended mesh nodes [see for example the green crosses in Fig. 2], The position matrices in the eliminated space X j,c are therefore obtained by projecting X j onto the eliminated space via Null and Nullf as Given the unique mathematical and computational complexities associated with using a FEM, there are several modifications that must be made to the spectral localizer framework [Eq.( 2)] to probe the systems local topology.First, to probe the topology at spatial position coordinate (. . ., x j , . ..), x j needs to be expressed in the eliminated space in accordance to the position matrix X j,c .This can be implemented by directly projecting (X j − x j I), appearing in Eq. ( 2), onto the eliminated space, (X j − x j I) c = Nullf T (X j − x j I)Null, and by probing at spatial position zero namely λ = (0, . . ., 0, E).Second, as only the zero eigenvalue of H eff,c corresponds to a physically meaningful solution of the Maxwell's equations, the localizer has to be probed at λ = (. . ., 0), namely the effective Hamiltonian H eff (ω) itself carries the information about the frequency ω at which the system's topology is being classified.Thus, for shorthand notation, the topology at location (x 1 , . . ., x d , ω) is probed using the spectral FEM-localizer defined as with For example, for a 2D Hermitian system, the spectral FEM-localizer can be written using the Pauli spin matrices as the choice of Clifford representation, yielding and the local topological marker, for class A systems, at position (x, y) and angular frequency ω is obtained from Altogether, the effective Hamiltonian H eff,c (ω) solves the system's master equation rigorously with the only approximation being the discretization, taking into account all the possible processes in the physical system.The retained information in the effective Hamiltonian therefore gives us a more rigorous description of the topology in the physical system.For instance, in photonic systems, this approach can directly incorporate the radiative processes overlooked in the literature by using the non-Hermitian line-gap extension of the spectral localizer [44].Instead of using the Hermitian localizer [Eq.27], the non-Hermitian spectral localizer for classifying 2D non-Hermitian (lossy) systems is now written as and the local topological marker at position (x, y) and angular frequency ω is obtained from where sig R denotes the matrix's difference between its number of positive and negative eigenvalues with respect to their real part.Additionally, the localizer gap becomes Notably, ω can be complex in the lossy system and can include the damping term for calculating the local markers.However, by using the line-gap extension of the spectral localizer for 2D class A systems, the imaginary part of ω should not matter in the calculation of the topology [44].Finally, it is emphasized here that the matrices for constructing the spectral localizer can be readily obtained from COMSOL once the Eigenvalue Solver study has been run, regardless of the module used: the matrices M, C, K, Null, and Nullf for determining H eff,c and the spatial position (. . ., x j , . ..) of the extended mesh nodes can be directly accessed from the COMSOL functions in MATLAB [65].The spectral FEM-localizer framework can therefore be immediately applied to the wealth of examples and designs considered by the COMSOL community.

IV. EXAMPLE OF 2D PHOTONIC CHERN STRUCTURES
As an initial demonstration of the versatility of the spectral FEM-localizer framework, we consider two fundamental examples in topological photonics [Fig.3]: a 2D Haldane photonic crystal heterostructure [25] that is the canonical photonic Chern insulator, and a 2D photonic quasicrystal [66] that is an aperiodic system where topological band theory cannot be applied.In both cases, the photonic system is first described by the full-wave Helmholtz equation (using the Wave Optics module) and then discretized using FEM via COMSOL Multiphysics.Finally, the spectral FEM-localizer is constructed from the Eigenvalue Solver study and used to classify the systems' topology.

A. 2D Photonic Chern crystal
For a first example, we focus on the 2D Haldane photonic heterostructure [25] shown in Fig. 3(a).Here, the Haldane heterostructure is made of two triangular lattices of lattice constant a = 1 µm with perfect electric conductor (PEC) boundary conditions, and we are considering the topology of the transverse magnetic modes (H z ̸ = 0).The inner lattice is a topologically nontrivial insulator composed of dielectric rods, εjj = 14 for j = x, y, z, with radius r = 0.37a embedded in a gyro-electric background, εjj = 1, εxy = −0.4i, to break time-reversal symmetry.The outer lattice is a topological trivial insulator composed of air rods, εjj = 1, of radius r = 0.35a in a dielectric background with εjj = 5.5.The spectral FEM-localizer and local Chern marker in Eq. ( 27) and Eq. ( 28), respectively, can be used to diagnose the topology of this lossless 2D system.However, one should note that the eliminated effective Hamiltonian H eff,c is non-Hermitian due to the projection onto the eliminated space.Nevertheless, the non-Hermitian part is found to be negligible and only the Hermitian part is kept in H eff,c as Hermitian materials and lossless boundary conditions have been used.The spectrum of the spectral FEM-localizer σ( L(x,y0,ω0) ) and the local Chern number C L (x,y0,ω0) along the path depicted by the green line in Fig. 3(a) at y 0 = 0 and frequency ω 0 = 0.37[2πc/a] are shown in Fig. 3(b), demonstrating the local topological picture of the heterostructure.As expected from topological band theory, inside the topological band gap at around ω 0 = 0.37[2πc/a], the inner lattice is topological with C L = 1 while the outer lattice is trivial with C L = 0. Therefore, the spectral FEM-localizer correctly captures the change of topology as demonstrated by the eigenvalue crossing with respect to zero of the spectrum of L near the heterostructure's interface.

B. 2D Photonic Chern quasicrystal
As a second example, we investigate the topology of a magnetooptic 2D photonic quasicrystal surrounded by a homogeneous material, again for transverse magnetic modes (H z ̸ = 0).Notably, this example cannot be classified using topological band theory as the system is not periodic and therefore does not possess a band structure.Moreover, the quasicrystal is surrounded by a homogeneous material that is gapless rather than gapped (or insulating), yielding an ill-defined notion of bulk topological invariant and topological robustness.The topological quasicrystal is constructed from a Penrose tiling [67] where dielectric rods are positioned on the vertices of the tiling [66], as shown in Fig. 3(c).The photonic quasicrystal is composed of dielectric rods with permittivity εjj = 14 and radius r = 0.13 µm, embedded in a gyro-electric background, εjj = 1, εxy = −0.4i to break time-reversal symmetry, and PEC boundary conditions are used.Similar to the crystalline example, the spectral FEMlocalizer and local marker in Eq. ( 27) and Eq. ( 28) are used to probe the topology of this photonic system once the non-Hermitian part is removed from the eliminated effective Hamiltonian H eff,c .Figure 3(d) shows the spectrum of the FEM-localizer and the local Chern number as the probe location is varied, revealing the topology despite the system's aperiodicity and the lack of a surrounding insulator.In particular, there is a crossing of the spectrum of the localizer near the boundary of the structural interface, and thus a change of the local Chern number as the probe coordinate is moved from the trivial homogeneous material to the center of the quasicrystal along the green line depicted in Fig. 3(c), and at ω 0 = 0.37[2πc/a].A similar plot for the spectrum of the spectral localizer and the local Chern number can be realized along the frequency axis, as shown in the Supplemental Material [68], demonstrating some range of frequencies ω for which the quasicrystal is topologically non-trivial.As such, this example highlights how the spectral FEM-localizer is capable to identify the topology of the system without the need of a bandstructure or a bulk band gap.

V. PHOTONIC CHERN SLAB
Photonic structures are inherently 3D, and as such the 2D photonic designs extensively studied in the literature and described in the previous section are only approximations to actual photonic slabs realized experimentally.While there are standard methods for developing 3D photonic crystal slabs whose resonance band structures are quantitatively similar to the band structures of 2D photonic crystals [69], these methods only approximate the Hermitian portion of the band structure, not the radiative portion.Moreover, approximating radiative losses due to a system's environment as material absorption within the system is uncontrolled, as this is fundamentally relocating degrees of freedom that were outside of a structure to be inside of it.Indeed, this is a particularly problematic approximation for topological systems, whose primary features are boundary-localized statesrelocating degrees of freedom changes what it means for a state or resonance to be localized.Therefore, outof-plane radiative losses, an inherent aspect of photonic slabs, have been neglected in previous theoretical treatments of topological photonics, as the radiative loss cannot be accounted for using a band theoretic approach.Nevertheless, as we have already seen in the case of the quasicrystal, the spectral FEM-localizer allows to diagnose the topology beyond the scope of topological band theory.Here, we show that the spectral FEM-localizer can be used to classify the topology of photonic crystal slabs and directly incorporate out-of-plane radiative losses using radiative boundary conditions.
As an example illustrating the probing of the topology in photonic slab while accounting for the out-of-plane radiative loss, we consider a free-standing photonic crystal slab embedded in air, as shown in Fig. 4(a).This is the 3D slab version of the Haldane photonic heterostructure studied in Fig. 3(a), with PEC on the x-and yboundaries and a radiative boundary condition implemented through perfectly matched layers (PML) on the z-boundaries.The parameters used are the same as in the Chern heterostructure example [Fig.3(a)] except that now the background is a slab of thickness t = 0.5a embedded in air, and the rods have the same finite height t = 0.5a.
As the system is 3D and in class A in the Altland-Zirnbauer classification [30][31][32][33], the topology for the 2D topological edge state in the slab can be classified using an integer invariant such as the Chern number.Within the spectral localizer framework, the topology is diagnosed by squeezing the z-direction into a single value (i.e., all mesh vertices are retained, but their coordinates is reduced (x, y, z) → (x, y)), performing a version of dimensional reduction to enable the calculation of a strong 2D invariant of a 3D system.Physically, this is equivalent as looking at the change of topology as we move in the (x, y)-plane, irrespective of the z-coordinate.Despite the squeezing of the z-direction, all the information from the 3D geometry, including the out-of-plane radiative loss, is retained for the assessment of the topology as the effective Hamiltonian H eff,c is derived from the full 3D geometry.Thus, the 2D non-Hermitian FEM-localizer in Eq. 29 can be used to identify the topology in the slab with radiative boundary conditions, giving an accurate probing of the topology in the photonic slab where all the possible processes are accounted for.
The topology is studied by looking at the spectrum of the spectral FEM-localizer σ( L(NH) (x,y0,ω0) ) along the green path in Fig. 4 .However, the topological protection given by the localizer gap now takes into account the radiative losses of the topological edge slab state, and as such the protection is weaker than would be predicted from the 2D band structure.

VI. CONCLUSION
In conclusion, using the operator-based approach of the spectral localizer, we have developed a general framework for studying the topology in realistic photonic structures directly from the discretized master equations of the system using finite-element methods (FEM).In particular, we studied the topology in photonic systems derived directly from the full-wave Maxwell equations.Using the photonic Chern insulators and the photonic Chern quasicrystal, we have demonstrated the ability of the proposed spectral FEM-localizer framework to correctly capture the local topology in photonic topological materials.
Moreover, the framework have been applied to a photonic Chern slab predicting genuine topological protection of the topological edge slab state when taking into account possible radiative loss of the slab state.Looking forward, we expect that the spectral FEM-localizer's ability to classify the topology of photonic systems will be useful for developing next-generation devices, and we anticipate the generality of the framework to be of practical use for tackling topological problems in other complex physical platforms such as in acoustic systems [70], plasmonic systems [62,71,72], and in polaritonic systems [73][74][75].
FIG. 1.Gapless environment for photonic crystal slabs.(a) Schematic of a free-standing photonic crystal slab in a three-dimensional (3D) geometry.Photonic structures are inherently 3D and are usually surrounded by an homogeneous material that features a light cone.As such, out-ofplane radiative losses, depicted by the red arrows, are inherent to such structures.The photonic crystal is a triangular lattice with lattice constant a = 1 µm composed of dielectric rods, εjj = 14 for j = x, y, z, of radius r = 0.37a and height t = 0.5a embedded in a gyro-electric material slab, εjj = 1 and εxy = −0.4i, of thickness t = 0.5a.(b) Band structure of the photonic crystal slab in (a) over the first Brillouin zone, for a transverse magnetic-like polarization.The photonic band gap at around ω = 0.42[2πc/a] is the "topological band gap" known from extrapolation from the two-dimensional photonic crystal approximation.The shaded region depicts those frequencies and wavevectors that are at, or above, the light line of the surrounding air.The red line depicts the light line, ω = c|k|.Above the light line, photonic crystal slabs generally exhibit resonances, not bound states.

FIG. 2 .
FIG. 2. Position coordinate of the degrees of freedom used for constructing the position matrices within the finite-element method discretization.(a) Schematic of the discretization into finite elements of the two-dimensional (2D) simulation domain composed of a single dielectric rod (red shaded region) at the center of a triangular unit cell.(b)Zoom-in of (a) where the mesh nodes and extended mesh nodes are depicted using blue and green markers, respectively.In this context, the 2D structure is solved for transverse magnetic polarization (Hz ̸ = 0) and the shape function used are the curl elements.The position of the extended mesh nodes corresponding to the unknown weighting coefficient En are located at (xn, yn).
(a) at y 0 = 0, and at the (incomplete) band gap around ω 0 = 0.37[2πc/a], as shown in Fig. 4(b).The plot demonstrates a net crossing in the spectrum with respect to zero [see red arrow in Fig. 4(b)], indicating a change of topology near the boundary between the outer and inner lattices, similar to what is observed in Figs.3(a)-(b)