We present NeuralMag,a flexible and high-performance open-source Python library for micromagnetic simulations.NeuralMag leverages modern machine learning frameworks,such as PyTorch and JAX,to perform efficient tensor ...We present NeuralMag,a flexible and high-performance open-source Python library for micromagnetic simulations.NeuralMag leverages modern machine learning frameworks,such as PyTorch and JAX,to perform efficient tensor operations on various parallel hardware,including CPUs,GPUs,and TPUs.The library implements a novel nodal finite-difference discretization scheme that provides improved accuracy over traditional finite-difference methods without increasing computational complexity.NeuralMag is particularly well-suited for solving inverse problems,especially those with time-dependent objectives,thanks to its automatic differentiation capabilities.Performance benchmarks show that NeuralMag is competitive with state-of-the-art simulation codes while offering enhanced flexibility through its Python interface and integration with high-level computational backends.展开更多
基金the Austrian Science Fund (FWF) 10.55776/P34671, 10.55776/I6068, 10.55776/PAT3864023, and 10.55776/PIN1434524. For open access purposes, the author has applied a CC BY public copyright license to any author-accepted manuscript version arising from this submissionThis work has been supported by the Horizon Europe research and innovation program through MaMMoS grant agreement No 101135546 and Marie Skłodowska Curie grant agreement No 101152613. We gratefully acknowledge the wedding of the Koraltans for fruitful discussions and a great time, which led to this publication.
文摘We present NeuralMag,a flexible and high-performance open-source Python library for micromagnetic simulations.NeuralMag leverages modern machine learning frameworks,such as PyTorch and JAX,to perform efficient tensor operations on various parallel hardware,including CPUs,GPUs,and TPUs.The library implements a novel nodal finite-difference discretization scheme that provides improved accuracy over traditional finite-difference methods without increasing computational complexity.NeuralMag is particularly well-suited for solving inverse problems,especially those with time-dependent objectives,thanks to its automatic differentiation capabilities.Performance benchmarks show that NeuralMag is competitive with state-of-the-art simulation codes while offering enhanced flexibility through its Python interface and integration with high-level computational backends.