TorchGDM: A GPU-accelerated Python toolkit for multi-scale electromagnetic scattering with automatic differentiation
Sofia Ponomareva, Adelin Patoux, Clément Majorel, Antoine Azéma, Aurélien Cuche, Christian Girard, Arnaud Arbouet, Peter R. Wiecha
SciPost Phys. Codebases 60 (2025) · published 22 October 2025
- doi: 10.21468/SciPostPhysCodeb.60
- live repo (external)
- Submissions/Reports
-
This Publication is part of a bundle
When citing, cite all relevant items (e.g. for a Codebase, cite both the article and the release you used).
| DOI | Type | Published on | |
|---|---|---|---|
| 10.21468/SciPostPhysCodeb.60 | Article | 2025-10-22 | |
| 10.21468/SciPostPhysCodeb.60-r0.56 | Codebase release | 2025-10-22 |
Abstract
We present "torchGDM", a numerical framework for nano-optical simulations based on the Green's Dyadic Method (GDM). This toolkit combines a hybrid approach, allowing for both fully discretized nano-structures and structures approximated by sets of effective electric and magnetic dipoles. It supports simulations in three dimensions and for infinitely long, two-dimensional structures. This capability is particularly suited for multi-scale modeling, enabling accurate near-field calculations within or around a discretized structure embedded in a complex environment of scatterers represented by effective models. Importantly, torchGDM is entirely implemented in PyTorch, a well-optimized and GPU-enabled automatic differentiation framework. This allows for the efficient calculation of exact derivatives of any simulated observable with respect to various inputs, including positions, wavelengths or permittivity, but also intermediate parameters like Green's tensor components, which can be interesting for physics informed deep learning applications. We anticipate that this toolkit will be valuable for applications merging nano-photonics and machine learning, as well as for solving nano-photonic optimization and inverse problems, such as the global design and characterization of metasurfaces, where optical interactions between structures are critical.
Cited by 1
Authors / Affiliations: mappings to Contributors and Organizations
See all Organizations.- 1 2 3 4 Sofia Ponomareva,
- 3 5 6 Adelin Patoux,
- 3 5 6 Clément Majorel,
- 1 2 3 4 Antoine Azéma,
- 1 3 4 Aurélien Cuche,
- 1 3 4 Christian Girard,
- 3 7 8 Arnaud Arbouet,
- 2 3 4 Peter Wiecha
- 1 Centre d’Élaboration de Matériaux et d’Études Structurales / Centre d’Élaboration de Matériaux et d’Études Structurales [CEMES]
- 2 Laboratoire d'Analyse et d'Architecture des Systèmes / Laboratoire d'Analyse et d'Architecture des Systèmes [LAAS]
- 3 Centre National de la Recherche Scientifique / French National Centre for Scientific Research [CNRS]
- 4 Université de Toulouse / University of Toulouse
- 5 Centre de Recherche sur l'Hétéro-Epitaxie et ses Applications / Centre de Recherche sur l'Hétéro-Epitaxie et ses Applications
- 6 Université Côte d'Azur [UCA]
- 7 Université de Rennes / University of Rennes
- 8 東京大学 / University of Tokyo [UT]
