Tensor computing application programming interface: An application-oriented, lightweight API for portable high-performance tensor network computations
AI 摘要
arXiv:2512.23917v2 Announce Type: replace-cross Abstract: Tensor networks (TNs) are a central computational tool in quantum science and artificial intelligence. However, the lack of a unified software interface across tensor-computing frameworks severely limits the portability of TN applications, coupling algorithmic development to specific hardware and software back ends. To address this challenge, we introduce the Tensor Computing Application Programming Interface (TCAPI)---an application-oriented, lightweight API designed to enable framework-independent, high-performance TN applications, currently specified for \texttt{C++} and \texttt{Python}. TCAPI provides well-defined type-system conventions that abstract tensor objects, together with a minimal yet expressive set of core functions for essential tensor manipulations and tensor linear-algebra operations, with operation semantics shared across language specifications. Through numerical demonstrations of representative tensor-network applications implemented in \texttt{C++} using TCAPI, we show that code written against TCAPI can be migrated seamlessly across heterogeneous hardware and software platforms while achieving performance comparable to native framework implementations. We further provide open-source implementations of TCAPI based on \textit{Cytnx} and \textit{ITensor} in \texttt{C++}, and on \textit{NumPy} in \texttt{Python}, demonstrating its practicality and ease of integration with existing tensor-computing frameworks.