---
title: Port-mode to dipole finite-Q 4D Adam
---

# Port-mode to central-dipole finite-Q 4D Adam

**Status:** `running_port_dipole_4d_adam` · **Adam steps:** 38 ·
**ideal fidelity:** 0.545274 ·
**objective:** -0.606466

**Last realized tape:** 1.866 ps · **final energy/peak:** 9.06e-12 · **convergence stop:** True

This campaign injects one fixed, directional fundamental-TE mode from
the left feedthrough and observes the complete electric vector at a central
y-polarized dipole. Only the 6,400 direct 25 nm cavity-density pixels move.
There is no source optimization, spatial filter, projection, binarization,
line search, trust region, or topology prior.

```{note}
Every displayed optimizer step is exactly one adaptive forward/adjoint pair.
The red stop marker and runtime history show the trajectory actually executed.
```

## Fixed physical target

| quantity | fixed value |
|---|---:|
| cavity Q | 10,000 |
| normalized mode volume | 1.000 |
| physical mode volume | 0.074950 µm³ |
| ideal Purcell factor | 759.909 |
| beta assumption | 1.0 |
| field-amplitude lifetime | 7.857 ps |
| pulse spectral width | 1.000 THz |
| source-off gate | 1.666 ps |
| minimum streaming observation | 0.200 ps |
| earliest safe stop | 1.866 ps |
| hard simulation ceiling | 40.000 ps |
| energy convergence | current / cumulative peak ≤ 1.0% |
| sustained convergence hold | 8 optical periods |
| reverse checkpoints | 48 |
| Adam learning rate | 1.0e-02 |

The ideal trace is the exact discrete response of a (Q=10^4) one-pole cavity
to the delayed Gaussian mode pulse. It includes the prompt guide field during
loading and the source-free cavity ringdown. Its absolute amplitude is fixed
by the standard (Q/V) Purcell factor and beta one; it is never amplitude- or
phase-fitted to the simulation.

The tape length is selected independently on every step. The convergence latch
arms only once the actual Gaussian envelope has fallen below the configured
power cutoff and its worst-case propagation delay has cleared. One continuous
target-weighted field accumulator then observes 0.2 ps before stopping is
allowed. After that the tape ends when full-interior energy stays below 1% of
its cumulative peak for eight optical periods, or at the 40 ps safety ceiling.
This is the same checkpointed trajectory differentiated by the adjoint—there
is no pilot run, restart, or extra forward solve.

![Ideal and simulated dipole/energy response](../_static/generated/fryett_port_dipole_adam_response.png)

## Geometry and source

![Initial, evaluated, and differential geometry](../_static/generated/fryett_port_dipole_adam_geometry.png)

![Fixed feedthrough source mode](../_static/generated/fryett_port_dipole_adam_source.png)

![Late-window cavity fields](../_static/generated/fryett_port_dipole_adam_fields.png)

## Optimization history

![Normalized ideal-distance history](../_static/generated/fryett_port_dipole_adam_history.png)

The optimized distance is the equal geometric aggregation of three normalized
errors: the full vector dipole waveform, the absolute stored-energy trajectory
corresponding to the target mode volume, and the fraction of the six-component
4D field history not explained by one spatial mode carrying the target pole
coordinate. The latter is evaluated from streaming sufficient statistics over
one continuous source-free interval, not several arbitrary field windows. The
ideal fidelity is one only when all three agree.

{download}`Complete methodology <../_static/downloads/fryett/PORT_DIPOLE_4D_ADAM_METHOD.md>`
