Independent scholarship · Open accessThe monthly digest

Indexed text attachment

coherent-specialization-on-graalvm.tex

Source for Coherent Specialization on GraalVM

View paper · Download original file

Lines 541–640 of 803. Source text is displayed literally.

541\end{align*}542The bound uses the triangle inequality and the exact unitarity of543$U_H(\delta_i)$. Each $e_i$ includes coefficient generation and544arithmetic error at that step's actual input. The discrepancy with545one compiled application at $t=\sum_i\delta_i$ is bounded by adding546$\|K_t(\psi)-U_H(t)\psi\|_2$. For normalized $\psi$ and a state error547at most $\varepsilon$, the change in an exact projector probability548is at most $(2+\varepsilon)\varepsilon$ by Cauchy--Schwarz and549$\|P_\ell\|\leq1$. Computing that probability in binary64 adds its own550rounding error. These bounds explain what the observed composition551defects measure on a tested trajectory. A bound over all inputs would552require uniform control of the local errors.553 554\section{Reproducible checks}555\label{sec:evidence}556 557The artifact was tested on Linux x86-64 using GraalVM Community55824.0.2 and Truffle, GraalJS, and GraalPy 24.2.2. All eight JUnit tests passed559in the traced build. The trace test requested synchronous compilation560only for CatPE kernel roots. The Graal log reported completed tier-2561compilations of all three word kernels and of every output row in both562quantum examples. In the forest run, the trace also recorded a563deoptimization and a subsequent successful compilation. The test564continued to compare results to the independent forest calculation.565 566\begin{table}[htbp]567\centering568\caption{Word kernels on 4,096 input tuples per row.}569\label{tab:words}570\small571\begin{tabular}{lrrr}572\toprule573Kernel & Source & Residual & Mismatches \\574\midrule575Symmetric FIR & 346 & 67 & 0 \\576Antisymmetric FIR & 346 & 65 & 0 \\577Decision forest & 91 & 57 & 0 \\578\bottomrule579\end{tabular}580\end{table}581 582The word tests use a fixed pseudorandom seed and alternate between583full-width signed values and small values. Each tuple is evaluated by the584unspecialized interpreter and the Truffle kernel, and both values are585compared to a separate domain oracle. Table~\ref{tab:words} reports node586counts in source and residual terms. Both guest languages call all three587word kernels on fixed samples. They also exercise an identity kernel on588the signed maximum through foreign numeric representations, with the589host recovering the exact word.590 591The free-electron test uses a 12-site lattice with $a=0.7$, $m=1$, and592$t=0.83$. Its initial packet has center $3$, width $1.3$, and carrier593mode $2$. The field test uses the six-dimensional sector and initial594occupation of Section~\ref{sec:fermion-field} at $t=0.6$. The595field matrix is also compared with explicit entries for the fixture.596The experiments compare the output of the reusable compiled rows to597the independent references in Sections~\ref{sec:electron}598and~\ref{sec:fermion-field}. GraalJS and GraalPy invoke the same compiled599row objects and return every component of both outputs. Their results600agree component by component with the host calls.601 602\begin{table}[htbp]603\centering604\caption{Absolute error for the quantum fixtures.}605\label{tab:quantum-errors}606\small607\begin{tabular}{lrr}608\toprule609Measurement & Free electron & Fermion field \\610\midrule611Reference & $1.665\,10^{-16}$ & $6.661\,10^{-16}$ \\612Norm squared & $2.220\,10^{-16}$ & $8.882\,10^{-16}$ \\613Energy & $2.220\,10^{-16}$ & $8.882\,10^{-16}$ \\614Inverse & $1.110\,10^{-16}$ & $8.882\,10^{-16}$ \\615Composition & $1.665\,10^{-16}$ & $4.441\,10^{-16}$ \\616Unitarity & $2.220\,10^{-16}$ & $1.776\,10^{-15}$ \\617\bottomrule618\end{tabular}619\end{table}620 621Inverse error compares $U(-t)U(t)\psi$ to $\psi$. Composition error622compares $U(t)^2\psi$ to $U(2t)\psi$. Vector discrepancies use the623largest absolute difference in an interleaved real or imaginary624component. To test unitarity across the entire finite basis, the test625applies the compiled kernels to every real unit vector in the complex626basis, reconstructs the complex columns, and computes the largest627entrywise magnitude of $U^*U-I$. Table~\ref{tab:quantum-errors} reports628the observed defects. Each check uses absolute tolerance $2\,10^{-12}$.629 630\subsection{Validation across the time grid}631 632The runtime generated the plotted values by evaluating the specialized633CatPE rows at each time. For every sample we compared the amplitudes634against a reference, checked the squared norm against one, and checked635the energy against its initial value. The electron reference uses the636direct Fourier action. The field references use successive applications637of the 48th-degree Taylor polynomial for $\Delta t=0.04$ to the initial638vector. The spectral propagator used to generate the field kernels and639the Taylor reference share a Hamiltonian matrix and use different640numerical methods. The Taylor reference uses one step per sampling interval.