Skip to content

Conversation

@mahlau-flex
Copy link

Added a notebook showcasing the new smoothed projection (see paper here: https://arxiv.org/pdf/2503.20189). This method is exempified with a waveguide crossing.

@mahlau-flex mahlau-flex force-pushed the FXC-4269-topology-optimization-for-waveguide-crossing-demonstrating-smoothed-projection branch 2 times, most recently from f6f2b1c to c0908ae Compare December 4, 2025 14:48
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Spell check passed successfully for 1 notebook(s).
Generated by GitHub Action run: https://github.com/flexcompute/tidy3d-notebooks/actions/runs/20057697264

@mahlau-flex mahlau-flex force-pushed the FXC-4269-topology-optimization-for-waveguide-crossing-demonstrating-smoothed-projection branch from c0908ae to 9fa0120 Compare December 4, 2025 16:46
@mahlau-flex
Copy link
Author

resolved spelling mistake

Copy link
Contributor

@yaugenst-flex yaugenst-flex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mahlau-flex this looks great overall! Just a few notes:

  • Could you add this to the notebook index here
  • The initial learning rate of 1 seems really high and you can also see the objective function dipping in the first iteration due to that. Have you tried with a lower learning rate?
  • I think we should more prominently cite the paper that the parametrization is from at the top.

@yaugenst-flex
Copy link
Contributor

@tomflexcompute @FilipeFcp could one of you have a look too?

@mahlau-flex mahlau-flex force-pushed the FXC-4269-topology-optimization-for-waveguide-crossing-demonstrating-smoothed-projection branch from 9fa0120 to 02527ad Compare December 5, 2025 13:42
@mahlau-flex
Copy link
Author

@yaugenst-flex I have incorporated your previous comments into the notebooks

@FilipeFcp
Copy link
Contributor

Thanks @mahlau-flex, this is a very nice example, very didactic!

I have just a few comments:

  • There is an image in the metadata, but it is not uploaded. It would also be good to insert it in the first markdown cell to stay consistent with the other examples.

  • Is it possible to remove the warning after the import cells?

  • It would be nice to include the legends in the final plot (I believe plt.legend() is enough).

  • That is personal, but I found the explanation before cell [7] a bit confusing. I think it could be more direct.

Very small nitpicks:

  • Docstring in cell 5: “as function” → “as a function”.

  • Before cell [14]: “initialize adam optimizer” → “initialize Adam optimizer”.

  • Cell [24]: “initial_waveguide_crossing” → “final_waveguide_crossing”.

  • This warning is a nice addition.

    Important note: we use autograd.numpy instead of regular numpy; this allows numpy functions to be differentiable. If one forgets this step, the error may be a bit opaque — just a heads up.

    I have assisted a few users who forgot this step. Maybe we should consider adding it to other ID notebooks as well.

On a separate note, @yaugenst-flex, can we remove these notes from the other ID notebooks?

“Note: native autograd support is an experimental feature in tidy3d 2.7. To see the original implementation of this notebook using jax and the adjoint plugin, refer to this notebook.”

@mahlau-flex mahlau-flex force-pushed the FXC-4269-topology-optimization-for-waveguide-crossing-demonstrating-smoothed-projection branch from 02527ad to 6cafda2 Compare December 9, 2025 08:45
@mahlau-flex
Copy link
Author

@FilipeFcp thanks for the feedback! I have incorporated your points into the notebook

@mahlau-flex mahlau-flex force-pushed the FXC-4269-topology-optimization-for-waveguide-crossing-demonstrating-smoothed-projection branch from 6cafda2 to 9c5db65 Compare December 9, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants