We introduce a tensor network library designed for classical and quantum physics simulations called Cytnx (pronounced as sci-tens). This library provides almost an identical interface and syntax for both C++ and Python, allowing users to effortlessly switch between two languages. Aiming at a quick learning process for new users of tensor network algorithms, the interfaces resemble the popular Python scientific libraries like NumPy, Scipy, and PyTorch. Not only multiple global Abelian symmetries can be easily defined and implemented, Cytnx also provides a new tool called Network that allows users to store large tensor networks and perform tensor network contractions in an optimal order automatically. With the integration of cuQuantum, tensor calculations can also be executed efficiently on GPUs. We present benchmark results for tensor operations on both devices, CPU and GPU. We also discuss features and higher-level interfaces to be added in the future.
翻译:我们介绍一个专为经典和量子物理模拟设计的张量网络库,名为Cytnx(发音为"赛腾斯")。该库为C++和Python提供几乎相同的接口与语法,使用户能够轻松切换两种编程语言。为帮助张量网络算法新手快速上手,其接口借鉴了NumPy、SciPy与PyTorch等流行的Python科学计算库。Cytnx不仅支持简便定义与实现多种全局阿贝尔对称性,还提供名为Network的新工具,允许用户存储大型张量网络,并自动以最优顺序进行张量网络收缩。通过集成cuQuantum,张量计算可在GPU上高效执行。我们展示了在CPU与GPU两种设备上的张量运算基准测试结果,并探讨了未来计划新增的功能与高层接口。