flaport / inverse_design

https://flaport.github.io/inverse_design
Apache License 2.0
16 stars 5 forks source link

Potential features: Tidy3D backend? gdsfactory export? #14

Open jan-david-fischbach opened 1 year ago

jan-david-fischbach commented 1 year ago

Have you seen the Adjoint plugin in Tidy3D? Seems quite interesting to me as a alternative to ceviche, that also does 3D... @flaport do you think it might make sense to look into that? @joamatab should we also think about a way to easily export the resulting optimized geometry and simulation results (e.g. scattering parameters) to gdsfactory? Would you rather export the pixelized shape or a marching squares representation?

joamatab commented 1 year ago

Hi Jan-David,

it would be great to expand gdsfactory adjoint demos with this

For pixelized shape you can use https://github.com/gdsfactory/gdsfactory/blob/main/gdsfactory/read/from_np.py

@tylerflex @mrbaozi @momchil-flex @skandanC

tylerflex commented 1 year ago

Just a heads up, for handling pixelated shape in Tidy3D, best is to use our new CustomMedium component, introduced also in this pre-release.

There is a corresponding jax wrapper for this, which can be used for adjoint-based inverse design.

Note that in the first pre-release 1.9.0rc1, this is a bit slow with several thousand pixels. In 1.9.0rc2 coming out in the next few days or next week, we will introduce significant speed up which makes inverse design with tens of thousands of pixels or more possible.

Here is an example:

image
lucasgrjn commented 1 year ago

Just a heads up, for handling pixelated shape in Tidy3D, best is to use our new CustomMedium component, introduced also in this pre-release.

Really cool to see the new possibilites of Tidy3D ! :)

tylerflex commented 1 year ago

A lot more cool stuff coming soon! including many 3D inverse design demos.

lucasgrjn commented 1 year ago

Have you seen the Adjoint plugin in Tidy3D? Seems quite interesting to me as a alternative to ceviche, that also does 3D...

Actually, the most intersting on this point, will be to make a kind of "general optimizer". Then, the user can choose which simulator he would use (tidy3d, spins, ceviche, jaxwell, any other FDTD/FDFD...) and include it.

joamatab should we also think about a way to easily export the resulting optimized geometry and simulation results (e.g. scattering parameters) to gdsfactory? Would you rather export the pixelized shape or a marching squares representation?

For export, a possible way will be to export touches (or kind of) and the brush. Then, upon loading, the design can be generated using basic GDS shapes (circle or square) and some boolean operations (fusion). Another direction can be using some levelset methods.