The Cytnx library for tensor networks
Kai-Hsin Wu, Chang-Teng Lin, Ke Hsu, Hao-Ti Hung, Manuel Schneider, Chia-Min Chung, Ying-Jer Kao, Pochung Chen
SciPost Phys. Codebases 53 (2025) · published 13 March 2025
- doi: 10.21468/SciPostPhysCodeb.53
- live repo (external)
- Submissions/Reports
-
This Publication is part of a bundle
When citing, cite all relevant items (e.g. for a Codebase, cite both the article and the release you used).
DOI | Type | |
---|---|---|
10.21468/SciPostPhysCodeb.53 | Article | |
10.21468/SciPostPhysCodeb.53-r1.0 | Codebase release |
Abstract
We introduce a tensor network library designed for classical and quantum physics simulations called Cytnx (pronounced as sci-tens). This library provides an almost identical interface and syntax for both C++ and Python, allowing users to effortlessly switch between the 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.
Cited by 1

Authors / Affiliations: mappings to Contributors and Organizations
See all Organizations.- 1 Kai-Hsin Wu,
- 2 Chang-Teng Lin,
- 2 Ke Hsu,
- 2 Hao-Ti Hung,
- 3 Manuel Schneider,
- 4 5 Chia-Min Chung,
- 2 Ying-Jer Kao,
- 5 6 Pochung Chen
- 1 Boston University [BU]
- 2 National Taiwan University [NTU]
- 3 國立陽明交通大學 / National Yang Ming Chiao Tung University [NYCU]
- 4 國立中山大學 / National Sun Yat-sen University [NSYSU]
- 5 國家理論科學研究中心 物理組 / National Center for Theoretical Sciences, Physics Division
- 6 National Tsing Hua University [NTHU]