Decompiling Synthetic Magnetic Flux from Full-Wave Simulations of Twisted and Vortex-Pumped Light

Light carries no electric charge, so a magnetic field cannot bend it. Physicists get around this by building structures in which light behaves as if it felt a magnetic field. They twist a ring of optical fibre cores, or pump a nonlinear medium with a vortex beam (a beam whose wavefront spirals and so carries orbital angular momentum, or OAM). Every prediction that this works rests on a simplified, "paraxial" wave equation, which assumes light travels almost straight ahead and never reflects. We propose to test those predictions against full Maxwell simulations. The hard part is reading a fake magnetic field out of billions of simulated field values. We treat this as a decompilation problem: recover a small, human-readable model, meaning a few sites, the hopping strengths between them, and the phases light picks up when it hops. We then judge the recovered model the way decompiled code is judged, by whether it re-executes. That is, it must reproduce the full simulation's response to inputs it was never fitted on.

The payoff is a quantitative map of where synthetic magnetism for light survives. The map is indexed by twist rate, core spacing, and the OAM charge of the pump. It locates the point where the textbook picture breaks down because of backreflection, radiation loss, and mixing with longitudinal field components. It also gives a reusable procedure that turns opaque simulation output into a checkable physical model.

Core Claim

The quantity that matters physically is the synthetic magnetic flux through each closed loop of sites. Formally it is the phase of the product of complex hopping amplitudes around the loop, $\Phi = \arg \prod_{\text{loop}} J_{ij}$. This flux is gauge-invariant: it does not change under the relabelling of local phases that leaves the physics unchanged. The individual hopping phases, by contrast, are not gauge-invariant.

This mirrors what compilation does to software. Variable names are arbitrary, and only behaviour is recoverable and worth scoring. Our claim has three parts:

  1. A fitted effective model can be extracted from finite-difference time-domain (FDTD) simulations. FDTD solves Maxwell's equations directly on a staggered space-time grid.
  2. The extracted model should be scored only on gauge-invariant fluxes and on held-out re-execution.
  3. On that basis it can say reliably where paraxial coupled-mode theory mispredicts the flux. It can also say whether the mismatch is a real non-paraxial effect or a grid artefact.

Where This Sits

Physics that motivates the question. Synthetic magnetism for photon fluids derives an effective vector potential for weak excitations riding on an OAM pump in second- and third-order nonlinear media. Its numerics stay inside paraxial nonlinear Schrödinger equations. Modulation Instability of Discrete Angular Momentum in Fiber Rings shows that twisting a ring of cores imprints geometric Peierls phases, which in turn tune the instabilities of discrete angular momentum. The chirally-coupled core review (Recent Advances in Chirally-Coupled Core Fibers) relies on coupled-mode theory and beam propagation. All three supply the predictions we test, and none checks them with full-vector Maxwell solutions at steep twist or high OAM charge.

Simulation methods we reuse. FDTDX provides a scalable, differentiable JAX solver. Its time-reversal adjoint only holds in linear, lossless media, which constrains our nonlinear arm to forward-only differentiation or checkpointing.

Neural surrogate we compete against. PIC2O-Sim is a neural operator that emulates FDTD quickly, but it produces no interpretable model and its errors accumulate over long rollouts. It is our strongest surrogate competitor, not our method.

Evaluation logic we borrow from decompilation. We take two ideas from that literature, not its models:

  • Scoring by functional re-execution rather than surface similarity, following HumanEval-Decompile in LLM4Decompile.
  • Treating structural scaffolding as what prevents hallucinated structure, following StackSight. In StackSight, removing the explicit stack view cost up to 7.8%.

The analogue of hallucinated struct fields here is hallucinated long-range hoppings. We control these by model selection on held-out re-execution.

Research Program

Primary testbed: twisted core rings. We simulate rings of N coupled cores twisted along the propagation axis. We sweep three quantities: twist rate, core spacing relative to wavelength, and N. The grid is refined below λ/20 and bounded by perfectly matched absorbing layers (boundaries built to swallow outgoing waves without reflecting them). We run FDTDX forward in the lab frame.

We use two kinds of input. For fitting, we launch pulses into individual cores. For testing, we launch discrete-OAM superpositions across the ring. At many cross-sections we project the fields onto each core's local mode, which gives complex amplitude trajectories for every core.

The extracted model. We fit a compact coupled-mode model to these trajectories by differentiable least squares. The model has:

  • complex nearest-neighbour hoppings;
  • optional next-nearest hoppings;
  • optional non-Hermitian terms, which capture radiation loss and backreflection.

We report only gauge-invariant outputs: the loop flux Φ, the hopping magnitudes, and the loss rates. Each comes with bootstrap uncertainty across fitting inputs.

Model selection. Model complexity is chosen by re-execution on held-out OAM inputs, never by fit residual.

Secondary testbed: vortex-pumped Kerr slab. This probes the OAM-pump mechanism. A vortex pump of charge ℓ runs through a nonlinear slab, and a weak probe is added. We extract the effective vector potential's circulation around loops from probe deflection and phase winding. We compare that circulation with the Bogoliubov prediction of the photon-fluid paper. This arm is more exploratory, because nonlinearity removes FDTDX's cheap adjoint.

Grid-artefact test. Every extracted flux is recomputed at two further grid resolutions. A flux that drifts with resolution is labelled a discretization artefact rather than physics. This directly tests the worry that the grid itself breaks gauge symmetry.

Baselines

Naive reference: the coupled-mode prediction as-is. Paraxial coupled-mode theory in the helical frame predicts a flux that grows linearly with twist rate. We evaluate it with no fitting, then re-execute its model on the same held-out inputs. Beating it means one of two things. Either our extracted flux differs from the prediction by more than our bootstrap uncertainty, in a way that is stable under grid refinement. Or our model's held-out re-execution error is lower in the regime where the two disagree. In the weak-twist limit we expect to tie with it, and we require that tie as a sanity check.

Strongest physics competitor: a fitted beam-propagation model. This is a beam propagation method (a unidirectional, paraxial field solver), with its couplings fitted to the same FDTD data. We give it the same fitting inputs, the same parameter count, and the same optimizer budget. It isolates whether full-wave data matter at all. If it matches our full-wave-informed model everywhere, then the non-paraxial effects are negligible for flux.

Strongest surrogate competitor: a PIC2O-Sim-style neural operator. It is trained on the same simulation trajectories with matched training compute. We compare normalized L2 error at long horizons on held-out inputs.

The file reports PIC2O-Sim's results only on MMI, MRR, and metaline devices: 51.2% lower normalized L2 rollout error than Fourier neural operators, and 308× to 632× speedup over MEEP. We found no reported result on Lacuna for neural surrogates on twisted or helical waveguides, so we must train it ourselves. Our success criterion is lower error than the neural operator at the longest horizons, using orders of magnitude fewer parameters, together with an interpretable flux.

Ablations of the key ingredients.

  • Raw-phase scoring. We score individual hopping phases instead of gauge-invariant loops. We expect this to inflate apparent error and apparent instability.
  • Hermitian-only fits. These test whether loss terms are needed to explain departures from coupled-mode theory.
  • Selection by fit residual instead of held-out re-execution. This tests whether the re-execution criterion is what suppresses spurious long-range hoppings.

Why not just…?

Why not just trust coupled-mode theory and beam propagation, as the fibre literature does? This is the main threat, and it may well be adequate over much of parameter space. Our honest expectation is agreement at gentle twist. The live question is where the agreement ends: at steep helix angles, subwavelength spacing, and high OAM charge, where backreflection and longitudinal fields appear. Those are exactly what unidirectional paraxial solvers discard. The fitted beam-propagation baseline settles this directly. If it matches our model everywhere in our sweep, we will report that as the result: paraxial theory is validated beyond its assumed range.

Why not just use a frequency-domain mode solver to get the flux from band structure? For the linear twisted ring this is a genuine alternative. A helical-frame eigensolver could yield supermode splittings, and hence the flux, more cheaply. We include it as a cross-check in the linear arm. It cannot handle the vortex-pumped Kerr slab, whose effective potential depends on the instantaneous pump field. It also struggles to report radiation loss and backreflection as fitted terms in a model we can re-execute. If the eigensolver and our time-domain extraction agree on the linear ring, time-domain fitting is justified only for the nonlinear and lossy cases, and we would narrow our claim accordingly.

Why not just take the Fourier or Laguerre-Gaussian modal content of the output? Laguerre-Gaussian modes are the standard basis of vortex beams. Projecting onto them measures how much OAM is present, not the loop phase that couples cores. A given OAM spectrum is consistent with many different hopping models. The held-out re-execution test shows the difference: a modal decomposition fitted to one input cannot predict the response to another. A dynamical model with the right flux can.

Proposed Experiments and Decisive Checks

Validation in the paraxial limit. In the weak-twist, well-separated-core limit, the extracted flux must match the coupled-mode prediction within bootstrap uncertainty. It must also be stable across three grid resolutions. Failure here would mean the extraction procedure, not the physics, is at fault.

The main result: a map of flux departures. We sweep twist rate against core spacing and against ring size N, and plot where the extracted flux departs from coupled-mode theory by more than its uncertainty. We then check whether the departure goes with the appearance of fitted non-Hermitian terms. If it does, the breakdown is due to radiation or backreflection. If it does not, and instead goes with next-nearest hoppings, the cause is non-local coupling.

Surrogate comparison. Our extracted models and the neural operator are compared on held-out OAM-superposition inputs at the longest simulated distance. A few-parameter model with the right loop fluxes should beat the neural surrogate at long horizons, since a conserved flux cannot drift. If it does not, the flux-centred description is missing physics that the neural surrogate captures, and we will report that.

Nonlinear arm. We measure extracted circulation against pump charge ℓ and pump intensity, and ask whether the linear Bogoliubov scaling holds once non-paraxial vortex cores are resolved. We will release all simulation trajectories and fitting code, so others can test competing extraction methods on the same data.