Reuse & Permissions

It is not necessary to obtain permission to reuse this article or its components as it is available under the terms of the Creative Commons Attribution 4.0 International license. This license permits unrestricted use, distribution, and reproduction in any medium, provided attribution to the author(s) and the published article's title, journal citation, and DOI are maintained. Please note that some figures may have been included with permission from other third parties. It is your responsibility to obtain the proper permission from the rights holder directly for these figures.

Export citation

Export citation

Choose format for download:

Download Citation
  • Editors' Suggestion
  • Open Access

Tensor computing application programming interface: An application-oriented, lightweight API for portable high-performance tensor network computations

Rong-Yang Sun1,2,3, Tomonori Shirakawa3,4,2,5,6, Hidehiko Kohshiro3,4,7, D. N. Sheng1, and Seiji Yunoki3,4,5,8

APS Open Sci. 1, 000214 – Published 13 November, 2026

DOI: https://doi.org/10.1103/dmx5-95ny

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 backends. 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 C++ and 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 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 Cytnx and ITensor in C++, and on NumPy in Python, demonstrating its practicality and ease of integration with existing tensor-computing frameworks.

View figure in article

Physics Subject Headings (PhySH)

Article Text

References (92)

  1. J. Ignacio Cirac, D. Pérez-García, N. Schuch, and F. Verstraete, Matrix product states and projected entangled pair states: Concepts, symmetries, theorems, Rev. Mod. Phys. 93, 045003 (2021).
  2. S. R. White, Density matrix formulation for quantum renormalization groups, Phys. Rev. Lett. 69, 2863 (1992).
  3. G. Vidal, Classical simulation of infinite-size quantum lattice systems in one spatial dimension, Phys. Rev. Lett. 98, 070201 (2007).
  4. J. Haegeman, J. I. Cirac, T. J. Osborne, I. Pižorn, H. Verschelde, and F. Verstraete, Time-dependent variational principle for quantum lattices, Phys. Rev. Lett. 107, 070601 (2011).
  5. J. Haegeman, C. Lubich, I. Oseledets, B. Vandereycken, and F. Verstraete, Unifying time evolution and optimization with matrix product states, Phys. Rev. B 94, 165116 (2016).
  6. P. C. G. Vlaar and P. Corboz, Simulation of three-dimensional quantum systems with projected entangled-pair states, Phys. Rev. B 103, 205137 (2021).
  7. M. Levin and C. P. Nave, Tensor renormalization group approach to two-dimensional classical lattice models, Phys. Rev. Lett. 99, 120601 (2007).
  8. Z. Y. Xie, J. Chen, M. P. Qin, J. W. Zhu, L. P. Yang, and T. Xiang, Coarse-graining renormalization by higher-order singular value decomposition, Phys. Rev. B 86, 045139 (2012).
  9. X. Chen, Z.-C. Gu, and X.-G. Wen, Classification of gapped symmetric phases in one-dimensional spin systems, Phys. Rev. B 83, 035107 (2011).
  10. N. Schuch, D. Pérez-García, and I. Cirac, Classifying quantum phases using matrix product states and projected entangled pair states, Phys. Rev. B 84, 165139 (2011).
  11. F. Pollmann, E. Berg, A. M. Turner, and M. Oshikawa, Symmetry protection of topological phases in one-dimensional quantum spin systems, Phys. Rev. B 85, 075125 (2012).
  12. X. Chen, Z.-C. Gu, Z.-X. Liu, and X.-G. Wen, Symmetry protected topological orders and the group cohomology of their symmetry group, Phys. Rev. B 87, 155114 (2013).
  13. O. Buerschaper, M. Aguado, and G. Vidal, Explicit tensor network representation for the ground states of string-net models, Phys. Rev. B 79, 085119 (2009).
  14. J. I. Cirac, D. Poilblanc, N. Schuch, and F. Verstraete, Entanglement spectrum and boundary theories with projected entangled-pair states, Phys. Rev. B 83, 245134 (2011).
  15. M. P. Zaletel and R. S. K. Mong, Exact matrix product states for quantum Hall wave functions, Phys. Rev. B 86, 245305 (2012).
  16. M. P. Zaletel, R. S. K. Mong, and F. Pollmann, Topological characterization of fractional quantum Hall ground states from microscopic Hamiltonians, Phys. Rev. Lett. 110, 236801 (2013).
  17. H. He, H. Moradi, and X.-G. Wen, Modular matrices as topological order parameter by a gauge-symmetry-preserved tensor renormalization approach, Phys. Rev. B 90, 205114 (2014).
  18. I. L. Markov and Y. Shi, Simulating quantum computation by contracting tensor networks, SIAM J. Comput. 38, 963 (2008).
  19. Y. Zhou, E. M. Stoudenmire, and X. Waintal, What limits the simulation of quantum computers? Phys. Rev. X 10, 041038 (2020).
  20. F. Pan, K. Chen, and P. Zhang, Solving the sampling problem of the Sycamore quantum circuits, Phys. Rev. Lett. 129, 090502 (2022).
  21. J. Tindall, M. Fishman, M. Stoudenmire, and D. Sels, Efficient tensor network simulation of IBM's kicked Ising experiment, PRX Quantum 5, 010308 (2024).
  22. S. Anand, K. Temme, A. Kandala, and M. Zaletel, Classical benchmarking of zero noise extrapolation beyond the exactly-verifiable regime, arXiv:2306.17839.
  23. R.-Y. Sun, T. Shirakawa, and S. Yunoki, Improved real-space parallelizable matrix-product state compression and its application to unitary quantum dynamics simulation, Phys. Rev. B 110, 085149 (2024).
  24. Y. Liu, Y. Chen, C. Guo, J. Song, X. Shi, L. Gan, Wenzhao Wu, Wei Wu, H. Fu, X. Liu, D. Chen, Z. Zhao, G. Yang, and J. Gao, Verifying quantum advantage experiments with multiple amplitude tensor network contraction, Phys. Rev. Lett. 132, 030601 (2024).
  25. C. Oh, M. Liu, Y. Alexeev, B. Fefferman, and L. Jiang, Classical algorithm for simulating experimental Gaussian boson sampling, Nat. Phys. 20, 1461 (2024).
  26. C. Schön, E. Solano, F. Verstraete, J. I. Cirac, and M. M. Wolf, Sequential generation of entangled multiqubit states, Phys. Rev. Lett. 95, 110503 (2005).
  27. M. P. Zaletel and F. Pollmann, Isometric tensor network states in two dimensions, Phys. Rev. Lett. 124, 037201 (2020).
  28. S.-J. Ran, Encoding of matrix product states into quantum circuits of one- and two-qubit gates, Phys. Rev. A 101, 032310 (2020).
  29. R. Haghshenas, J. Gray, A. C. Potter, and G. K.-L. Chan, Variational power of quantum circuit tensor networks, Phys. Rev. X 12, 011047 (2022).
  30. Z.-Y. Wei, D. Malz, and J. I. Cirac, Sequential generation of projected entangled-pair states, Phys. Rev. Lett. 128, 010607 (2022).
  31. S. Anand, J. Hauschild, Y. Zhang, A. C. Potter, and M. P. Zaletel, Holographic quantum simulation of entanglement renormalization circuits, PRX Quantum 4, 030334 (2023).
  32. D. Malz, G. Styliaris, Z.-Y. Wei, and J. I. Cirac, Preparation of matrix product states with log-depth quantum circuits, Phys. Rev. Lett. 132, 040404 (2024).
  33. A. J. Ferris and D. Poulin, Tensor networks and quantum error correction, Phys. Rev. Lett. 113, 030501 (2014).
  34. T. Farrelly, R. J. Harris, N. A. McMahon, and T. M. Stace, Tensor-network codes, Phys. Rev. Lett. 127, 040507 (2021).
  35. C. Cao and B. Lackey, Quantum Lego: Building quantum error correction codes from tensor networks, PRX Quantum 3, 020332 (2022).
  36. Y. Guo and S. Yang, Quantum error mitigation via matrix product operators, PRX Quantum 3, 040313 (2022).
  37. S. Filippov, M. Leahy, M. A. C. Rossi, and G. García-Pérez, Scalable tensor-network error mitigation for near-term quantum computing, arXiv:2307.11740.
  38. A. Berezutskii et al., Tensor networks for quantum computing, Nat. Rev. Phys. 7, 581 (2025).
  39. M. Wang, Y. Pan, Z. Xu, G. Li, X. Yang, D. Mandic, and A. Cichocki, Tensor networks meet neural networks: A survey and future perspectives, arXiv:2302.09019.
  40. A. Zadeh, M. Chen, S. Poria, E. Cambria, and L.-P. Morency, Tensor fusion network for multimodal sentiment analysis, in Conference on Empirical Methods in Natural Language Processing (Association for Computational Linguistics, Stroudsburg, PA, 2017), pp. 1103–1114.
  41. H. Ben-Younes, R. Cadene, M. Cord, and N. Thome, Mutan: Multimodal Tucker fusion for visual question answering, in Proceedings of the IEEE International Conference on Computer Vision (IEEE, Piscataway, NJ, 2017), pp. 2631–2639.
  42. P. Zhang, Z. Su, L. Zhang, B. Wang, and D. Song, A quantum many-body wave function inspired language modeling approach, in Proceedings of the 27th ACM International Conference on Information and Knowledge Management (Association for Computing Machinery, New York, NY, 2018), pp. 1303–1312.
  43. M. Hou, J. Tang, J. Zhang, W. Kong, and Q. Zhao, Deep multimodal multilinear fusion with high-order polynomial pooling, Adv. Neural Inf. Process. Syst. 32, 12136 (2019).
  44. J. Kossaifi, A. Toisoul, A. Bulat, Y. Panagakis, T. M. Hospedales, and M. Pantic, Factorized higher-order CNNs with an application to spatio-temporal emotion estimation, in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (IEEE, Piscataway, NJ, 2020), pp. 6060–6069.
  45. A. Novikov, D. Podoprikhin, A. Osokin, and D. P. Vetrov, Tensorizing neural networks, Adv. Neural Inf. Process. Syst. 28, 442 (2015).
  46. T. Garipov, D. Podoprikhin, A. Novikov, and D. Vetrov, Ultimate tensorization: Compressing convolutional and FC layers alike, arXiv:1611.03214.
  47. E. Stoudenmire and D. J. Schwab, Supervised learning with tensor networks, Adv. Neural Inf. Process. Syst. 29, 4799 (2016).
  48. Y. Yang and T. M. Hospedales, Deep multi-task representation learning: A tensor factorisation approach, in International Conference on Learning Representations (ICLR, 2017).
  49. X. Ma, P. Zhang, S. Zhang, N. Duan, Y. Hou, D. Song, and M. Zhou, A tensorized transformer for language modeling, Adv. Neural Inf. Process. Syst. 32, 2232 (2019).
  50. K. Sozykin, A. Chertkov, R. Schutski, A.-H. Phan, A. S. Cichocki, and I. Oseledets, TTOpt: A maximum volume quantized tensor train-based optimization and its application to reinforcement learning, Adv. Neural Inf. Process. Syst. 35, 26052 (2022).
  51. Y. Qiu, A. Wang, C. Li, H. Huang, G. Zhou, and Q. Zhao, Steps: Sequential probability tensor estimation for text-to-image hard prompt search, in Proceedings of the Computer Vision and Pattern Recognition Conference (IEEE, Piscataway, NJ, 2025), pp. 28640–28650.
  52. R. Han, R. Willett, and A. R. Zhang, An optimal statistical and computational framework for generalized tensor estimation, Ann. Stat. 50, 1 (2022).
  53. A. Saiapin and K. Batselier, Tensor network based feature learning model, in Proceedings of the 28th International Conference on Artificial Intelligence and Statistics (PMLR, 2025), Vol. 258, pp. 3277–3285.
  54. V. Chekalina, G. Novikov, J. Gusak, A. Panchenko, and I. Oseledets, Efficient GPT model pre-training using tensor train matrix representation, in Proceedings of the 37th Pacific Asia Conference on Language, Information and Computation (Association for Computational Linguistics, 2023), pp. 600–608.
  55. Z. Chen, R. Dangovski, C. Loh, O. Dugan, D. Luo, and M. Soljacic, QuanTA: Efficient high-rank fine-tuning of LLMs with quantum-informed tensor adaptation, Adv. Neural Inf. Process. Syst. 37, 92210 (2024).
  56. M. Xu, Y. L. Xu, and D. P. Mandic, TensorGPT: Efficient compression of large language models based on tensor-train decomposition, arXiv:2307.00526.
  57. A. Anjum, M. E. Eren, I. Boureima, B. Alexandrov, and M. Bhattarai, Tensor train low-rank approximation (TT-LoRA): Democratizing AI with accelerated LLMs, in 2024 International Conference on Machine Learning and Applications (ICMLA) (IEEE, Piscataway, NJ, 2024), pp. 583–590.
  58. Z. Yang, Z. Liu, S. Choudhary, X. Xie, C. Gao, S. Kunzmann, and Z. Zhang, CoMERA: Computing-and memory-efficient training via rank-adaptive tensor optimization, Adv. Neural Inf. Process. Syst. 37, 77200 (2024).
  59. Z. Tao, Y. Takida, N. Murata, Q. Zhao, and Y. Mitsufuji, Transformed low-rank adaptation via tensor decomposition and its applications to text-to-image models, in Proceedings of the IEEE/CVF International Conference on Computer Vision (IEEE, Piscataway, NJ, 2025), pp. 16333–16344.
  60. W. Huggins, P. Patil, B. Mitchell, K. B. Whaley, and E. M. Stoudenmire, Towards quantum machine learning with tensor networks, Quantum Sci. Technol. 4, 024001 (2019).
  61. R. Dilip, Y.-J. Liu, A. Smith, and F. Pollmann, Data compression for quantum machine learning, Phys. Rev. Res. 4, 043007 (2022).
  62. J. Dborin, F. Barratt, V. Wimalaweera, L. Wright, and A. G. Green, Matrix product state pre-training for quantum machine learning, Quantum Sci. Technol. 7, 035014 (2022).
  63. H.-M. Rieser, F. Köster, and A. P. Raulf, Tensor networks for quantum machine learning, Proc. R. Soc. A 479, 20230218 (2023).
  64. S. Shin, Y. S. Teo, and H. Jeong, Dequantizing quantum machine learning models using tensor networks, Phys. Rev. Res. 6, 023218 (2024).
  65. M. Fishman, S. R. White, and E. M. Stoudenmire, The ITensor software library for tensor network calculations, SciPost Phys. Codebases 4 (2022).
  66. K.-H. Wu, C.-T. Lin, K. Hsu, H.-T. Hung, M. Schneider, C.-M. Chung, Y.-J. Kao, and P. Chen, The Cytnx library for tensor networks, SciPost Phys. Codebases 53 (2025).
  67. C. R. Harris et al., Array programming with NumPy, Nature (London) 585, 357 (2020).
  68. J. Bradbury et al., JAX: Composable transformations of Python + NumPy programs, 2018, https://github.com/jax-ml/jax.
  69. A. Paszke et al., PyTorch: An imperative style, high-performance deep learning library, in Advances in Neural Information Processing Systems (Curran Associates, Inc., Red Hook, NY, 2019), Vol. 32, pp. 8026–8037.
  70. TCAPI (Tensor computing application programming interface)—Cytnx backend, 2025, https://github.com/r-ccs-cms/tensor-computing-interface-backend-cytnx.
  71. TCAPI (Tensor computing application programming interface)—ITensor backend, 2026, https://github.com/AngelaHui01/tcapi_itensor.
  72. TCAPI (Tensor computing application programming interface)—NumPy backend, 2026, https://github.com/AngelaHui01/tcapi_numpy.
  73. TCAPI (Tensor computing application programming interface) specification, 2026, https://tensorcomputingapi.github.io.
  74. J. Brandejs, N. Hörnblad, E. F. Valeev, A. Heinecke, J. Hammond, D. Matthews, and P. Bientinesi, Tensor algebra processing primitives (TAPP): Towards a standard for tensor operations, arXiv:2601.07827.
  75. R. Penrose et al., Applications of negative dimensional tensors, Comb. Math. Appl. 1, 3 (1971).
  76. TNBP, 2026, https://github.com/r-ccs-cms/tnbp.
  77. P. Pfeuty, The one-dimensional Ising model with a transverse field, Ann. Phys. 57, 79 (1970).
  78. M. B. Hastings, An area law for one-dimensional quantum systems, J. Stat. Mech. (2007) P08024.
  79. P. Calabrese and J. Cardy, Entanglement entropy and quantum field theory, J. Stat. Mech. (2004) P06002.
  80. L. Tagliacozzo, T. R. de Oliveira, S. Iblisdir, and J. I. Latorre, Scaling of entanglement support for matrix product states, Phys. Rev. B 78, 024410 (2008).
  81. F. Pollmann, S. Mukerjee, A. M. Turner, and J. E. Moore, Theory of finite-entanglement scaling at one-dimensional quantum critical points, Phys. Rev. Lett. 102, 255701 (2009).
  82. Y. Kim, A. Eddins, S. Anand, K. X. Wei, E. van den Berg, S. Rosenblatt, H. Nayfeh, Y. Wu, M. Zaletel, K. Temme, and A. Kandala, Evidence for the utility of quantum computing before fault tolerance, Nature (London) 618, 500 (2023).
  83. K. Shinjo, K. Seki, T. Shirakawa, R.-Y. Sun, and S. Yunoki, Unveiling clean two-dimensional discrete time crystals on a digital quantum computer, npj Quantum Inf. 12, 41 (2026).
  84. GraceQ/tensor, accessed 29 October 2026, https://github.com/gracequantum/tensor.
  85. NVIDIA Corporation, cuTENSOR: A high-performance CUDA library for tensor primitives, 2024, https://developer.nvidia.com/cutensor.
  86. NVIDIA Corporation, cuTensorNet: A CUDA tensor network library, 2024, https://developer.nvidia.com/cutensornet.
  87. Itensors.jl, 2020, https://github.com/ITensor/ITensors.jl.
  88. Tensorkit.jl, accessed 29 October 2026, https://github.com/Jutho/TensorKit.jl.
  89. R.-Y. Sun, T. Shirakawa, H. Kohshiro, D. N. Sheng, and S. Yunoki, Supporting data, 2026, https://github.com/sun-rongyang/data-arXiv.2512.23917.
  90. A. W. Cross, L. S. Bishop, J. A. Smolin, and J. M. Gambetta, Open quantum assembly language, arXiv:1707.03429.
  91. Qiskit Community, Qiskit: An open-source framework for quantum computing, 2017, https://github.com/Qiskit/qiskit.
  92. J. Tindall and M. Fishman, Gauging tensor networks with belief propagation, SciPost Phys. 15, 222 (2023).

Outline

Information

Sign In to Your Journals Account

Filter

Filter

Article Lookup

Enter a citation