Computational methods, numerical algorithms for physics problems.
Translating quantum many-body theory into scalable software traditionally requires months of effort. Zero-shot generation of tensor network algorithms by Large Language Models (LLMs) frequently fails due to spatial reasoning errors and memory bottlenecks. We resolve this using a multi-stage workflow that mimics a physics research group. By generating a mathematically rigorous LaTeX specification as an intermediate blueprint, we constrain the coding LLM to produce exact, matrix-free $\mathcal{O}(D^3)$ operations. We validate this approach by generating a Density-Matrix Renormalization Group (DMRG) engine that accurately captures the critical entanglement scaling of the Spin-$1/2$ Heisenberg model and the symmetry-protected topological (SPT) order of the Spin-$1$ AKLT model. Testing across 16 combinations of leading foundation models yielded a 100\% success rate. By compressing a months-long development cycle into under 24 hours ($\sim 14$ active hours), this framework offers a highly reproducible paradigm for accelerating computational physics research.
The rapid integration of Large Language Models (LLMs) into scientific writing fundamentally challenges traditional definitions of authorship, responsibility, and scientific integrity. As researchers transition from using computers as deterministic tools to managing them as ``virtual collaborators,'' the nature of human contribution must be re-evaluated. Using the drafting process of a recent computational physics manuscript as a case study, this essay explores the indispensable role of the Human-in-the-Loop (HITL). We demonstrate that while AI excels at structural organization and syntax generation, the human author bears the ultimate responsibility for enforcing rigorous physical logic, maintaining academic diplomacy, and anticipating peer-review critiques. In this paradigm, the human contribution shifts from writing boilerplate text to acting as a Principal Investigator who actively mentors and steers the AI's reasoning. To ensure accountability and preserve the integrity of the scientific record in this new era, I argue that the community must mandate the publication of full, unedited AI interaction transcripts as standard supplementary material.
Accurate assessment of central hemodynamics is essential for diagnosis and risk stratification, yet it still relies largely on invasive measurements or on indirect reconstructions built from population-averaged transfer functions. While conventional methods are valuable in clinical practice, they face limitations, particularly in personalized medicine. Physics-informed methods address these by integrating physical principles, reducing the need for extensive data. In this work, a fully noninvasive, patient-specific framework is developed that combines a validated 1-D model of the systemic arterial tree with physics-informed neural networks (PINNs). This model performs the inverse solution of the flow and pressure fields within the arterial network, given minimal noninvasive measurements of pressure from a cuff reading and trains in 4000 iterations, at least 10x faster than the current state-of-the-art models due to several model enhancements. We validate the model predictions against our 1-D solver, yielding a near perfect correlation, and perform additional tests on a clinical dataset for the identification of important central hemodynamic parameters of cardiac output $CO$ and central systolic blood pressure $cSBP$, with correlations of $r=0.847$ and $r=0.951$, respectively. Moreover, the model is able to tune the patient-specific coefficients of the terminal resistance $R_T$ and compliance $C_T$ while training, treating them as learnable parameters. The inverse PINN model is able to solve the entire tree of 8 arteries with a single network, costing 5-10 minutes of computational time. This significant performance boost compared to traditional iterative inverse methods holds promise towards applications of personalized cardiac output monitoring and hemodynamic assessment via noninvasive approaches like wearable devices.
Maximally-localized Wannier functions are quantum wavefunctions resembling atomic orbitals that are used to describe electrons in condensed matter. Since their introduction in 1997, these functions have become ubiquitous in ab initio materials simulations, including applications in linear-scaling methods, strongly-correlated electron systems, quantum transport, electron-phonon interactions, and topological materials. Despite their widespread adoption in a vast software ecosystem, Wannier functions have not yet attained their fullest potential in the presence of entangled bands, as their optimization remains challenging and labor-intensive. Here, we introduce a universal meta-optimization method that leverages workflow abstraction and machine learning techniques like differential evolution and Bayesian optimization to generate globally optimized Wannier functions without human intervention. We demonstrate this approach through three applications: (i) autonomous interpolation of entangled band structures with millielectronvolt accuracy starting from coarse Brillouin zone grids, (ii) thousand-fold acceleration of fully ab initio Boltzmann transport calculations via the use of minimal coarse Brillouin zone grids, and (iii) ultra-fast high-throughput calculations of high-precision Wannier functions for large materials libraries. This work brings calculations that previously required supercomputers within the reach of personal computers.
Magboltz is widely used to compute electron transport properties in gas mixtures for detector applications. Its text-based workflow, however, can be a barrier for routine use, especially for users who are not already familiar with the program. We present Magboltz-GUI, a Python-based graphical user interface for defining gas mixtures, configuring simulation parameters, running Magboltz, and visualizing or exporting the resulting. The tool is designed as a lightweight frontend for common tasks in research and teaching environments involving gaseous detectors, including micropattern technologies such as Micromegas. This paper describes the software implementation, main interface components, and its availability as an open-source distributed package via Python tools.
2604.02130Some algorithms for the numerically exact treatment of fermion determinants are summarised. This is not supposed to be a review, rather a concise handbook. The audience is expected to have a basic understanding of how to put fermions on a computer. We primarily discuss different ways to work with the fermion matrix in the "sausage" (Green's function) formulation for quantum Monte Carlo (QMC). We emphasise the need for varied approaches in different space-time volume regimes. In particular, for small spatial volumes we describe a numerically stable method based on dense matrix operations. It is designed specifically to deal with very low temperature regimes. On the other hand, for (relatively) large volumes we describe a highly efficient and scalable sparse matrix approach.
2604.02121Stochastic kinetic models are ubiquitous in physics, yet inferring their parameters from experimental data remains challenging. In deterministic models, parameter inference often relies on gradients, as they can be obtained efficiently through automatic differentiation. However, these tools cannot be directly applied to stochastic simulation algorithms (SSA) such as the Gillespie algorithm, since sampling from a discrete set of reactions introduces non-differentiable operations. In this work, we adopt three gradient estimators from machine learning for the Gillespie SSA: the Gumbel-Softmax Straight-Through (GS-ST) estimator, the Score Function estimator, and the Alternative Path estimator. We compare the properties of all estimators in two representative systems exhibiting relaxation or oscillatory dynamics, where the latter requires gradient estimation of time-dependent objective functions. We find that the GS-ST estimator mostly yields well-behaved gradient estimates, but exhibits diverging variance in challenging parameter regimes, resulting in unsuccessful parameter inference. In these cases, the other estimators provide more robust, lower variance gradients. Our results demonstrate that gradient-based parameter inference can be integrated effectively with the Gillespie SSA, with different estimators offering complementary advantages.
The design of triboelectric nanogenerators (TENGs) for efficient energy harvesting requires predictive models that capture the interplay between surface roughness, real contact area, and electrostatic behaviour across diverse tribolayer materials and roughness levels. To address this demand, this paper presents a multiphysics finite element framework that couples mechanical contact analysis with electrostatic simulations, considering exact surface roughness representations rather than idealised statistical approximations. Compared with optical interference microscopy measurements, the framework predicts the real contact area ratio more accurately than analytical models. The proposed approach captures the electrostatic behaviour by scaling the TENG surface charge density with the real contact area ratio between the rough tribolayers, computed for a given mechanical load. This method improves agreement with experiments for open-circuit voltage and capacitance relative to approximate analytical models. To represent the TENG circuit, a time-dependent ordinary differential equation is integrated, enabling evaluation of electrical responses under varying load conditions and elucidating the roles of surface roughness, mechanical load, contact-separation frequency, and resistive load. The framework provides a robust, scalable tool for performance optimisation across dielectric materials, mechanical behaviours, and operating conditions and is readily extendable to other surface-dependent energy-harvesting devices.
At low temperatures $T$ where $1/T=β\gg1$ the naïve implementation of determinant quantum Monte Carlo (DQMC) methods suffers from loss of precision and numerical instabilities when evaluating the fermion determinant. This instability propagates into the calculation of observables that rely on the evaluation of the inverse of the fermion matrix, or the Greens function. For DQMC methods that rely on the Hamiltonian Monte Carlo (HMC) algorithm, an additional complication comes from evaluating the force terms required for integrating Hamilton's equations of motion, since here loss of precision and numerical instabilities are also prevalent. We show how to address all these issues using various choices of matrix decompositions, allowing us to simulate at $β\gtrsim 90$, which corresponds to room temperature for graphene structures. Furthermore, our implementation has numerical costs that scale similarly to the naïve implementation, namely as $\mathcal{O}(N_x^3N_t)$, where $N_x$ ($N_t$) is the number of spatial (temporal) sites.
This paper presents a p-adaptive high-order hybridizable discontinuous Galerkin spectral element method (HDG-SEM) for solving the Poisson equation in electrostatic plasma simulations using particle-in-cell (PIC) schemes. This approach enables element-local refinement of the polynomial degree, concentrating computational effort specifically in regions with strong gradients. Thus, the method significantly reduces the global number of degrees of freedom compared to uniform high-order methods. The proposed method is implemented in the open-source framework PICLas and validated through a series of benchmark test cases, including a dielectric sphere and a one-dimensional plasma sheath. Finally, a two-dimensional axisymmetric simulation of an ion optic demonstrates the method's capability to efficiently model complex plasma phenomena but also highlights current limitations.
Mechanistic simulations typically assume fixed ontologies: variables, causal relationships, and resolution policies are static. This assumption fails when the true causal structure is contested or unidentifiable-as in antimicrobial resistance (AMR) spread, where contact, environmental, and selection ontologies compete. We introduce Procela, a Python framework where variables act as epistemic authorities that maintain complete hypothesis memory, mechanisms encode competing ontologies as causal units, and governance observes epistemic signals and mutates system topology at runtime. This is the first framework where simulations test their own assumptions. We instantiate Procela for AMR in a hospital network with three competing families. Governance detects coverage decay, policy fragility, and runs structural probes. Results show 20.4% error reduction and 69% cumulative regret improvement over baseline. All experiments are reproducible with full auditability. Procela establishes a new paradigm: simulations that model not only the world but their own modeling process, enabling adaptation under structural uncertainty.
A novel particle merging algorithm for rarefied gas dynamics simulations is proposed that can conserve arbitrary velocity and spatial moments of the particle distribution via solving a non-negative least squares problem. An extension that preserves both exact and approximate collision rates is also derived. The algorithm is applied to the simulation of several model rarefied gas dynamics problems, where it exhibits noticeably lower merging-induced error in key macroscopic quantities.
Hamiltonian systems lie at the heart of modeling the physical world. Their defining scalar, the Hamiltonian, encodes both energy conservation and symplectic geometry in its phase-space trajectories. Recent deep learning approaches model Hamiltonian systems by embedding their properties either in the architecture or in the loss function. However, they typically ignore that: i) a Hamiltonian carries units of energy and/or ii) that every integrable Hamiltonian admits a canonical transformation to action-angle coordinates in which the dynamics reduce to a simple rotation on an invariant torus. We propose BuSyNet, a deep learning architecture that combines these two constraints via a dimensionally-consistent, symplectic transformation. A symplectic layer maps input trajectories to lower-dimensional latent action-angle variables, which are then combined with system parameters to discover a symbolic Hamiltonian expression in units of energy. Evaluated on the harmonic oscillator and the Kepler two-body problem (in 2D and 3D), BuSyNet recovers concise, closed-form Hamiltonians that outperform state-of-the-art neural architectures in long-term prediction accuracy and stability, while maintaining interpretability.
When three-dimensional bodies contain thin features, non-trivial topology, or scan-derived surfaces, volumetric meshing can become the dominant bottleneck in simulation workflows. We replace this step with a learned geometric representation: overlapping volumetric coordinate charts, each equipped with a neural decoder and Jacobian, trained from point-cloud or level-set data to form a differentiable atlas. Governing equations are pulled back to chart-local reference coordinates via the Piola identity, and local solutions are coupled through multiplicative Schwarz iterations on the overlap graph. Because the atlas is constructed independently of the downstream discretization, one frozen geometric substrate can support fundamentally different solvers (for example, a meshfree physics-informed neural network and a conventional finite-element method) without re-meshing or re-parametrization. Benchmark and verification studies show that the learned atlas preserves expected finite-element convergence behavior and enables both forward and inverse analyses on geometries that would otherwise require solver-specific volumetric meshing.
Recent advances in automated scientific discovery have shown remarkable promise across frontier research domains, with agent systems driven by large language models (LLMs) emerging as powerful tools for physics research. However, in practical applications, LLM scientific research is prone to hallucinations, highlighting the need for reliable verification and error-correction mechanisms. Here we introduce PhysVEC, an automated multi-agent framework for verifiable and error-correcting AI-driven physics research. PhysVEC incorporates a programming verifier and a scientific verifier to ensure both coding correctness and physical validity, and provides human-auditable evidence at each stage. We curate QMB100, an end-to-end research-level benchmark dataset consisting of $100$ tasks extracted from $21$ high impact articles that focus on quantum many-body physics. We evaluated PhysVEC with four frontier LLMs and found that it significantly outperformed baselines in both programming tests and scientific tests across all LLMs and task categories. PhysVEC demonstrates effective inference-time scaling and delivers accurate physical predictions through integrated verification and error-correction mechanisms, paving the way for reliable and interpretable AI physicists.
Godunov-type methods, which obtain numerical fluxes through local Riemann problems at cell interfaces, are among the most fundamental and widely used numerical methods in computational fluid dynamics. Exact Riemann solvers faithfully solve the underlying equations, but can be computationally expensive due to the iterative root-finding procedures they often require. Consequently, most practical computations rely on classical approximate Riemann solvers, such as Rusanov and Roe, which trade accuracy for computational speed. Neural networks have recently shown promise as an alternative for approximating exact Riemann solvers, but most existing approaches are data-driven or impose weak constraints. This may result in problems with maintaining balanced states, symmetry breaking, and conservation errors when integrated into a Godunov-type scheme. To address these issues, we propose a hard-constrained neural Riemann solver (HCNRS) and enforce five constraints: positivity, consistency, mirror symmetry, Galilean invariance, and scaling invariance. Numerical experiments are carried out for the shallow water and ideal-gas Euler equations on standard benchmark problems. In the absence of hard constraints, violations of the well-balanced property, mass conservation, and symmetry are observed. Notably, in the Euler implosion problem, the exact Riemann solver with MUSCL-Hancock captures the jet structure well, whereas the Rusanov flux is too diffusive and smears it out. HCNRS accurately reproduces the solution obtained by the exact Riemann solver. In contrast, an unconstrained neural formulation lacks mirror symmetry, which makes the solution depend on the choice of flux normal direction. As a result, the jet is either shifted or lost, along with diagonal symmetry.
The scalability of time-dependent partial differential equation (PDE) solvers based on the discontinuous Galerkin (DG) method is increasingly limited by data communication and synchronization requirements across processing elements (PEs) at extreme scales. To address these challenges, asynchronous computing approaches that relax communication and synchronization at a mathematical level have been proposed. In particular, the asynchronous discontinuous Galerkin (ADG) method with asynchrony-tolerant (AT) fluxes has recently been shown to recover high-order accuracy under relaxed communication, supported by detailed analyses of its accuracy and stability. However, the scalability of this approach in modern large-scale parallel DG solvers has not yet been systematically investigated. In this paper, we address this gap by implementing the ADG method coupled with AT fluxes in the open-source finite element library deal.II. We employ a communication-avoiding algorithm (CAA) that reduces the frequency of inter-process communication while accommodating controlled delays in ghost value exchanges. We first demonstrate that applying standard numerical fluxes in this asynchronous setting degrades the solution to first-order accuracy, irrespective of the polynomial degree. By incorporating AT fluxes that utilize data from multiple previous time levels, we successfully recover the formal high-order accuracy of the DG discretization. The accuracy of the proposed method is rigorously verified using benchmark problems for the compressible Euler equations. Furthermore, we evaluate the performance of the method through extensive strong-scaling studies for both two- and three-dimensional test cases. Our results indicate that CAA substantially suppresses synchronization overheads, yielding speedups of up to 1.9x in two dimensions and 1.6x in three dimensions compared to a baseline synchronous DG solver.
We present a fully automated framework for extracting interatomic force constants (IFCs) directly from X-ray thermal diffuse scattering (TDS) data. By formulating scattering intensity as a differentiable function of a symmetry-reduced IFC parameterization, we enable gradient-based optimization via direct, Cholesky-based sampling of correlated atomic displacements at thermal equilibrium. This approach bypasses the computational bottleneck of repeated Hessian matrix diagonalizations, significantly accelerating the inversion process. Benchmark tests demonstrate that the framework accurately recovers ground-truth IFCs and phonon dispersion relations, providing a robust, high-throughput pathway for studying lattice dynamics across diverse crystalline materials. This method bridges the gap between experimental observations and computational modeling, enabling the direct integration of TDS data into the refinement of high-fidelity inter-atomic potentials.
We present a structured reformulation of the many-body dispersion (MBD) model that enables a physically consistent decomposition of forces into pairwise components. By introducing a many-body correlation matrix that scales dipole-dipole interactions, we derive unified expressions for the MBD energy, force, and Hessian. This reformulation reveals a natural structure for pairwise force decomposition and provides a promising foundation for interpretable analysis and machine learning surrogate modeling of MBD interactions.
Pulgon-tools is an open-source software package providing building blocks for the analysis and modeling of quasi-one-dimensional (quasi-1D) periodic systems based on line-group theory. While mature libraries exist for space-group detection in three-dimensional crystals, an automated and structure-based identification of line groups has so far been lacking. We present software that integrates four complementary components within a consistent line-group framework: (i) structure generation, (ii) symmetry detection, (iii) irreducible representations (irreps) and character table and (iv) harmonic interatomic force constants (IFCs) correction. This paper introduces the general code structure and several examples that illustrate some relevant applications of the program.