Skip to content

RCWA QNM inverse design

`rcwa-qnm-invdes` is a GPU-accelerated Fourier-modal (RCWA/AFMM) inverse-design backend for a symmetric dipole nanocavity coupled to left and right feedthrough waveguides.

The physical propagation direction is the waveguide axis, \(x\). Every \(x\)-slice is expanded in Fourier harmonics over the \(y-z\) cross-section with uniaxial PML in both transverse directions. This orientation makes the two waveguides native modal ports.

Model and optimization

The default device uses a centered z-oriented dipole near a 1.35 µm target wavelength, a silicon slab, and an 8 µm by 2 µm nanobeam envelope. The top and bottom 0.5 µm strips are fixed air, leaving a continuous 1 µm-wide freeform center connected to the feedthrough waveguides. Geometry symmetry is enforced about \(x=0\), \(y=0\), and \(z=0\).

The optimization workflow:

  1. maximizes fixed-frequency \(\log(\mathrm{LDOS})\) until a source-coupled pole is acquired;
  2. tracks the complex outgoing QNM pole;
  3. evaluates the LDOS at the real part of that pole;
  4. includes the implicit pole derivative in the density gradient; and
  5. enforces pole-frequency and left/right guided-beta constraints.

Quick start

```bash uv sync --extra test --extra plot --extra gpu uv run rcwa-qnm doctor uv run pytest -q uv run rcwa-qnm initialize configs/workstation.yaml --output artifacts/planned-workstation-initial uv run rcwa-qnm solve configs/tiny.yaml --output artifacts/tiny-solve uv run rcwa-qnm pole configs/tiny.yaml --output artifacts/tiny-pole uv run rcwa-qnm optimize configs/tiny.yaml --steps 4 --output artifacts/tiny-opt ```

The tiny configuration is an integration case, not a device claim. Independently converge Fourier order, slice thickness, cross-section sampling, PML, supercell dimensions, and the complex-pole tolerance before reporting \(Q\), effective volume, or beta.

The initialize command only materializes the deterministic step-zero density. It does not run an electromagnetic solve or begin the optimization.

Run dashboard

Open the dashboard for the latest published artifact summary. It is rebuilt from the JSON files below `artifacts/` whenever `./scripts/publish_site.sh` runs.