Introduction

Wavefront shaping using metasurfaces has attracted significant scientific and technological interest in recent years1,2,3,4,5,6. The ability to control many degrees of freedom of an incoming beam, including phase, amplitude, polarization, and dispersion has led to a number of demonstrations in areas ranging from imaging, polarization optics, communications, atom trapping, optical computing and image processing, nonlinear optics and others7,8,9,10,11,12,13,14,15,16. This versatility stems from a large design space enabled by engineering meta-atoms with different geometrical shapes and materials readily available in nano-fabrication, which allows tapping into different mechanisms such as Mie scattering, waveguide propagation phase, Pancharatnam-Berry phase, guided mode resonances, and more broadly Bloch-mode engineering17,18. Despite successful demonstrations, designing metasurfaces is still a significant challenge due to the complex nature of such physical mechanisms, particularly when sub-wavelength and often non-periodic arrangement leads to strong non-local coupling between meta-atoms5,6,19,20,21.

The most common design approach is based on libraries of meta-atoms (Fig. 1a), using either parametrized shapes or free-form meta-atoms3,7,22,23,24,25,26. The simplicity of this method relies on the assumption that each meta-atom is placed on a unit cell with periodic boundary conditions, allowing fast computation of its response using numerical methods. Metagratings, metalenses and more complex devices have been created using libraries. However, except for truly periodic arrays, this assumption is necessarily broken in real devices and pillar-to-pillar interaction imposes a fundamental limitation to performance by perturbing the realized phase and intensity profile, making it difficult to achieve high efficiency in general. Another limitation of the library method is that the unit cell response is computed for a specific angle of incidence, typically normal, and for a specific polarization. In general, however, an incoming beam may contain a spectrum of incidence angles, as is the case even for a simple metalens illuminated with non-collimated light, and in more general holograms used for vector beam generation, spatial mode multiplexing and many others.

Fig. 1: Metasurface design methodologies.
figure 1

In the library method (a), the phase and amplitude response of pre-determined meta-atoms is calculated as a function of its parameters (e.g. diameter for a circular pillar). The response is then used to create devices by dividing the surface in unit cells, each containing a specific element of the library. In topology optimization (b), the design domain is typically initialized with a randomized refractive index distribution, and the adjoint algorithm is used to converge towards a final binarized geometry. In shape optimization (c), only smooth variations in existing geometrical features are allowed

To overcome these challenges, topology optimization based on the adjoint method has been proposed18,27,28,29,30. In this approach, an initial random refractive index distribution iteratively converges to a final binary, i.e. manufacturable, structure (Fig. 1b). Rigorous electromagnetic simulation of the full device ensures that the interaction between meta-structures is fully considered. Furthermore, the adjoint formulation enables computing gradients of a given figure of merit with respect to the refractive index at every pixel in the domain using only two electromagnetic simulations (forward and adjoint simulations), critical for optimization problems with such high dimensionality. Despite successful designs with very high efficiencies, controlling the complexity of the final structure is a significant challenge, particularly for large scale manufacturing. During the optimization process, the device structure evolves according to the topological derivative at each iteration, and often leads to features that are difficult to control in patterning and etching processes, such as the appearance of sharp boundaries and small features such as islands of materials, small holes and small gaps between structures. These challenges have stimulated recent research to incorporate manufacturing robustness in the design process6,27,30,31, either external to the adjoint formulation such as applying structural blurring every so often during optimization, or including penalty terms in the figure of merit to guide the topological derivative in a way to minimize these issues.

The adjoint formulation can also be used to extract gradients of the figure of merit with respect to boundary shifts at the interface between two materials. In this case, the topology of the structure is unchanged during the optimization, and only deformations of the existing boundaries occur (Fig. 1c). This approach has been applied to optimize the shape of planar photonic devices, such as waveguide splitters, crossing and bends in photonic crystal waveguides32,33,34. Leveraging boundary gradients for metasurface design has had limited investigation, with only a few examples where the basic meta-atom shape remained unchanged but their sizes were optimized. This was applied to design metalenses by optmizing the side lengths of rectangular pillars35,36, the radii of circular pillars37, as well as to design metagratings where the semi-axis of elliptical pillars were optimized38,39,40. In this paper, we generalize this approach and investigate a shape optimization method that achieves efficiencies higher than the library method by fully considering pillar-to-pillar interaction, while providing greater control over the structure complexity compared to topology optimization. The initial shape of each meta-atom in the device is smoothly deformed throughout the process, with the shape complexity controlled through a Fourier decomposition of the adjoint boundary gradients. Direct control of all boundaries naturally incorporates fabrication constraints such as minimum feature size and minimum gap, and by construction, excludes the appearance of holes. Similarly to topology optimization, shape optimization can be applied to any kind of metasurface devices, can handle any input and target field distributions, as well as include multiple objectives. The paper is organized as follows: we first outline the formulation, and then apply the shape optimization method to design several high efficiency metagratings and metalenses. Experimental results are presented next, followed by discussion and conclusions.

Results

Shape optimization formulation

Topology and shape optimization in photonics are both inverse design techniques based on the adjoint method27,28. A flowchart of the shape optimization method is shown in Fig. 2. The design domain is initialized with a given set of meta-atoms, for example using a uniform array of circular pillars, a library based device, or even a random distribution of pillars. At each iteration, two electromagnetic simulations are performed, a forward and an adjoint simulation, from which shape gradients for all pillars are computed for a given figure of merit. If at any iteration the figure of merit of the device reaches a desired target or if it converges to a local maxima, the optimization stops. Otherwise, the gradients are used to update the shapes and continue on to the next iteration. Before updating the shapes, the gradients are first decomposed in Fourier basis and further fabrication constraints can be implemented.

Fig. 2: Flow chart of the optimization process.
figure 2

The design domain is initialized with a given set of meta-atoms, for example with a library-based metasurface. Forward and adjoint simulations are performed and the figure of merit computed. If the figure of merit satisfies the target or if it has converged the optimization stops. If not, the shifting boundary gradients are calculated from the simulated fields, followed by Fourier decomposition and possibly additional fabrication constraints. The shape is then deformed according to the gradients and a new simulation is performed. The process repeats until convergence

The mathematical formulation of the adjoint shape gradient and subsequent Fourier decomposition is outlined here, and more details can be found in the Supplementary Information (which also includes a summary of the algorithm). As illustrated in Fig. 3a, in the forward simulation the incident field propagates through the metasurface, while in the adjoint simulation the target field propagates backwards. In this example, the forward field is simply a plane wave incident at normal direction, and the target field is a plane wave propagating at a certain deflection angle. Through a reciprocity argument41, the forward (E) and adjoint (Ea) fields at the surface of each pillar can be used to compute variations in the figure of merit (η) due to an arbitrary (but small) boundary shift u⊥:

$$\delta \eta =\frac{\omega \delta \epsilon }{2P}Re\left[j{F}^{* }\int\,{u}_{\perp }\left({E}_{\parallel }\cdot {E}_{a,\parallel }+\frac{1}{{\epsilon }_{1}{\epsilon }_{2}}{D}_{\perp }\cdot {D}_{a,\perp }\right)\,da\right]$$
(1)

where ω is the optical frequency, δϵ = ϵ2 − ϵ1 is the difference in dielectric permittivity between the meta-atom and the surrounding medium, and P is a normalization power. The subscripts ∥ and ⊥ are used respectively to represent fields parallel or normal to the surface (F is related to the device efficiency, η = ∣F∣2). The integration in equation (1) is performed on every pillar’s surface. Since we wish to retain vertical pillars for top-down fabrication, we enforce the boundary displacement u⊥ to be uniform along z, and allow only variation along the cross-sectional boundary. With that, we can explicitly write the efficiency change as an integral along the pillar closed cross-sectional boundary as:

$$\delta \eta =\frac{\omega \delta \epsilon }{2P}\oint {u}_{\perp }g\,ds$$
(2)

where the gradient function g is then defined accordingly by integrating along z the remaining term involving the forward and adjoint fields:

$$g=Re\left[j{F}^{* }\int\left({E}_{\parallel }\cdot {E}_{a,\parallel }+\frac{1}{{\epsilon }_{1}{\epsilon }_{2}}{D}_{\perp }\cdot {D}_{a,\perp }\right)\,dz\right]$$
(3)
Fig. 3: Details of the shape optimization algorithm.
figure 3

The forward and adjoint fields are computed in the design domain, and are then used to calculate a gradient function g on the surface of all existing meta-atoms. a, b Show the fields and the derived boundary gradients for TM and TE polarizations. The gradient function determines the magnitude and direction that each point on the surface must be displaced to increase the device efficiency. In (c), the resulting shape gradient is plotted (blue) along with its Fourier decomposition (black) for the pillar highlighted in (b). One can observe that the gradient containts significant contributions up to order m = 6

From the expression of δη in equation (2), it is clear that the efficiency change is always positive if we choose the boundary deformation u⊥ to follow the gradient function g, i.e., by choosing u⊥ = hsign(δϵ)g, where h is a scaling factor. Mathematically, this is simply the projection of the gradient function on itself, as the integral represents the inner product in the closed boundary domain. The term \(({E}_{\parallel }\cdot {E}_{a,\parallel }+\frac{1}{{\epsilon }_{1}{\epsilon }_{2}}{D}_{\perp }\cdot {D}_{a,\perp })\) in equation (3) explicitly determines how the forward and adjoint fields determine the shape gradient u⊥. This term is plotted on the pillars’ surface in Fig. 3b, with an arbitrary −1 to 1 color scale. There are several aspects worth discussing. First, clearly some pillars tend to increase in size (red colors) while others tend to shrink (blue colors), creating a size gradient that eventually will form the desired metagrating. Second, the gradients are not symmetric along the circular boundary, indicating that the shapes will tend to deviate from simple circles. Physically, this asymmetry arises from the field discontinuities at regions where the linearly polarized incident field is normal to the pillar surface. Finally, as a consequence of the last point, TE and TM polarizations create different gradients, and tend to deform the pillars differently. This is quite clearly seen in the second pillar from the left, where the gradients seem somewhat rotated by 90 deg. This difference in gradients means that it is more challenging to optimize a structure to simultaneously diffract both TE and TM polarizations with high efficiencies. This argument can be extended to problems with multiple objectives, for example optimizing a multi-wavelength device, where each wavelength tends to create different forward and adjoint field distributions, and therefore different shape gradients.

The gradients discussed in Fig. 3b continuously deform the shape at each iteration. As discussed, it is essential for manufacturability that certain constraints are observed. The deformation function u⊥ = g may in general be very complicated, leading to complex shapes after many iterations. Since we are dealing with a closed boundary, any function can be expanded in terms of an appropriate basis defined in such domain. We chose Fourier as it easily allows restriction to smooth round structures. Decomposing the gradient function g in a Fourier series, the boundary displacement is expressed as:

$${u}_{\perp }=h\,{\rm{sign}}(\delta \epsilon )\left(\frac{{a}_{0}}{2}+\mathop{\sum }\limits_{m=1}^{\infty }{a}_{m}\cos m\theta +{b}_{m}\sin m\theta \right)$$
(4)

where (am, bm) are the expansion coefficients. With that, the efficiency variation in equation (2) is then written as:

$$\delta \eta =\frac{\omega \delta \epsilon }{4P}\,h\,{s}_{t}\,{\rm{sign}}(\delta \epsilon )\left[\frac{{a}_{0}^{2}}{2}+\mathop{\sum }\limits_{m=1}^{\infty }({a}_{m}^{2}+{b}_{m}^{2})\right]$$
(5)

where st is the total boundary length of a given meta-atom. Note that because we use a set of orthogonal basis (Fourier in this example), each coefficient appears squared in the brackets. This means that each term of the expansion independently contributes to increasing the metasurface efficiency. We can freely choose to drop certain coefficients and still, the remaining ones will always push the efficiency upwards (or remain unchanged if a local optimum has been reached, but never reduce the efficiency). For example, one might choose to keep only the zero-order (m = 0) coefficient, ensuring that the pillars remain circular throughout the optimization process (of course their diameters are allowed to change). Controlling the Fourier order m gives explicit control of the trade-off between performance and complexity at every iteration. To illustrate this point, we show in Fig. 3c the shape gradient and its decomposition for one of the pillars (highlighted in Fig. 3b). As one can see, restricting to zero-order m = 0 simply increases the pillar diameter. Adding the first-order term m = 1 introduces a shift in the center position of the pillar, while the second-order m = 2 creates a certain ellipticity. Finally, adding up to the sixth m = 6 order is sufficient to closely represent the full gradient function for this particular case. In the numerical examples presented in the next section, we show various devices designed with different Fourier orders, illustrating the ability control the device complexity. We also note that the Fourier decomposition of u⊥ doesn’t necessarily limit the structures to convex shapes. Large Fourier coefficients can lead to non-convex shapes as well as small but iterative deformations.

Another important constraint for fabrication is to ensure that the gap between particles is not too small, which can severely intensify the issue of gap-dependent etch rate, leading to under- or over-etching regions and sidewall angle variations. In the shape optimization method, at every iteration we have the explicit boundary coordinates ri before deformation and ri+1 = ri + u⊥ni after deformation, where ni is the normal unit vector at a given point on the boundary. In the simplest form, we can limit the scaling factor h so that the deformed boundary always respects a target gap to the unit cell boundary. Finally, it is also important to limit the minimum feature size to avoid challenges with patterning, etching and pillars falling over, and again, this becomes straightforward given direct knowledge of the boundary coordinates.

Numerical simulations

To illustrate the method, we applied shape optimization to design several metagratings and metalenses at 1.55 μm operating wavelength, all based on 1 μm tall amorphous silicon (aSi) pillars on a glass substrate. In every example discussed here, we imposed minimum gap between pillars of 90 nm and minimum feature size of 80 nm. Furthermore, we targeted polarization insensitive operation and therefore simultaneously optimized for TE and TM incident polarizations. In the first example, a meta-grating was designed to deflect light at 51°. The initial structure was created based on the library approach, and contains 4 circular pillars, each on a 500 nm unit cell. In the library method, the pillars’ diameters are chosen so that they impart a phase profile with steps of 2π/N (N = 4 in this example). The phase imparted by the first unit cell is, however, arbitrary, as different values simply represent different global phases. One can therefore freely choose the diameter of the first pillar as long as subsequent diameters correspond to a 2π/N phase shift. Despite nominally imparting equivalent phase profiles, these meta-gratings with different pillar sizes exhibit distinct non-local interaction, and may perform very differently. This is exactly the case observed here for the 51°, in which certain choices of the first pillar diameter create a resonance that severely reduces the first order diffraction efficiency for TE light. We applied shape optimization to two metagratings differing only by the choice of the first pillar diameter, one exhibiting low efficiency due to the appearance of a resonance for TE, and another with the highest efficiency for this library (which was found after sweeping the first pillar diameter for all values available in the library from 100 nm to 410 nm).

The initial library design for the resonant metagrating has first order diffraction efficiency of only about 30% for TE polarization (see iteration = 0 in Fig. 4a), while it is as high as 85% for TM polarization. Such low performance for TE cannot be predicted from the performance of the individual meta-atoms, as all values of pillar diameters in the library are highly transmissive (above 80%), and of course their response is polarization independent by symmetry. We then applied shape optimization and observed that the performance is significantly improved as shown in Fig. 4a. The solid and dashed curves represent separate optimizations with different Fourier orders. The enhancement was observed either when the Fourier order is restricted to m = 0 (dashed lines, final geometry in upper inset) or when we allowed up to m = 6 (solid lines, final geometry in lower inset). Note that in both cases, at the beginning of the optimization over the first few iterations, the improvement in TE polarization comes at the expense of the TM efficiency. This initial degradation in the TM efficiency could not be recovered with the m = 0 case, demonstrating a clear limitation in restricting the shapes to circles. With higher Fourier orders, eventually the TM efficiency recovers leading to a device with efficiencies of 82% and 84% for TE and TM, respectively. Despite allowing higher Fourier order, the final shapes are still smooth and respect the gap and minimum feature constraints. In the second case shown in Fig. 4b, the initial structure was the highest average TE/TM efficiency obtained with this library. Despite that, the initial efficiency of 76% for TE was still significantly improved to 85%, with no degradation on the TM efficiency (which actually slightly improved from 88% to 90%). This example illustrates that the shape optimization can be used to eliminate resonances that are not possible to predict from the library alone, as well as to push the performance beyond the highest achievable with such library. Degradation in efficiency due to non-local effects is not specific to this 51° metagrating, and was observed in other deflection angles from 10 to 70 degrees, in some cases TE and in other cases for TM polarizations. Furthermore, a choice of initial diameter that leads to relatively good performance for one deflection angle is not necessarily the best choice for another angle, illustrating another challenge of relying solely on the library approach. We designed various other metagratings using shape optimzation from angles varying between 10 and 70 degrees, with the final efficiencies and shapes shown in Fig. 4c. For example, the 70 degrees metagrating showed average TE/TM efficiency of 74%.

Fig. 4: Optimization of a dual-polarization 51-degree beam deflector.
figure 4

Shape optimization was applied to two library designs differing only by the choice of the first pillar diameter: in (a), the initial design exhibits low efficiency due to the appearance of a resonance for TE polarization while in (b) the initial structure exhibited the highest efficiency possible for such library. The curves show the evolution of the absolute efficiency at each iteration, where dashed curves represent restricting the gradient function to m = 0 Fourier order (i.e. maintaining circular shape), while solid line allows up to m = 6. The final structures for both Fourier orders are shown in the insets. In (c), shape optimization was applied to design meta-gratings from 0 to 70 degrees (final geometries shown as insets). The color legend on top of the figure applies to all plots

As mentioned, the shape optimization method is not limited to metagratings and can be applied to any general metasurface. To illustrate this, we designed a metalens operating at 1.55 μm and the results are shown in Fig. 5. The optimization domain was again initialized with a structure based on a library of aSi circular pillars on a glass substrate. The library unit cell is 500 nm and the pillars range from 100 to 410 nm in diameter, with height of 1 μm. The lens was designed to impart a phase transformation \(\phi =k(\sqrt{{r}^{2}+{f}^{2}}-f)\) with focus of 5.3 μm over a total diameter of 2r = 23 μm, nominally resulting in a numerical aperture of NA = sin[tan−1(r/f)] = 0.92. However, the lens was illuminated with a Gaussian beam with waist radius w = 5.2 μm, which focused at f = 5.3 μm limits the NA of the system to approximately NA = 0.83. We optimized two metalenses that differ only by a global phase, represented by the diameter of the innermost pillars of d = 250 nm and d = 300 nm. As can be seen on Fig. 5a, these nominally equivalent metalenses have different efficiencies of 75% and 81% (values at iteration 0), respectively. Shape optimization was applied with Fourier decomposition up to m = 6, and again with minimum gap of 90 nm and minimum feature of 80 nm. Given the circular symmetry of the device, we only simulated one-quarter of the structure, and only one polarization (TE). Polarization insensitivity is enforced by computing the gradient for TM polarization from the TE gradient rotated by 90 deg. The optimization results in Fig. 5a show that the efficiency is substantially improved for both initial structures, reaching 88% and 90%.

Fig. 5: Shape optimization of a high NA metalens.
figure 5

Evolution of the absolute efficiency for two different initial structures is shown in (a); cuts of the z-component of the Poynting vector in the xz plane in (b) and in the xy plane in (c). The color scale shown in (c) also applies for (b). The full metalens structure is shown in (d), and a zoomed region at the metalens center before and after shape optimization is shown in (e)

These results reinforce two aspects already observed for metagratings: first, shape optimization can improve the efficiency of library structures, regardless of the specific initial choice. This is not to say that every choice leads to the same final efficiency though (as is clear in Fig. 5a). Second, the efficiency is improved beyond what could be achieved with such library. Figure 5b shows cuts of the z-component of Poynting vector in the xz plane (z being the propagation direction), starting at z = 0 (base of the pillars) and in the free-space region (above the 1 μm pillar height) with very little undesired diffraction observed. The beam at the focus plane is shown in Fig. 5c. The full metalens structure for the d = 300 nm case is shown Fig. 5d, e shows a zoomed region at the metalens center before and after shape optimization. As can be seen, all features have smooth boundaries, the minimum feature size is approximately 130 nm, and respecting the 80 nm minimum gap. As outlined in the Supplementary Information, all values reported here represent the absolute efficiency, defined as the projection of the output field onto the target field divided by the power incident on the metasurface.

Fabrication and characterization

To validate the method, various metagratings were fabricated and characterized experimentally. The samples were fabricated using a conventional top-down approach, allowing for high-throughput and reproducibility. Choosing amorphous silicon as the nanopillars’ material allows for low losses and high contrast refractive index across the telecommunications c-band. The metasurfaces were fabricated on a 500 μm thick fused silica wafer, coated with 1 μm aSi using PECVD. An adhesive layer (HDMS) is spun on the wafer to promote adhesion of the negative e-beam resist (ma-N 2400) and the latter is then baked and coated with a charging dissipating solution (e-spacer). The nanopillars pattern is then exposed using e-beam lithography and developed in AZ 726 developer, while the e-spacer layer is removed in water. Exploiting a RIE (SPTS Rapier) technique, with simultaneous injection of etcher (SF6) and passivation (C4F8) gases in the chamber, the pattern is transferred onto the a-Si, using the resist as etching mask. The residual resist is then removed with oxygen plasma asher (Matrix Plasma Asher). After fabrication, the samples were characterized using a tuneable laser to measure the diffraction efficiency over a wide spectral range for both TE and TM polarizations. All values reported here represent the absolute diffraction efficiencies, defined as the ratio between the output power in the first order diffraction and the power incident on the metasurface, exactly how it is defined in the simulations (often in the literature, relative diffraction efficiencies are reported, and some times, even absolute efficiencies values don’t properly consider Fresnel reflections at the glass-air interface). A detailed description of the experimental setup and procedure is provided in the Supplementary Information.

Figure 6a and b show the simulated and experimental spectral responses for the resonant 51° metagrating design from Fig. 4a. We only show the TE polarization as the efficiency for TM is relatively flat in this wavelength region. The initial library design (in blue) exhibits a clear resonance at 1.55 μm. In the experiment, this resonance was slightly red-shifted to 1.58 μm, which we attribute to small variations in the fabrication parameters such as refractive index, small sidewall angle and pillar sizes. For the sake of comparison between experiment and simulations, all efficiencies were then measured at the resonance wavelength, as indicated by the solid dots in the figures. In both, simulations and experiments, the shape optimized metagratings exhibited improved efficiencies. Comparing their spectra, we observe that shape optimization improves the diffraction efficiency by shifting the resonance away from the design wavelength. Furthermore, one can see that the shape optimization induces a tilt in the spectrum and the efficiency at the design wavelength, to the right of the resonance, is further increased. Remarkably, these spectral signatures, shift and tilt, are clearly observed in the experimental results in Fig. 6b. A comparison of the efficiencies predicted in simulations and observed experimentally is shown in Fig. 6c for both TE and TM, with reasonably good agreement. It is also remarkable that the experimental results show the trade-off predicted in the TE-TM efficiency for the two different Fourier orders: simple circles (m = 0) increase the TE at the expense of TM while m = 6 breaks this trade-off.

Fig. 6: Comparison between simulation and measurement for the resonant 51-degree beam deflector.
figure 6

Simulated (a) and measured (b) TE spectral responses. Different colors show the first order diffraction efficiency for the initial and shape optimized designs with Fourier order m = 0 and m = 6 (the color legend applies to both (a) and (b) plots). A scanning electron microscope image of the fabricated structures for m = 6 is shown in the inset (scale bar is 200 nm). In (c), the efficiency at the design wavelength is plotted for TE and TM polarizations

We also fabricated the non-resonant 51° meta-grating design from Fig. 4b, and the results for TE are shown in Fig. 7. As mentioned, this was the highest efficiency obtained with this library and one can see that differently from the previous case, it pushed away the resonance approximately 34 nm above the design wavelength. Again the spectrum is slightly shifted in the experiment, and therefore all measurements were shifted accordingly. Differently than in the previous resonant case, the shape optimization now does not lead to significant shifts in the resonance, and mostly push the spectrum upwards at the design wavelength. The experimental results exhibit the same behavior as predicted in simulations, and a quantitative comparison in the efficiencies is shown in Fig. 7c. Similarly to the resonant case, here we also observe that the higher Fourier order m = 6 exhibits high efficiency for both TE and TM, reaching about 83% and 84% absolute efficiencies (higher than both the library design and the m = 0 device).

Fig. 7: Comparison between simulation and measurement for the non-resonant 51-degree beam deflector.
figure 7

Simulated (a) and measured (b) TE spectral responses. Different colors show the first order diffraction efficiency for the initial and shape optimized designs with Fourier order m = 0 and m = 6 (the color legend applies to both (a) and (b) plots). A scanning electron microscope image of the fabricated structures for m = 6 is shown in the inset (scale bar is 300 nm). In (c), the efficiency at the design wavelength is plotted for TE and TM polarizations

Finally, we then designed and fabricated a 70° metagrating, showing broadband and polarization insensitive operation. The spectral efficiencies for the initial library design and for the shape optimized metagratings are shown in Fig. 8 in dashed and solid lines, respectively. The experimental results in (b) reproduce qualitatively the simulations in (a), with measured peak efficiency close to 70%. The shape optimized meta-gratings with Fourier order m = 6 exhibit a relatively flat spectrum centered at 1.55 μm, with substantially higher efficiencies than the library for both TE and TM. A quantitative comparison between the simulation and experimental efficiencies is shown in Fig. 8c.

Fig. 8: Comparison between simulation and measurement for the broadband 70-degree beam deflector.
figure 8

Simulated (a) and measured (b) spectral responses for both TE and TM polarizations. Different colors show the first order diffraction efficiency for the initial and shape optimized designs with Fourier order m = 6 (the color legend applies to both (a) and (b) plots). A scanning electron microscope image of the fabricated structure is shown in the inset (scale bar is 200 nm). In (c), the efficiency at the design wavelength is plotted for TE and TM polarizations

Discussion

The shape optimization method discussed in this paper presents an alternative to conventional library approach in metasurface design and to the more general topology optimization. As discussed, despite being simple and computationally fast, the library method falls short in many aspects, most notably by not capturing non-local coupling effects and not being amenable to general waveform incidences. Our results demonstrate that library structures exhibiting low efficiency due to the aforementioned limitations can be substantially improved with shape optimization. We show results where a resonant library structure with only 30% TE efficiency was enhanced to 82%, while still maintaining high TM efficiency at 84%, smooth boundaries and respecting minimum features size and minimum gaps. Furthermore, we showed that even the highest efficiency library is also significantly improved going from 76% to 85% for TE, while maintaining high efficiency for TM at 90%, and again respecting fabrication constraints. The general shape optimization explores more degrees of freedom than parametrized structures, and it is not therefore surprising that it leads to higher efficiencies. For example, parametrized aSi elliptical pillars were used to design 50 deg gratings at 900 nm wavelength and obtained absolute efficiency of 64% for a single polarization40. Comparatively, shape optimization leads to TE and TM efficiency of 85% and 90%. Using rectangular pillars, a metalens with 0.78 numerical aperture operating at 850 nm was designed using parametrized rectangular aSi pillars, and obtained efficiency of 78% (no minimum feature size or gap constraints). In contrast, shape optimized metalens with slightly higher NA of 0.83 resulted in efficiency of 90%, including fabrication constraints.

Compared to topology optimization, shape optimization explores a reduced design space. In topology, the output structure can contain many more detailed features, and it most likely leads to higher overall efficiencies than shape optimization. For example, topology optimized gratings showed theoretical efficiencies for a 70 degrees deflection angle around 96% (average TE/TM)18. Comparatively, shape optimization obtained lower values of 74% average TE/TM as shown in Fig. 4c. However, as discussed such topology optimized structures are more difficult to fabricate than shape optimized structures. Another topology optimized metagrating at 75 degrees deflection angle that was actually fabricated showed experimental efficiencies of 74% and 75%, for TE and TM, respectively18. The definition of efficiency here was the power in the deflected beam normalized to the power transmitted through the bare silicon dioxide substrate. This definition differs from ours in the sense that we compute efficiency as the power in the deflected beam normalized by the power incident on the metasurface. The difference is the Fresnel reflection, which if adjusted brings the measured values to 71% and 72%. Comparatively, the measured efficiencies for the 70 degrees shape optimized structures from Fig. 8 were on a similar level at 70%.

The shape optimization algorithm was demonstrated here for two objective functions, i.e., TE and TM polarization, but it can be easily extended to more objectives such as multiple wavelengths or multiple angles of incidence etc. It can also be extended to more complex structures such as bi-layer or multi-height metasurfaces42,43. Moreover, although the focus of our work is on dielectric metasurfaces as they tend to result in higher transmissions than metallic ones, the adjoint optimization method can be applied to any general permittivity44. As a final note, the computational cost of this optimization method is expensive, as it requires solving Maxwell equations for both forward and adjoint fields. In our optimization, we used a commercial finite-element solver in the frequency domain. Multi-wavelength optimization can greatly benefit from finite-difference time domain solvers, as the fields for all wavelengths can be obtained from only one forward and one adjoint simulations. Finally, combining this approach with GPU-accelerated FDTD can greatly speed up solving the fields37,45. In general, the adjoint formulation tends to converge to a local optimum, with different initial conditions converging to different local optima, as was illustrated in the examples discussed here. Coupling the optimization method with parallelization is therefore beneficial to allow many starting geometries to be explored efficiently.

In summary, we presented a general shape optimization method that enables optimization of high efficiency metasurfaces. Coupled with a Fourier decomposition of the boundary gradient, the method enables high performance devices while providing greater control over the structure complexity and rigorously enforcing minimum feature size and minimum gaps. Various metagratings and metalenses were simulated, with experimental results validating the expected efficiencies. We believe these results provide a path towards manufacturability of inverse-designed high efficiency metasurfaces.