---
title: Four-dimensional shifted-ringdown Q/V campaign
---

# Four-dimensional shifted-ringdown Q/V campaign

```{admonition} Live optimizer
:class: tip

This is a new artifact and a new optimizer. It uses the same 8.0 µm Fryett
optimization region and Maxwell scene as the prior hybrid-scratch campaign,
but starts again from neutral material. The first objective is deliberately
pulse-on dominated because the initial structure has no useful ringdown. It
then transfers weight to the three source-off field states. A trustworthy
$Q\ge100$ pole triggers the eigenfrequency-shifted 4D $Q/V$ objective. No
output-mode or beta-factor term is present in this first attempt.
```

| State | Value |
|---|---:|
| Status | `running_shifted_4d_q_over_v` |
| Phase | `shifted_4d_q_over_v` |
| Active geometry coordinates | `full_domain_neutral_pixels` |
| Completed updates | 20 |
| Displayed field window | `shifted_pole_late` |
| Objective | 4.9964 |
| Pulse-on normalized LDOS | 2.1652 |
| Source-off local response | 0.0060772 |
| Temporal modal coherence | 1 |
| Rank-one fraction | 1 |
| Shifted stationarity | 0.5838 |
| Energy retention | 0.0078023 |
| Effective temporal rank | 1 |
| Q | 418.28 |
| Physical V | 0.12985 µm³ |
| Normalized V | 2.5399 |
| Q / normalized V | 164.69 |
| Pole wavelength | 0.74229 µm |
| Projection beta | 3.379 |
| Pulse-on / source-off weights | 0.706 / 0.294 |
| DCT x/y rolloff modes | 151 / 18 |
| DCT high-frequency floor | 0.952 |
| Trust step | 0.08000 |
| Boundary handoff | `waiting_for_binary_stable_topology` |
| Stable binary-topology states | 0 / 3 |
| Boundary step | 0.001 µm |
| Boundary topology | 18 material / 1 enclosed voids |
| Boundary chart rebases | 0 |
| Gray fraction (0.1–0.9) | 93.09% |
| Last candidate accepted | True |
| Last pole trustworthy | True |
| Latest update wall time | 139.4 s |
| Last artifact write | 2026-08-28 17:03:09 UTC |

The authoritative state is
`benchmarks/artifacts/invdes_fryett_4d_qv_qv4d_v2_mild_dct.npz`. “Current” means the accepted
geometry; the separately saved candidate is never substituted into the plots.

## Geometry and exact material difference

![Initial, accepted, and difference geometry](../_static/generated/fryett_4d_qv_geometry.png)

## Field used by the current objective

![Current windowed Ey field](../_static/generated/fryett_4d_qv_fields.png)

Before pole capture this is explicitly a pulse-on field. After capture it is
the final temporal-window state phase-corrected to the fitted pole.

## Temporal response and objective windows

![Pulse, emitter response, energy, and temporal windows](../_static/generated/fryett_4d_qv_temporal.png)

## Full-field temporal correlations

![Temporal Gram matrix and window energies](../_static/generated/fryett_4d_qv_gram.png)

## Objective and pole history

![Discovery, coherence, and shifted Q/V history](../_static/generated/fryett_4d_qv_history.png)

## Exact methodology, equations, and moving components

## Scope and hypothesis

This campaign tests one narrow hypothesis: a cavity optimizer that uses the
spatial field throughout several time windows can distinguish a collective,
single-mode resonance from a large instantaneous field at the emitter. The
only terminal electromagnetic performance target in this first experiment is
$Q/V$. Waveguide-mode overlap, beta factor, and deliberate mirror opening are
not objectives. The terminal feedthrough remains in the geometry only so the
simulation scene and optimization region are identical to the preceding
eight-micron Fryett scratch campaign.

The experiment starts from neutral material density, not from the previous
campaign's optimized geometry. All 3,200 cells in the reduced $x$-$y$ design
quadrant are present from the first update, except for the same fixed terminal
feedthrough. They decode through one material field. A positive-semidefinite
multiscale metric correlates proposed pixel motion, but it does not prescribe a
beam, hole, period, or material sign.

## Frozen geometry and Maxwell problem

| Quantity | Value |
|---|---:|
| Full optimization region | $8.0\,\mu\mathrm m\times1.0\,\mu\mathrm m\times0.40\,\mu\mathrm m$ |
| Reduced design array | $160\times20$ cells |
| Maxwell spacing | $25\,\mathrm{nm}$ |
| Non-PML interior | $9.10\,\mu\mathrm m\times1.50\,\mu\mathrm m\times1.50\,\mu\mathrm m$ |
| Reduced Maxwell grid | $194\times42\times42$ cells |
| Symmetry | $(+x,-y,+z)$ mirror parity, factor 8 |
| Emitter | centered $y$-polarized point dipole |
| Target wavelength | $780.55\,\mathrm{nm}$ |
| Materials | the same SiN and embedding cladding as the Fryett reconstruction |

Changing any entry in this table requires a new campaign fingerprint and
artifact. The previous scratch artifact is never mutated or used as an
implicit seed.

## What “using the 4D field” means

Writing every field value at every FDTD step would add a huge movie to the
adjoint tape without adding information needed by a one-pole test. Instead,
the solver accumulates exact differentiable sufficient statistics over four
disjoint temporal windows. For window $k$ and demodulation frequency $\omega_c$,

$$
u_k(\mathbf r)
=
\frac{2}{N_k}
\sum_{n\in W_k}
\begin{bmatrix}
\mathbf E(\mathbf r,t_n)\\
\mathbf H(\mathbf r,t_n)
\end{bmatrix}
e^{+i\omega_c t_n}.
$$

All six field components are accumulated throughout the reduced
$160\times20\times8$ design volume, which represents the complete
$8.0\times1.0\times0.40\,\mu\mathrm m^3$ physical region under the three exact
mirror symmetries. The emitter field and total electromagnetic energy are also
retained as time traces. Thus the objective consumes every independent sampled
spatial cell, field component, and time window relevant to the assumed
carrier; it does not retain an unnecessary raw movie.

The energy inner product between two window states is

$$
\langle u_k,u_l\rangle_W
=
\frac12\int_{\Omega_d}
\left(
\mathbf E_k^*\!\cdot\epsilon\mathbf E_l
+
\mathbf H_k^*\!\cdot\mu\mathbf H_l
\right)d^3r,
$$

and the temporal Gram matrix is

$$
G_{kl}=\langle u_k,u_l\rangle_W.
$$

This matrix is small, but every entry is a reduction of the full sampled
spatial field. Three complementary diagnostics follow from it.

First, the pairwise modal coherence is

$$
\eta_{\mathrm{coh}}
=
\frac{1}{K(K-1)}
\sum_{k\ne l}
\frac{|G_{kl}|^2}{G_{kk}G_{ll}+\varepsilon}.
$$

It equals one when every temporal window contains the same spatial Maxwell
state up to a complex scalar. Beating between spatially different modes lowers
it.

The float32 implementation uses the explicit relative regularizer

$$
\varepsilon_E=10^{-10}\max_jG_{jj},
\qquad
\widehat u_k=\frac{u_k}{\sqrt{G_{kk}+\varepsilon_E}},
$$

and forms the normalized Gram matrix from
$\langle\widehat u_k,\widehat u_l\rangle_W$ before taking its squared
magnitude. This is the regularized form of the equation above, arranged to
avoid reciprocal-square overflow in the adjoint when a late window is nearly
dark. The maximum used in $\varepsilon_E$ is stopped-gradient: it is a
numerical scale, not an additional route for one time window to optimize
another.

Second, the rank-one fraction

$$
\eta_1=\frac{\lambda_{\max}(G)}{\operatorname{tr}G}
$$

is recorded as an independent diagnostic. The pairwise form is used in the
hot-loop objective because it has a better-behaved derivative when the initial
late-time field is almost zero. The eigendecomposition itself is
stopped-gradient because repeated zero eigenvalues have no unique eigenspace;
rank and effective rank are telemetry rather than objective terms.

Third, after shifting to the fitted real pole frequency, the stationary-field
fraction is

$$
\eta_{\mathrm{stat}}
=
\frac{\left\|\sum_k \widetilde u_k\right\|_W^2}
{K\sum_k\|\widetilde u_k\|_W^2+\varepsilon},
\qquad
\widetilde u_k
=u_k e^{+i(\omega_*-\omega_c)t_k}.
$$

This is one only for a constant complex field in the co-rotating frame. It
therefore responds to decay and residual beating. Only the real frequency is
removed: the factor $e^{+\gamma t}$ is deliberately **not** applied, because
doing so would normalize away the lifetime that the optimizer must improve.

The window-energy retention diagnostic is

$$
R_U=\frac{G_{K-1,K-1}}{G_{00}+\varepsilon}.
$$

## Stage A: pulse-on-assisted discovery

The Gaussian emitter pulse is appreciable only during the first roughly
$60\,\mathrm{fs}$. The discovery tape therefore contains one driven window and
three source-off windows. A fixed-frequency source-work measurement gives

$$
L_{\mathrm{on}}
=
\frac{P_{\mathrm{src}}(\omega_0)}
{P_{\mathrm{src,vac}}(\omega_0)},
$$

while the source-off response is measured from the emitter-field coefficients
in the three later windows,

$$
L_{\mathrm{off}}
=
\frac{\frac13\sum_{k=1}^{3}|E_y(\mathbf r_0,W_k)|^2}
{|E_{y,\mathrm{vac}}(\mathbf r_0,W_0)|^2+\varepsilon}.
$$

The initial design has essentially no ringdown, so the continuation begins
with 90% weight on $L_{\mathrm{on}}$. Over the first 60 accepted or rejected
updates, a smooth schedule transfers weight until the source-off response
carries 85%. The discovery objective is

$$
J_D
=
\log\!\left(w_{\mathrm{on}}L_{\mathrm{on}}
+w_{\mathrm{off}}L_{\mathrm{off}}+\varepsilon\right)
+0.15\log(\eta_{\mathrm{coh}}+\varepsilon)
+0.10\log(\eta_{\mathrm{stat}}+\varepsilon)
+0.10\log(R_U+\varepsilon).
$$

This is explicitly a pre-pole surrogate, not a claim to be exact $Q/V$.
$L_{\mathrm{on}}$ prevents a zero-field solution and supplies a useful gradient
at initialization. The later terms progressively reward a persistent local
response carried by one global spatial mode.

Every eight discovery updates, a longer independent pulse-off replay attempts
to identify a pole. Discovery ends only when all of the following pass:

1. conservative fitted $Q\ge100$;
2. field- and energy-decay fits pass their residual and window-consistency
   limits;
3. the two lifetime estimates agree within the stated ratio;
4. the pole remains inside the absolute target-frequency band;
5. full-field temporal coherence and adjacent-window spatial overlap pass;
6. the fitted branch is stable under recentering.

The number 100 is not a fundamental threshold. It is the point at which an
isolated pole is usually identifiable; the fit-quality tests remain
authoritative.

## Stage B: eigenfrequency-shifted 4D Q/V

For a tracked pole,

$$
E^+(\mathbf r,t)
\simeq
A\psi(\mathbf r)e^{-i\omega_*t}e^{-\gamma t}
+\sum_{m\ne *}A_m\psi_m(\mathbf r)e^{-i\omega_mt}e^{-\gamma_mt}.
$$

A fixed-frequency objective develops a narrow detuning direction whose
curvature scales as $Q^2$. The campaign uses the time-domain analogue of the
Shaker--Johnson shifted-LDOS method: a coarse late-time spectrum selects the
frequency branch with stopped gradients, a differentiable translated-window
fit obtains $\omega_*$ and $\gamma$, and all temporal states are moved into the
$\operatorname{Re}\omega_*$ frame. The final fit remains differentiable through
the FDTD fields. Only the discrete mode-selection decision is detached.

The physical cavity quantities are

$$
Q=\min\!\left(
\frac{\operatorname{Re}\omega_*}{2\gamma_E},
\frac{\operatorname{Re}\omega_*}{2\gamma_U}
\right),
$$

$$
V
=
\frac{U}{\epsilon(\mathbf r_0)|E_y(\mathbf r_0)|^2},
\qquad
\widetilde V=\frac{V}{(\lambda_*/n_{\mathrm{SiN}})^3},
$$

and

$$
F_{QV}=\frac{Q}{\widetilde V}.
$$

The shifted 4D objective is

$$
J_S
=
\log F_{QV}
+0.20\log(\eta_{\mathrm{coh}}+\varepsilon)
+0.20\log(\eta_{\mathrm{stat}}+\varepsilon)
-P_{\mathrm{fit}}-P_{\mathrm{band}}.
$$

The two coherence factors approach one for the desired nondecaying single
mode, so the terminal objective becomes proportional to $Q/V$. They act as
mechanism selectors and reject multimode beating rather than introducing an
output-coupling target. The absolute bandwidth penalty is

$$
P_{\mathrm{band}}
=
\lambda_\omega
\left[
\max\left(0,
\frac{|\operatorname{Re}\omega_*-\omega_0|}{\Delta\omega}-1
\right)
\right]^2.
$$

It is not scaled by the shrinking linewidth. This allows the objective to move
with the resonance without allowing mode-family drift.

The implementation uses the fitted pole to phase-correct the already
accumulated equal-duration field windows. Every accepted geometry updates the
detector frequency for the next replay. This is the practical FDTD analogue of
eigenfrequency shifting. A literal sparse shift-invert eigensolver is reserved
for a later handoff if the finite ringdown becomes unable to resolve further
lifetime growth.

## Geometry motion and optimizer state

The material variables initially are one identity pixel per reduced design
cell. A filtered projection produces the physical density. Projection strength
grows gradually from a soft discovery field toward a binary design. The same
parameter array and material decoder are used in both objective stages until
the automatic binary-boundary gate described below passes.

The raw adjoint gradient is transformed by a mild, strictly positive DCT
multiplier. For DCT indices $(m,n)$,

$$
W_{mn}
=s+
\frac{1-s}{1+(m/m_{\max})^8+(n/n_{\max})^8}.
$$

At update zero, $(m_{\max},n_{\max},s)=(48,12,0.35)$. A smoothstep opens these
values to $(159,19,1)$ at update 24, after which the DCT operation is exactly
the identity. Thus even the finest initial modes retain at least 35% of their
raw gradient, no spatial mode is removed, and there is no selected period.
Unlike version 1, there is no emitter-local raw-gradient term: the center has
no extra optimizer mobility. The terminal feedthrough cells alone are removed
from the direction.

Each update performs:

1. replay the current accepted geometry and differentiate its active 4D
   objective;
2. transform the gradient with the positive-semidefinite multiscale metric;
3. blend chart-local momentum only if the blend retains positive ascent;
4. cap the largest parameter move by the current trust radius;
5. replay exactly one candidate under the same projection and objective;
6. accept only a finite, improving candidate; in the shifted stage also
   require a trustworthy same-family pole and nondecreasing $Q/V$;
7. grow the radius after a well-predicted accepted step or halve it after
   rejection;
8. atomically save current, best, candidate, history, traces, geometry, and
   pole-aligned fields.

## Stage C: automatic subpixel level-set boundary refinement

The pixel chart is valuable while the design must create or destroy material
components. It is the wrong chart after binarization: a pixel derivative can
make gray bulk, whereas the desired degree of freedom is normal motion of a
smooth material interface. Version 3 therefore performs an automatic,
fail-closed handoff to a level-set boundary after all of these conditions hold
on three consecutive trustworthy shifted states:

1. projection strength is $eta=48$;
2. no more than 4% of cells lie in $0.1<\rho<0.9$;
3. the thresholded numbers of material components and enclosed voids are
   unchanged, including across the $eta=0.47,0.50,0.53$ projection offsets.

The remaining fractional cells at this gate form the projected interface
layer; they are not interpreted as a third material. A sign-preserving fit
constructs a vertex level set $phi_0$ whose zero contour reproduces that
layer. Boundary parameters $d_{ij}$ are physical displacements in micrometres,
and the local chart is

$$
\phi(d)=\phi_0+w(|\phi_0|)d,
\qquad
w(s)=
\begin{cases}
\tfrac12[1+\cos(\pi s/b)],&s<b,\\
0,&s\ge b,
\end{cases}
$$

with narrow-band width $b=100\,\mathrm{nm}$. Thus derivatives vanish exactly
in the bulk. The physical density in each 25 nm Maxwell cell is the six-by-six
subcell quadrature of a compact $C^1$ Heaviside applied to the bilinearly
interpolated level set,

$$
\rho_c(d)=\frac1{36}\sum_{q=1}^{36}
H_{\delta}\!\left(\phi(d;\mathbf r_{cq})\right),
\qquad \delta=25/6\,\mathrm{nm}.
$$

Consequently cells away from the contour are exactly air or SiN, while only
cells cut by the contour have fractional fill. The same cut-cell density is
used in the differentiated forward solve and in candidate replay; subpixel
averaging is not a display-only rasterization.

Before the coordinate change is accepted, a complete 2 ps shifted-ringdown
replay must retain at least 90% of the incumbent $Q/\widetilde V$, have at
least 0.90 energy-normalized field overlap, pass every existing pole and fit
gate, and preserve the component/hole topology. A failed fit or replay pauses
with the pixel incumbent unchanged. Pixel momentum is never transferred into
the boundary chart.

Stage C differentiates the **same** $J_S$ objective. Its gradient with respect
to $d$ is a boundary-normal shape sensitivity. A one-cell Gaussian metric
suppresses grid-scale zig-zag motion without prescribing a period or global
shape. Every candidate is backtracked until its thresholded component and
hole lineage is unchanged, then replayed through Maxwell. Acceptance still
requires nondecreasing $Q/\widetilde V$, nondecreasing $J_S$, a trustworthy
same-family pole, and field overlap of at least 0.50.

The local displacement chart allows at most 50 nm relative to its current
origin, but this is not a cumulative fabrication constraint. When accepted
coordinates use 60% of that range, the exact latent level set becomes the new
origin and the displacement array resets to zero. This rebase reproduces the
cut-cell density to $10^{-6}$ or better, resets coordinate-specific momentum,
and may occur indefinitely. Per-trial motion begins at 1 nm and adapts between
0.05 and 10 nm. Hence cumulative boundary motion is unbounded while every
individual proposal remains local and topology guarded.

## Dashboard and audit contract

The public page distinguishes initialized, evaluated, proposed, accepted, and
best states. It includes:

- initial/current/difference geometry on a common physical scale;
- the field from the explicitly named temporal window;
- pulse and emitter traces with all objective windows marked;
- discovery response, coherence, stationarity, and retention;
- shifted objective, $Q$, normalized $V$, $Q/V$, pole wavelength, fit
  residuals, trust radius, physical density motion, and elapsed time;
- the complete equations and moving-component description in this document.

A field is called pole-aligned only when its detector carrier, fitted pole,
artifact update, and geometry agree. Before pole capture, the dashboard labels
the displayed image as a pulse-on or source-off response instead.

## Deliberate omissions and stopping conditions

This first campaign has no port-overlap, beta-factor, directional-emission, or
adiabatic-taper objective. It also does not claim that temporal purity alone
forces a photonic-crystal geometry. The experiment asks whether a full-field
temporal objective produces a better $Q/V$ search direction than the previous
scalar LDOS/ringdown objectives in the same design region.

A finite time window eventually becomes blind when $\gamma T\ll1$. If Q grows
until the fitted decay is not resolved consistently, the campaign pauses
rather than reporting infinity. The planned next mechanism is a literal
shift-invert eigenvalue handoff, with FDTD retained for emitter coupling,
four-dimensional purity, and independent validation.

## References

- G. Shaker, B. Martinez de Aguirre Jokisch, P. Chao, and S. G. Johnson,
  [“Eigenvalue-accelerated LDOS optimization of high-Q optical resonances”](https://arxiv.org/html/2511.16643v1).
- F. Wang et al., [“Maximizing the quality factor to mode volume ratio for ultra-small photonic crystal cavities”](https://arxiv.org/abs/1810.02417).


## Operations

The campaign is initialized and published without starting an optimization
service. The launch script acquires a campaign-specific GPU lock, starts the
optimizer, and starts an independent dashboard publisher. A bounded manual
turn can be run with:

```bash
FDTDX_FRYETT_4D_ID=qv4d_v2_mild_dct uv run python -m benchmarks.cases.invdes_fryett_hybrid_scratch.four_d --updates 1
```

The unbounded service launcher is `scripts/start_fryett_4d_qv_campaign.sh`.

<script>setTimeout(() => window.location.reload(), 60000);</script>
