## Abstract

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.

### Similar content being viewed by others

## Introduction

Originally discovered in the context of electronic systems, the concept of topological insulators has been generalized to photonic structures thanks to the platform-independent 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 next-generation 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 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 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-of-plane 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. As a significant portion of photonic topological insulators are metasurfaces, the proposed classification method will benefit to the characterization of topological metasurfaces where topological boundary modes are used to control radiation, scattering, and emission^{27,28,29,30,31}. 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.

## Results

### 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^{32,33}. 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^{34}.

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^{35}, 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}_{j}^{({{{\rm{AL}}}})}\) 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^{35,36,37,38}, 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 \({\Gamma }_{j}^{{\dagger} }={\Gamma }_{j}\), \({\Gamma }_{j}^{2}=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

*κ*~ 2

*g*/

*L*

^{39,40,41}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,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53}.

Using results from the study of *C**-algebras^{26,39,43}, 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^{35,36,37,38}) 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* − *x**I*), (*Y* − *y**I*), and Hamiltonian (*H* − *E**I*) 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}_{(x,y,E)}^{{{{\rm{L}}}}}\,\ne\, 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 \({\mu }_{({x}_{1},\ldots ,{x}_{d},E)}^{{{{\rm{C}}}}}=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 (\({\mu }_{({x}_{1},\ldots ,{x}_{d},E)}^{{{{\rm{C}}}}}\,\ne\, 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^{54,55,56,57,58,59,60,61,62,63,64}. However, it is the only currently known theory of topology that preserves system sparsity, i.e., if *H* is sparse, \({L}_{({x}_{1},\ldots ,{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^{65,66}.

### 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,42,44,46,47,48,49,50,51,52,53} 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 localizer framework, no further approximation is required beyond the discretization of the master equation, yielding a potentially more accurate description of a system’s topology.

#### 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**(

**) and**

*x***(**

*H***) are the electric and magnetic fields, and \(\bar{\epsilon }({{{\boldsymbol{x}}}})\) and \(\bar{\mu }({{{\boldsymbol{x}}}})\) are the permittivity and permeability tensors. Previously, the spectral localizer framework has been applied to describe the topology of 2D photonic crystals**

*x*^{40,41,45}. These prior studies took advantage of finite-difference discretizations of Maxwell equations [Eqs. (6) and (7)] to automatically satisfy the divergence-free condition [Eqs. (8) and (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^{67} 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**(

**), derived from Eqs. (6)–(9)**

*x*as the master equation to probe the topology in photonic systems.

#### 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 ** α**(

**) and by evaluating the overlap integral over the simulation region Ω. The weak form for the master equation Eq. (10) is then**

*x*The solution vector, ** E**(

**) for Eq. (10), is decomposed in terms of the shape functions**

*x*

*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^{68} can be chosen as shape functions. These curl elements inherently satisfy the divergence condition [Eqs. (9) and (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 matrix-form

where \({{{\boldsymbol{\Psi }}}}={(\ldots ,{E}_{n},\ldots )}^{{{{\rm{T}}}}}\) is the solution vector, the electric field ** E**(

**), at frequency**

*x**ω*. The magnetic field

**(**

*H***) can then be derived using Eq. (6). Notably,**

*x**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.

#### 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 COMSOL MULTIPHYSICS^{69} 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 COMSOL, 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) and (15), *H*_{eff} is a matrix-valued function

where \(\omega \in {\mathbb{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) and (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) and (15). Equations (14) and (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}_{F}^{{{{\rm{T}}}}}\), 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}(*ω*).

#### 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}={{{\mbox{Nullf}}}}^{T}({X}_{j}-{x}_{j}I){{\mbox{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^{49}. 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 \({{{\mbox{sig}}}}_{{\mathbb{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^{49}.

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^{70}. The spectral FEM-localizer framework can therefore be immediately applied to the wealth of examples and designs considered by the COMSOL community.

### 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: a 2D Haldane photonic crystal heterostructure^{25} that is the canonical photonic Chern insulator [Fig. 3], and a 2D photonic quasicrystal^{71} that is an aperiodic system where topological band theory cannot be applied [Fig. 4]. 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.

#### 2D Photonic Chern crystal

For a first example, we focus on the 2D Haldane photonic heterostructure^{25} shown in Fig. 3a. Here, the Haldane heterostructure is made of two triangular lattices of lattice constant *a* 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 non-trivial insulator composed of dielectric rods, \({\bar{\epsilon }}_{jj}=14\) for *j* = *x*, *y*, *z*, with radius *r* = 0.37*a* embedded in a gyro-electric background, \({\bar{\epsilon }}_{jj}=1,{\bar{\epsilon }}_{xy}=-0.4i\), to break time-reversal symmetry. The outer lattice is a topological trivial insulator composed of air rods, \({\bar{\epsilon }}_{jj}=1\), of radius *r* = 0.35*a* in a dielectric background with \({\bar{\epsilon }}_{jj}=5.5\). The interface between the two topological distinct lattices yields a topological edge state that can be seen in the ribbon band structure [Fig. 3b] and from the local density of states at *ω*_{0} = 0.37[2*π**c*/*a*] [Fig. 3d].

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 \(\sigma ({\hat{L}}_{(x,{y}_{0},{\omega }_{0})})\) and the local Chern number \({C}_{(x,{y}_{0},{\omega }_{0})}^{{{{\rm{L}}}}}\) along the path depicted by the green line in Fig. 3a at *y*_{0} = 0 and frequency *ω*_{0} = 0.37[2*π**c*/*a*] are shown in Fig. 3c, 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.

#### 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^{72}, with the rhombuses having sides of length *a* and where the dielectric rods are positioned on the vertices of the tiling^{71}, as shown in Fig. 4a. The photonic quasicrystal is composed of dielectric rods with permittivity \({\bar{\epsilon }}_{jj}=14\) and radius *r* = 0.18*a*, embedded in a gyro-electric background, \({\bar{\epsilon }}_{jj}=1,{\bar{\epsilon }}_{xy}=-0.4i\) to break time-reversal symmetry, and PEC boundary conditions are used. In this quasicrystal heterostructure [Fig. 4a], the identification of any edge state resonances via the local density of states [Fig. 4f] is obscured by the presence of the bulk states present in the homogeneous material surrounding the quasicrystal. Instead, the edge states can be identified from the local density of states only when the surrounding homogeneous material is truncated, as shown Fig. 4c and d. The edge and bulk spectra of the photonic quasicrystal [Fig. 4b] can also be obtained using, respectively, PEC and (continuous) periodic boundary conditions in a polygonal geometry to simulate the photonic system both with and without boundaries (see Supplemental Material).

Similar to the crystalline example, the spectral FEM-localizer 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 4e shows the spectrum of the FEM-localizer \(\sigma ({\hat{L}}_{(x,{y}_{0},{\omega }_{0})})\) and the local Chern number \({C}_{(x,{y}_{0},{\omega }_{0})}^{{{{\rm{L}}}}}\) 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. 4a, and at *ω*_{0} = 0.37[2*π**c*/*a*]. The location where the local index changes, associated to a vanishing localizer gap, is also an indication of the location of the topological edge state [Eq. 4], which cannot be resolved from the system’s local density of states [Fig. 4f]. 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, 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 band structure or a bulk band gap, and how the location of the topological edge states can be explicitly determined from the vanishing of the localizer gap.

### 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^{73}, 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 states—relocating degrees of freedom changes what it means for a state or resonance to be localized. Therefore, out-of-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. 5a. This is the 3D slab version of the Haldane photonic heterostructure studied in Fig. 3a, with PEC on the *x*- and *y*-boundaries 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. 3a] except that now the background is a slab of thickness *t* = 0.5*a* embedded in air, and the rods have the same finite height *t* = 0.5*a*. The topological edge state can be seen in the ribbon band structure [Fig. 5b] and from the local density of states at *z* = 0 and at *ω*_{0} = 0.42[2*π**c*/*a*] [Fig. 5d].

As the system is 3D and in class A in the Altland-Zirnbauer classification^{35,36,37,38}, 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 disregarding the *z*-direction (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 removal 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. In other words, even though the system is 3D, Eqs. (29) and (30) can still be used— the *X*_{c}, *Y*_{c}*,* and *H*_{eff,c} matrices all contain information about the full 3D system, and the Chern number does not depend on the position matrix *Z* or the *z*-coordinates. This is because the 2D Chern number is still a strong topological invariant in a 3D system; and calculating it using *X*_{c} and *Y*_{c} means we are looking at edge states around the boundary in the (*x*, *y*)-plane. 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 \(\sigma ({\hat{L}}_{(x,{y}_{0},{\omega }_{0})}^{(NH)})\) along the green path in Fig. 5a at *y*_{0} = 0, and at the (incomplete) band gap around *ω*_{0} = 0.42[2*π**c*/*a*], as shown in Fig. 5b. The plot demonstrates a net crossing in the spectrum with respect to zero [see red arrow in Fig. 5b], indicating a change of the signature of the spectral FEM-localizer [Eq. (30)], hence a change of topology, near the boundary between the outer and inner lattices, similar to what is observed in Fig. 3c. 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.

## Discussion

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. As the radiative feature of optical systems play a significant role for a broad range of photonics applications, we expect that the spectral FEM-localizer’s ability to classify the topology of photonic systems will be useful for developing next-generation devices, including topological metasurfaces which uses topological boundary modes to control radiation, scattering and emission^{27,28,29,30,31}. Looking forward, we anticipate the generality of the framework to be of practical use for systems in any of the ten Altland-Zirnbauer symmetry classes^{35,36,37,38} as well as in topological crystalline insulators^{41,45}, and for tackling topological problems in other complex physical platforms such as in acoustic systems^{74}, plasmonic systems^{67,75,76}, and in polaritonic systems^{77,78,79}.

## Code availability

The code that support the findings of this study are available from the corresponding author upon reasonable request.

## References

Ozawa, T. et al. Topological photonics.

*Rev. Mod. Phys.***91**, 015006 (2019).Wang, Z., Chong, Y., Joannopoulos, J. D. & Soljačić, M. Observation of unidirectional backscattering-immune topological electromagnetic states.

*Nature***461**, 772–775 (2009).Bahari, B. et al. Nonreciprocal lasing in topological cavities of arbitrary geometries.

*Science***358**, 636–640 (2017).He, L. et al. Floquet Chern insulators of light.

*Nat. Commun.***10**, 4194 (2019).Hafezi, M., Demler, E. A., Lukin, M. D. & Taylor, J. M. Robust optical delay lines with topological protection.

*Nat. Phys.***7**, 907–912 (2011).Hafezi, M., Mittal, S., Fan, J., Migdall, A. & Taylor, J. M. Imaging topological edge states in silicon photonics.

*Nat. Photonics***7**, 1001–1005 (2013).Rechtsman, M. C. et al. Photonic Floquet topological insulators.

*Nature***496**, 196–200 (2013).Yuan, L., Xu, S. & Fan, S. Achieving nonreciprocal unidirectional single-photon quantum transport using the photonic Aharonov–Bohm effect.

*Opt. Lett.***40**, 5140–5143 (2015).Lustig, E. et al. Photonic topological insulator in synthetic dimensions.

*Nature***567**, 356–360 (2019).Dutt, A. et al. Experimental band structure spectroscopy along a synthetic dimension.

*Nat. Commun.***10**, 3122 (2019).Dutt, A. et al. A single photonic cavity with two independent physical synthetic dimensions.

*Science***367**, 59–64 (2020).Wu, L.-H. & Hu, X. Scheme for achieving a topological photonic crystal by using dielectric material.

*Phys. Rev. Lett.***114**, 223901 (2015).Parappurath, N., Alpeggiani, F., Kuipers, L. & Verhagen, E. Direct observation of topological edge states in silicon photonic crystals: spin, dispersion, and chiral routing.

*Sci. Adv.***6**, eaaw4137 (2020).Xue, H., Yang, Y. & Zhang, B. Topological valley photonics: physics and device applications.

*Adv. Photonics Res.***2**, 2100013 (2021).Ma, T. & Shvets, G. All-Si valley-Hall photonic topological insulator.

*N. J. Phys.***18**, 025012 (2016).Wong, S., Saba, M., Hess, O. & Oh, S. S. Gapless unidirectional photonic transport using all-dielectric kagome lattices.

*Phys. Rev. Res.***2**, 012011 (2020).Ota, Y. et al. Active topological photonics.

*Nanophotonics***9**, 547–567 (2020).Kim, M., Jacob, Z. & Rho, J. Recent advances in 2D, 3D and higher-order topological photonics.

*Light Sci. Appl.***9**, 130 (2020).Kruk, S. S. et al. Nonlinear imaging of nanoscale topological corner states.

*Nano Lett.***21**, 4592–4597 (2021).Hasan, M. Z. & Kane, C. L. Colloquium: Topological insulators.

*Rev. Mod. Phys.***82**, 3045–3067 (2010).Chiu, C.-K., Teo, J. C., Schnyder, A. P. & Ryu, S. Classification of topological quantum matter with symmetries.

*Rev. Mod. Phys.***88**, 035005 (2016).Poo, Y., Wu, R.-X., Lin, Z., Yang, Y. & Chan, C. T. Experimental realization of self-guiding unidirectional electromagnetic edge states.

*Phys. Rev. Lett.***106**, 093903 (2011).Cheng, X. et al. Robust reconfigurable electromagnetic pathways within a photonic topological insulator.

*Nat. Mater.***15**, 542–548 (2016).Rylander, T., Ingelström, P. & Bondeson, A.

*Computational Electromagnetics*(Springer, 2013).Haldane, F. D. M. & Raghu, S. Possible realization of directional optical waveguides in photonic crystals with broken time-reversal symmetry.

*Phys. Rev. Lett.***100**, 013904 (2008).Loring, T. A. K-Theory and pseudospectra for topological insulators.

*Ann. Phys.***356**, 383–416 (2015).Vakulenko, A. et al. Adiabatic topological photonic interfaces.

*Nat. Commun.***14**, 4629 (2023).Barik, S. et al. A topological quantum optics interface.

*Science***359**, 666–668 (2018).Yang, L., Li, G., Gao, X. & Lu, L. Topological-cavity surface-emitting laser.

*Nat. Photonics***16**, 279–283 (2022).Gorlach, M. A. et al. Far-field probing of leaky topological states in all-dielectric metasurfaces.

*Nat. Commun.***9**, 909 (2018).Lee, K. Y., Yoon, S., Song, S. H. & Yoon, J. W. Topological beaming of light.

*Sci. Adv.***8**, eadd8349 (2022).Klitzing, K. V., Dorda, G. & Pepper, M. New method for high-accuracy determination of the fine-structure constant based on quantized Hall resistance.

*Phys. Rev. Lett.***45**, 494–497 (1980).Kane, C. L. & Mele, E. J. Quantum spin Hall effect in graphene.

*Phys. Rev. Lett.***95**, 226801 (2005).Bradlyn, B. et al. Topological quantum chemistry.

*Nature***547**, 298–305 (2017).Kitaev, A., Lebedev, V. & Feigel’man, M. Periodic table for topological insulators and superconductors. In

*AIP Conference Proceedings*, Vol. 1134, 22–30 (AIP, 2009).Altland, A. & Zirnbauer, M. R. Nonstandard symmetry classes in mesoscopic normal-superconducting hybrid structures.

*Phys. Rev. B***55**, 1142–1161 (1997).Schnyder, A. P., Ryu, S., Furusaki, A. & Ludwig, A. W. W. Classification of topological insulators and superconductors in three spatial dimensions.

*Phys. Rev. B***78**, 195125 (2008).Ryu, S., Schnyder, A. P., Furusaki, A. & Ludwig, A. W. W. Topological insulators and superconductors: tenfold way and dimensional hierarchy.

*N. J. Phys.***12**, 065010 (2010).Loring, T. & Schulz-Baldes, H. The spectral localizer for even index pairings.

*J. Noncommut. Geom.***14**, 1–23 (2020).Dixon, K. Y., Loring, T. A. & Cerjan, A. Classifying topology in photonic heterostructures with gapless environments.

*Phys. Rev. Lett.***131**, 213801 (2023).Cerjan, A., Loring, T. A. & Schulz-Baldes, H. Local markers for crystalline topology.

*Phys. Rev. Lett.***132**, 073803 (2024).Fulga, I. C., Pikulin, D. I. & Loring, T. A. Aperiodic weak topological superconductors.

*Phys. Rev. Lett.***116**, 1–6 (2016).Loring, T. A. & Schulz-Baldes, H. Finite volume calculation of K-theory invariants.

*N. Y. J. Math.***23**, 1111–1140 (2017).Cerjan, A. & Loring, T. A. Local invariants identify topology in metals and gapless systems.

*Phys. Rev. B***106**, 064109 (2022).Cerjan, A. & Loring, T. A. An operator-based approach to topological photonics.

*Nanophotonics***11**, 4765–4780 (2022).Liu, H., Fulga, C., Bergholtz, E. J. & Asboth, J. Topological fine structure of an energy band. Preprint at https://arxiv.org/abs/2312.08436 (2023).

Franca, S. & Grushin, A. G. Topological zero-modes of the spectral localizer of trivial metals.

*Phys. Rev. B***109**, 195107 (2024).Franca, S. & Grushin, A. G. Topological diffusive metal in amorphous transition metal monosilicides.

*Phys. Rev. Mater.***8**, 21201 (2024).Cerjan, A., Koekenbier, L. & Schulz-Baldes, H. Spectral localizer for line-gapped non-hermitian systems.

*J. Math. Phys.*https://doi.org/10.1063/5.0150995 (2023).Cheng, W. et al. Revealing topology in metals using experimental protocols inspired by K-theory.

*Nat. Commun.***14**, 3071 (2023).Wong, S., Loring, T. A. & Cerjan, A. Probing topology in nonlinear topological materials using numerical K-theory.

*Phys. Rev. B***108**, 195142 (2023).Chadha, N., Moghaddam, A. G., van den Brink, J. & Fulga, C. Real-space topological localizer index to fully characterize the dislocation skin effect.

*Phys. Rev. B***109**, 035425 (2024).Ochkan, K. et al. Non-Hermitian topology in a multi-terminal quantum Hall device.

*Nat. Phys.*https://doi.org/10.1038/s41567-023-02337-4 (2024).Kitaev, A. Anyons in an exactly solved model and beyond.

*Ann. Phys.***321**, 2–111 (2006).Bianco, R. & Resta, R. Mapping topological order in coordinate space.

*Phys. Rev. B***84**, 241106 (2011).Fulga, I. C., Hassler, F. & Akhmerov, A. R. Scattering theory of topological insulators and superconductors.

*Phys. Rev. B***85**, 165409 (2012).Mitchell, N. P., Nash, L. M., Hexner, D., Turner, A. M. & Irvine, W. T. M. Amorphous topological insulators constructed from random point sets.

*Nat. Phys.***14**, 380–385 (2018).Varjas, D., Fruchart, M., Akhmerov, A. R. & Perez-Piskunow, P. M. Computation of topological phase diagram of disordered \({{{{\rm{Pb}}}}}_{1-x}{{{{\rm{Sn}}}}}_{x}{{{\rm{Te}}}}\) using the kernel polynomial method.

*Phys. Rev. Res.***2**, 013229 (2020).Prodan, E. Disordered topological insulators: a non-commutative geometry perspective.

*J. Phys. A: Math. Theor.***44**, 113001 (2011).Caio, M. D., Möller, G., Cooper, N. R. & Bhaseen, M. J. Topological marker currents in Chern insulators.

*Nat. Phys.***15**, 257–261 (2019).Mondragon-Shem, I. & Hughes, T. L. Robust topological invariants of topological crystalline phases in the presence of impurities. Preprint at https://arxiv.org/abs/1906.11847 (2019).

Hannukainen, J. D., Martínez, M. F., Bardarson, J. H. & Kvorning, T. K. Local topological markers in odd spatial dimensions and their application to amorphous topological matter.

*Phys. Rev. Lett.***129**, 277601 (2022).Muñoz-Segovia, D. et al. Structural spillage: An efficient method to identify noncrystalline topological materials.

*Phys. Rev. Res.***5**, L042011 (2023).Kim, S.-W., Jeon, S., Park, M. J. & Kim, Y. Replica higher-order topology of Hofstadter butterflies in twisted bilayer graphene.

*npj Comput. Mater.***9**, 1–9 (2023).Sylvester, J. XIX. A demonstration of the theorem that every homogeneous quadratic polynomial is reducible by real orthogonal substitutions to the form of a sum of positive and negative squares.

*Lond., Edinb., Dublin Philos. Mag. J. Sci.***4**, 138–142 (1852).Higham, N. J. Sylvester’s influence on applied mathematics.

*Math. Today***50**, 202–206 (2014).Raman, A. & Fan, S. Photonic band structure of dispersive metamaterials formulated as a Hermitian eigenvalue problem.

*Phys. Rev. Lett.***104**, 1–4 (2010).Nedelec, J. C. Mixed finite elements in R3.

*Numer. Math.***35**, 315–341 (1980).COMSOL Multiphysics® v. 6.1. COMSOL AB, Stockholm, Sweden. www.comsol.com.

The MathWorks Inc. (2022). MATLAB version: 9.13.0 (R2022b).

Zhang, Y. et al. Chiral photonic topological states in Penrose quasicrystals.

*Opt. Lett.***48**, 2229 (2023).de Bruijn, N. Algebraic theory of Penrose’s non-periodic tilings of the plane. I.

*Indag. Math.***84**, 39–52 (1981).Joannopoulos, J. D., Johnson, S. G., Winn, J. N. & Meade, R. D.

*Photonic Crystals: Molding the Flow of Light*(Princeton University Press, 2011).Ma, G., Xiao, M. & Chan, C. T. Topological phases in acoustic and mechanical systems.

*Nat. Rev. Phys.***1**, 281–294 (2019).Pocock, S. R., Xiao, X., Huidobro, P. A. & Giannini, V. Topological plasmonic chain with retardation and radiative effects.

*ACS Photonics***5**, 2271–2279 (2018).Proctor, M. et al. Near- and far-field excitation of topological plasmonic metasurfaces.

*Photonics***7**, 81 (2020).Karzig, T., Bardyn, C. E., Lindner, N. H. & Refael, G. Topological polaritons.

*Phys. Rev. X***5**, 1–10 (2015).Klembt, S. et al. Exciton-polariton topological insulator.

*Nature***562**, 552–556 (2018).Septembre, I. et al. Design of a room-temperature topological exciton-polariton laser in a ZnO/TiO

_{2}photonic crystal slab.*Phys. Rev. B***107**, 1–10 (2023).

## Acknowledgements

We acknowledge discussions with L. Zhang and O. Miller. S.W. acknowledges support from the Laboratory Directed Research and Development program at Sandia National Laboratories. T.A.L. acknowledges support from the National Science Foundation, Grant No. DMS-2110398. A.C. acknowledges support from the U.S. Department of Energy, Office of Basic Energy Sciences, Division of Materials Sciences and Engineering. This work was performed in part at the Center for Integrated Nanotechnologies, an Office of Science User Facility operated for the U.S. Department of Energy (DOE) Office of Science. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International, Inc., for the U.S. DOE’s National Nuclear Security Administration under Contract No. DE-NA-0003525. The views expressed in the article do not necessarily represent the views of the U.S. DOE or the United States Government.

## Author information

### Authors and Affiliations

### Contributions

S.W. derived and developed the theoretical framework and numerical algorithms, and performed the simulations. S.W. and A.C. developed the project idea and wrote the manuscript. All authors reviewed the manuscript and analyzed results. A.C. and T.A.L. supervised the project.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Additional information

**Publisher’s note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Wong, S., Loring, T.A. & Cerjan, A. Classifying topology in photonic crystal slabs with radiative environments.
*npj Nanophoton.* **1**, 19 (2024). https://doi.org/10.1038/s44310-024-00021-w

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s44310-024-00021-w