A JAX framework for the finite-difference time-domain (FDTD) method for solving Maxwell's equations with a focus on inverse design of photonic devices.
Project description
FDTDX: Electromagnetic Simulations in JAX
FDTDX is an efficient open-source Python package for the simulation and design of three-dimensional photonic nanostructures using the Finite-Difference Time-Domain (FDTD) method. Built on JAX, it provides native GPU support and automatic differentiation capabilities, making it ideal for large-scale design tasks.
Key Features
The key features differentiating FDTDX from other simulation software packages like Meep (which is also great!) are the following:
- High Performance: GPU-accelerated FDTD simulations with multi-GPU scaling capabilities
- Memory Efficient: Leverages time-reversibility in Maxwell's equations for efficient gradient computation
- Automatic Differentiation: Built-in gradient-based optimization for complex 3D structures
- User-Friendly API: Intuitive positioning and sizing of objects in absolute or relative coordinates
- Large-Scale Design: Capable of handling simulations with billions of grid cells
- Open Source: Freely available for research, development and commercial use.
Documentation
Visit our documentation for:
- Detailed API reference
- Tutorial guides
- Best practices
Also check out our whitepaper for some examples and a comparison to other popular FDTD-frameworks.
Installation
Install FDTDX using pip:
pip install fdtdx # Basic CPU-Installation
pip install fdtdx[cuda12] # GPU-Acceleration (Highly Recommended!)
pip install fdtdx[rocm] # AMD-GPU (only python<=3.12)
For development installation, see the contributing guidelines!
Multi-GPU
# The following lines often lead to better memory usage in JAX
# when using multiple GPU.
export XLA_PYTHON_CLIENT_ALLOCATOR="platform"
export XLA_PYTHON_CLIENT_PREALLOCATE="false"
export NCCL_LL128_BUFFSIZE="-2"
export NCCL_LL_BUFFSIZE="-2"
export NCCL_PROTO="SIMPLE,LL,LL128"
Citation
If you find this repository helpful for you work, please consider citing:
@article{Mahlau2026,
doi = {10.21105/joss.08912},
url = {https://doi.org/10.21105/joss.08912},
year = {2026},
publisher = {The Open Journal},
volume = {11},
number = {117},
pages = {8912},
author = {Mahlau, Yannik and Schubert, Frederik and Berg, Lukas and Rosenhahn, Bodo},
title = {FDTDX: High-Performance Open-Source FDTD Simulation with Automatic Differentiation},
journal = {Journal of Open Source Software}
}
Acknowedgement
This project was developed at the Institute of Information Processing at Leibniz University Hannover, Germany and sponsored by the cluster of excellence PhoenixD (Photonics, Optics, Engineering, Innovation across Disciplines).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fdtdx-0.6.1.tar.gz.
File metadata
- Download URL: fdtdx-0.6.1.tar.gz
- Upload date:
- Size: 729.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e586c24b7df3b9b3cebfb875909944f8bc881f5f6a51564963ace905d9497c68
|
|
| MD5 |
1f6ba32e80933b88f58e9a8352ad59ee
|
|
| BLAKE2b-256 |
1b689de148bdb99d904d21504fd761ffea3bd5e2b0cd35abcb87127ec92e8a4a
|
Provenance
The following attestation bundles were made for fdtdx-0.6.1.tar.gz:
Publisher:
publish.yml on ymahlau/fdtdx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fdtdx-0.6.1.tar.gz -
Subject digest:
e586c24b7df3b9b3cebfb875909944f8bc881f5f6a51564963ace905d9497c68 - Sigstore transparency entry: 1202831306
- Sigstore integration time:
-
Permalink:
ymahlau/fdtdx@a9ec76acc17f21712df7d69c123d9678feddba33 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/ymahlau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9ec76acc17f21712df7d69c123d9678feddba33 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fdtdx-0.6.1-py3-none-any.whl.
File metadata
- Download URL: fdtdx-0.6.1-py3-none-any.whl
- Upload date:
- Size: 188.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
577d56659cf320206439fd2a60ce8def764be25e292420b8287db13b2cde5ba6
|
|
| MD5 |
12c3d9e5843eba3d28b5d4048b31b6eb
|
|
| BLAKE2b-256 |
5c6b54d283add9d6e966e5d439c5388ec0a7b85fe550fb442cb4f01fc01fcbc0
|
Provenance
The following attestation bundles were made for fdtdx-0.6.1-py3-none-any.whl:
Publisher:
publish.yml on ymahlau/fdtdx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fdtdx-0.6.1-py3-none-any.whl -
Subject digest:
577d56659cf320206439fd2a60ce8def764be25e292420b8287db13b2cde5ba6 - Sigstore transparency entry: 1202831310
- Sigstore integration time:
-
Permalink:
ymahlau/fdtdx@a9ec76acc17f21712df7d69c123d9678feddba33 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/ymahlau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9ec76acc17f21712df7d69c123d9678feddba33 -
Trigger Event:
release
-
Statement type: