paper

Finite-Dimensional Type I von Neumann Algebras in PyTorch: A GPU-Accelerated Framework for Random Block-Diagonal Operators

arXiv:2606.15882

Abstract

We present \texttt{torch\_vn\_algebra}, an open-source Python library built on PyTorch for numerical experiments with finite-dimensional Type I von Neumann algebras (direct sums of matrix algebras). The library provides: a compact batched tensor representation that handles both Monte Carlo samples and multiple direct summands; lazy evaluation of operators to avoid unnecessary memory allocation; generation of random operators with arbitrary eigenvalue distributions (user-provided samplers) and various unitary ensembles (Haar, , COE, CSE, diagonal phases); functional calculus via SVD (absolute value, square root, inverse, entropy) and a hybrid method for extreme eigenvalues (exact diagonalisation for , otherwise power iteration); three trace functionals (blunt, normalised subspace trace, and the von Neumann tracial state); GPU-accelerated batched linear algebra for moderate-scale Monte Carlo studies (e.g., samples of operators). The library is validated against analytical expectations (Haar moments, trace properties). Performance benchmarks on a Tesla P100 GPU are presented and discussed. Limitations and future work are outlined. The code is open-source.