paper

From Paper to Program: Specification-Guided Implementation of Quantum Many-Body Algorithms with Large Language Model

arXiv:2604.04089

Abstract

Turning scientific papers into reliable code requires making implicit computational knowledge explicit. We introduce and evaluate a human-supervised workflow in which large language models develop and review technical specifications before implementing quantum many-body algorithms. The specifications encode conventions, procedures, scaling requirements, and validation gates for mathematical consistency, physical accuracy, and production-scale performance. For the density-matrix renormalization group, all 16 tested specification--implementation model pairings succeed, compared with 6 of 13 direct attempts; two further attempts succeed with a prose specification. For Pfaffian conversion of Hartree--Fock--Bogoliubov states to matrix product states, on eleven matched model--harness configurations, four self-paired workflow attempts pass and no direct attempts do; across all phases, 11 of 26 workflow attempts pass the audit and validation criteria. Cross-model transfer is asymmetric: one implementation model succeeds with all four specifications written by other models, whereas all four reverse-direction attempts fail. A consolidated specification informed by these experiments supports successful implementations in three previously unsuccessful model--harness configurations. Technical specifications therefore guide scalable implementation and help distinguish paper-to-code ambiguity from limitations in implementation capability. We synthesize these findings into the \emph{Paper-to-Program Many-Body} protocol, which turns implementation experience into reusable review criteria, validation gates, and reporting practices. Publicly archived prompts, transcripts, specifications, code, and validation records support independent verification and extension to other many-body algorithms.