SearcharxivSearch

arXiv subjects

Zheng Pei

Publications and source records attributed to Zheng Pei.

10 recordsLinked to original sources

A Perspective on Phase Space Electronic Structure Theory : From Its Surface Hopping Origins Through To Its Future Promise

We trace the history of phase space electronic structure theory (PSEST), high- lighting how this powerful approach emerged from fundamental questions in semi- classical surface hopping dynamics and evolved into an alternative to standard Born- Oppenheimer based electronic structure theory (with moving instead of frozen nuclei). Our goal herein is not to recapitulate the mathematical details of phase space electronic structure calculations, and few equations are presented so as to maximize readability. Instead, our goal is to provide intuition for those new to the field both (i) regarding the physics present when solving the Schrodinger equation in a non-inertial frame as well as (ii) regarding why PSEST is a necessary step forward towards understanding chemical problems involving spin (with limited practical alternatives). We further high- light some of the many open questions in this fast developing area, which will hopefully inspire new practitioners in this field. This intuitive perspective lacks many equations and is meant to complement (rather than replace) the more technical review given in Bian et al, Chem. Phys. Rev. 7, 011303 (2026)

physics.chem-ph

WebDesignIter: Co-Evolving Design Knowledge for Repository-Level Front-End Code Generation

Front-end development accumulates change after change at the repository level, weaving complex cross-file dependencies that current LLM coding agents tuned for single-shot tasks cannot reliably track across multiple iterations, leading to functional regressions and code that resists maintenance. We argue the missing piece is design knowledge: architectural principles, module responsibilities, and structural constraints that developers lean on to keep code readable, maintainable, and evolvable as a system scales. To operationalize this, we propose WebDesignIter, a framework built around a persistent knowledge graph (WebAppArchKG) that fuses repository structure with design knowledge and keeps both in sync across development cycles. WebDesignIter works in two stages: design-informed planning pulls historical context and architectural overviews from WebAppArchKG to produce an implementation plan with corresponding test scripts, and design-aware generation executes that plan through targeted diff-based patches, validated by sandbox execution and automatic syntax repair. On Web-Bench, WebDesignIter delivers an average Pass@2 gain of 9.55 percentage points across nine foundation models over existing baselines. More importantly, WebDesignIter outperforms every general-purpose coding agent Claude Code, OpenHands, SWE-Agent, Codex CLI on every model configuration, posting the highest Pass@1 and Pass@2 while consuming 2530 fewer input tokens. Ablation singles out design knowledge as the most impactful component: stripping it drops Pass@1 by 11.40 percentage points, a degradation far larger than removing code-graph retrieval, patch-based generation, or sandbox verification, confirming that design knowledge provides a fundamentally more efficient and reliable path to repository-level code generation.

cs.SE

Dynamic analysis enhances issue resolution

Resolving complex code defects from natural language descriptions remains a fundamental software engineering challenge. Recently, large language models (LLMs) have driven the creation of agent-based automated repair systems. While improving repository-level problem-solving, current methods struggle with complex defects like intricate polymorphic control flows and implicit type degradation. These approaches rely on static analysis and shallow execution feedback, lacking the ability to monitor intermediate execution states. Consequently, agents often fall into speculative exploration, consuming significant tokens without identifying the root cause. We introduce DAIRA (Dynamic Analysis-enhanced Issue Resolution Agent), a pioneering automated repair framework deeply embedding dynamic analysis into the agent's decision loop. DAIRA employs a Test Tracing-Driven workflow, using lightweight tools to capture runtime evidence (e.g., call stacks and variable states) and convert it into structured semantic reports. By illuminating execution paths and causal dependencies, DAIRA enables precise fault localization and prevents context window flooding from irrelevant code retrievals. This shifts the agent's approach from speculative reasoning to deterministic inference. Evaluations on the SWE-bench Verified benchmark show DAIRA achieves a state-of-the-art 79.4% resolution rate when powered by Gemini 3 Flash Preview. Furthermore, it demonstrates robustness in addressing deep-seated logical defects, securing a 44.4% resolution rate on the most demanding tasks. Compared to baselines, DAIRA uniquely resolves complex edge cases and improves operational efficiency. Across various LLMs, it reduces inference costs by approximately 10% and input token consumption by 25%.

cs.SE

Knowledge Matters: Injecting Project and Testing Knowledge into LLM-based Unit Test Generation

Automated unit test generation using large language models (LLMs) holds great promise but often struggles with generating tests that are both correct and maintainable in real-world projects. This paper presents KTester, a novel framework that integrates project-specific knowledge and testing domain knowledge to enhance LLM-based test generation. Our approach first extracts project structure and usage knowledge through static analysis, which provides rich context for the model. It then employs a testing-domain-knowledge-guided separation of test case design and test method generation, combined with a multi-perspective prompting strategy that guides the LLM to consider diverse testing heuristics. The generated tests follow structured templates, improving clarity and maintainability. We evaluate KTester on multiple open-source projects, comparing it against state-of-the-art LLM-based baselines using automatic correctness and coverage metrics, as well as a human study assessing readability and maintainability. Results demonstrate that KTester significantly outperforms existing methods across six key metrics, improving execution pass rate by 5.69% and line coverage by 8.83% over the strongest baseline, while requiring less time and generating fewer test cases. Human evaluators also rate the tests produced by KTester significantly higher in terms of correctness, readability, and maintainability, confirming the practical advantages of our knowledge-driven framework.

cs.SE

Knowledge-Graph-Driven Data Synthesis for Low-Resource Software Development: A HarmonyOS Case Study

In low-resource framework development (e.g., HarmonyOS), large language models (LLMs) often lack sufficient pre-training exposure, resulting in poor code generation performance. Although they generally preserve programming logic across languages, they frequently fail on framework-specific APIs and syntax, revealing a gap between learned algorithmic knowledge and unfamiliar framework conventions. Consequently, even advanced models such as GPT-4o struggle to produce correct code without prior exposure. Inspired by these challenges, we propose APIKG4Syn, a framework that leverages API knowledge graphs to synthesize API-oriented question-code pairs without requiring executable environments. It incorporates both single-API and multi-API information, with the latter guided by uncertainty estimation (UE) and Monte Carlo Tree Search (MCTS), to construct high-quality fine-tuning data. For evaluation, we select HarmonyOS as a case study due to its accessible documentation and growing ecosystem, and build the first benchmark for its code generation. Experimental results show that fine-tuning Qwen2.5-Coder-7B with APIKG4Syn achieves a pass@1 of 25.00%, outperforming untuned GPT-4o (17.59%). We further observe that larger volumes of data generated by APIKG4Syn consistently lead to better fine-tuning performance, and that the optimal Single-API to Multi-API ratio is 8:2. Ablation studies also confirm the necessity and effectiveness of each component in our framework. These findings highlight the effectiveness of API-oriented data in enhancing LLM performance for low-resource software development scenarios.

cs.SE

Spin-Flip Configuration Interaction for Strong Static Correlation in Quantum Electrodynamics

In computational chemistry of molecular materials, strong static correlation effects appear when electronic states, often involving the ground state, become quasi-degenerate, as occurs, for example, in bond-breaking processes. Such situations present significant challenges for accurate theoretical treatment. In these regimes, many-body methods involving a single-determinant description, such as Hartree-Fock theory and its time-dependent extension, fail to reproduce the correct topology of the ground and excited state potential energy surfaces (e.g., near conical intersections). When strongly correlated electronic systems are further strongly coupled to a quantized radiation field within the framework of non-relativistic cavity quantum electrodynamics, an additional photonic degree of freedom introduces both new complexity and new opportunities to control. Excited cavity photons can modify bond-breaking processes and enable tunability of geometrical and spin-phase transitions, for instance, in organometallic complexes. To overcome this bottleneck, in this work, we extend the well-studied spin-flip configuration interaction singles (SF-CIS) approach to explicitly include quantized cavity photons leading to QED-SF-CIS method. We derive the spin-flip Hamiltonian and find that the double excitation subspace of the system (single with respect to electronic excitation) must be included in the configurations to properly describe singlet electronic states interacting with cavity photons. We then illustrate, through representative molecular examples, how cavity coupling can provide additional tunability in bond-breaking processes. We finally generalize this approach to include higher numbers of photonic excitations, which are required in the strong coupling regime.

physics.chem-ph

Architecture-Aware Multi-Design Generation for Repository-Level Feature Addition

Implementing new features across an entire codebase presents a formidable challenge for Large Language Models (LLMs). This proactive task requires a deep understanding of the global system architecture to prevent unintended disruptions to legacy functionalities. Conventional pipeline and agentic frameworks often fall short in this area because they suffer from architectural blindness and rely on greedy single-path code generation. To overcome these limitations, we propose RAIM, a multi-design and architecture-aware framework for repository-level feature addition. This framework introduces a localization mechanism that conducts multi-round explorations over a repository-scale code graph to accurately pinpoint dispersed cross-file modification targets. Crucially, RAIM shifts away from linear patching by generating multiple diverse implementation designs. The system then employs a rigorous impact-aware selection process based on static and dynamic analysis to choose the most architecturally sound patch and avoid system regressions. Comprehensive experiments on the NoCode-bench Verified dataset demonstrate that RAIM establishes a new state-of-the-art performance with a 39.47% success rate, achieving a 36.34% relative improvement over the strongest baseline. Furthermore, the approach exhibits robust generalization across various foundation models and empowers open-weight models like DeepSeek-v3.2 to surpass baseline systems powered by leading proprietary models. Detailed ablation studies confirm that the multi-design generation and impact validation modules are critical to effectively managing complex dependencies and reducing code errors. These findings highlight the vital role of structural awareness in automated software evolution.

cs.SE

Can The Mystery of The Born-Oppenheimer Electronic Current Density Be Explained With A Simple Phase Space Electronic Hamiltonian? Yes (And A Lot More Too)

We show that a phase space electronic Hamiltonian $\hat{H}_{PS}(\mathbf{X},\mathbf{P})$, parameterized by both nuclear position $\mathbf{X}$ and momentum $\mathbf{P}$, can recover not just experimental vibrational circular dichroism (VCD) signals, but also a meaningful electronic current density that explains the features of the VCD rotatory strengths. Combined with earlier demonstrations that such Hamiltonians can also recover qualitatively correct electronic momenta with electronic densities that approximately satisfy a continuity equation, the data would suggest that we have isolated a meaningful alternative approach to electronic structure theory, one that entirely avoids Born-Oppenheimer theory and frozen nuclei. While the dynamical implications of such a phase space electronic Hamiltonian are not yet known, we hypothesize that, by offering classical trajectories the conserve the total angular momentum (unlike Born-Oppenheimer theory), this new phase space electronic structure Hamiltonian may well explain some fraction of the chiral-induced spin selectivity effect.

physics.chem-ph

A Phase Space Approach to Vibrational Circular Dichroism

We show empirically that a phase-space non-Born-Oppenheimer electronic Hamiltonian approach to quantum chemistry (where the electronic Hamiltonian is parameterized by both nuclear position and momentum, (H(R,P)) is both a practical and accurate means to recover vibrational circular dichroism spectra. We further hypothesize that such a phase space approach may lead to very new dynamical physics beyond spectroscopy circular dichroism, with potential implications for understanding chiral induced spin selectivity (CISS), noting that classical phase space approaches conserve the total nuclear plus electronic momentum, whereas classical Born-Oppenheimer approaches do not (they conserve only the nuclear momentum)

physics.chem-ph

Quantum-Electrodynamical Time-Dependent Density Functional Theory. I. A Gaussian Atomic Basis Implementation

Inspired by the formulation of quantum-electrodynamical time-dependent density functional theory (QED-TDDFT) by Rubio and coworkers, we propose an implementation that uses dimensionless amplitudes for describing the photonic contributions to QED-TDDFT electron-photon eigenstates. The leads to a symmetric QED-TDDFT coupling matrix, which is expected to facilitate the future development of analytic derivatives. Through a Gaussian atomic basis implementation of the QED-TDDFT method, we examined the effect of dipole self-energy, rotating wave approximation, and the Tamm-Dancoff approximation on the QED-TDDFT eigenstates of model compounds (ethene, formaldehyde, and benzaldehyde) in an optical cavity. We highlight, in the strong coupling regime, the role of higher-energy and off-resonance excited states with large transition dipole moments in the direction of the photonic field, which are automatically accounted for in our QED-TDDFT calculations and might substantially affect the energy and composition of polaritons associated with lower-energy electronic states.

cond-mat.mtrl-sci