Code and data for: Axial angular momentum protects the parity–time symmetric phase of a three-dimensional trap with a gain–loss dipole
Description
R code and tabulated results reproducing every figure and table of the accompanying manuscript. The scripts solve the non-Hermitian radial eigenvalue problem for a three-dimensional isotropic harmonic trap perturbed by a pair of Gaussian gain and loss spots placed symmetrically on the symmetry axis, and locate the coupling at which the parity–time symmetric phase breaks. The deposit contains the core numerical routines, a validation suite including an exactly solvable limit, the threshold computation with full spectral monitoring, the exceptional-point and sensitivity checks, and the figure-generation scripts. Two tables are included: the converged thresholds reported in the manuscript, and the complete set of 21 parameter points including the nine discarded, with the coalescing pair and the truncation error recorded for each, so that the selection criterion can be audited. Everything runs in base R 4.3.3 with no external package.
Files
Steps to reproduce
No experimental data were collected. Every file here is the output of numerical computation. SOFTWARE. R 4.3.3, base installation only, no external package. Runs in under an hour on one CPU core. METHOD. The non-Hermitian Hamiltonian is expanded in the eigenbasis of its Hermitian part, the 3D isotropic harmonic oscillator in spherical coordinates. For each conserved axial angular momentum m the basis holds the states with l >= m and 2n + l <= Nmax, giving dimensions of 121 to 576. Matrix elements of the gain-loss operator are evaluated by two-dimensional Gauss-Legendre quadrature, with 220-260 radial nodes on [0, rmax], rmax = 15-17, and 160-200 angular nodes; nodes and weights come from the Golub-Welsch construction. Laguerre polynomials use their three-term recurrence, normalised associated Legendre functions the stable normalised recurrence. The angular integral depends only on the pair of angular momenta, so the matrix is assembled block by block in (l, l'), each block a single matrix product. The complex symmetric matrix is diagonalised with base R eigen, which calls LAPACK. The PT-breaking threshold is the smallest coupling at which any eigenvalue acquires an imaginary part above 1e-6 in modulus, found by geometric bracketing then bisection, monitoring the whole spectrum rather than a low-lying window. Each calculation is repeated at two truncations differing by 10-12 units of Nmax; a point is kept only if the threshold changes by less than 1e-3 relative and the coalescing pair lies well below the truncation boundary, since states near the top of a truncated basis are unconverged and go complex spuriously. That criterion is why 12 of the 21 computed points appear in Table 1; the discarded ones are included here so the selection can be audited. VALIDATION. Script 02 reproduces four checks. Basis functions integrate to unity and are orthogonal to 1e-15 or better. The unperturbed spectrum reproduces 2n + l + 3/2 with the correct degeneracies. The parity selection rule holds to machine precision. Replacing the localised profile by the unbounded W = z makes the problem exactly solvable by a complex translation, so eigenvalues must be E_n(0) + g^2/2 and strictly real; the code returns this to eight significant figures with imaginary parts below 1e-13, testing quadrature, recurrences, normalisations and diagonalisation at once. The closed-form coupling was checked against quadrature over thirty parameter combinations, agreeing to 8e-15. EXCEPTIONAL POINT. The square-root exponent comes from least squares on log-log data over several windows, since the law is asymptotic. Eigenvector coalescence is verified separately through the modal overlap, phase rigidity and condition number. In the flow figures branches are labelled by eigenvector continuity, not eigenvalue order. FIGURES AND UNITS. Base R graphics, vector PDF. Lengths are in sqrt(hbar/(mass*omega)) and energies in hbar*omega, so coupling, separation and spot width are dimensionless.