IDEAS home Printed from https://ideas.repec.org/a/plo/pone00/0208510.html
   My bibliography  Save this article

qTorch: The quantum tensor contraction handler

Author

Listed:
  • E Schuyler Fried
  • Nicolas P D Sawaya
  • Yudong Cao
  • Ian D Kivlichan
  • Jhonathan Romero
  • Alán Aspuru-Guzik

Abstract

Classical simulation of quantum computation is necessary for studying the numerical behavior of quantum algorithms, as there does not yet exist a large viable quantum computer on which to perform numerical tests. Tensor network (TN) contraction is an algorithmic method that can efficiently simulate some quantum circuits, often greatly reducing the computational cost over methods that simulate the full Hilbert space. In this study we implement a tensor network contraction program for simulating quantum circuits using multi-core compute nodes. We show simulation results for the Max-Cut problem on 3- through 7-regular graphs using the quantum approximate optimization algorithm (QAOA), successfully simulating up to 100 qubits. We test two different methods for generating the ordering of tensor index contractions: one is based on the tree decomposition of the line graph, while the other generates ordering using a straight-forward stochastic scheme. Through studying instances of QAOA circuits, we show the expected result that as the treewidth of the quantum circuit’s line graph decreases, TN contraction becomes significantly more efficient than simulating the whole Hilbert space. The results in this work suggest that tensor contraction methods are superior only when simulating Max-Cut/QAOA with graphs of regularities approximately five and below. Insight into this point of equal computational cost helps one determine which simulation method will be more efficient for a given quantum circuit. The stochastic contraction method outperforms the line graph based method only when the time to calculate a reasonable tree decomposition is prohibitively expensive. Finally, we release our software package, qTorch (Quantum TensOR Contraction Handler), intended for general quantum circuit simulation. For a nontrivial subset of these quantum circuits, 50 to 100 qubits can easily be simulated on a single compute node.

Suggested Citation

  • E Schuyler Fried & Nicolas P D Sawaya & Yudong Cao & Ian D Kivlichan & Jhonathan Romero & Alán Aspuru-Guzik, 2018. "qTorch: The quantum tensor contraction handler," PLOS ONE, Public Library of Science, vol. 13(12), pages 1-20, December.
  • Handle: RePEc:plo:pone00:0208510
    DOI: 10.1371/journal.pone.0208510
    as

    Download full text from publisher

    File URL: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0208510
    Download Restriction: no

    File URL: https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0208510&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pone.0208510?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Román Orús, 2014. "Advances on tensor network theory: symmetries, fermions, entanglement, and holography," The European Physical Journal B: Condensed Matter and Complex Systems, Springer;EDP Sciences, vol. 87(11), pages 1-18, November.
    2. Alberto Peruzzo & Jarrod McClean & Peter Shadbolt & Man-Hong Yung & Xiao-Qi Zhou & Peter J. Love & Alán Aspuru-Guzik & Jeremy L. O’Brien, 2014. "A variational eigenvalue solver on a photonic quantum processor," Nature Communications, Nature, vol. 5(1), pages 1-7, September.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Abbas, Amira & Ambainis, Andris & Augustino, Brandon & Baertschi, Andreas & Buhrman, Harry & Coffrin, Carleton & Cortiana, Giorgio & Dunjko, Vedran & Egger, Daniel J. & Elmegreen, Bruce G. & Franco, N, 2024. "Challenges and opportunities in quantum optimization," Other publications TiSEM eb4b8a22-9322-4251-8802-9, Tilburg University, School of Economics and Management.
    2. Eric R. Anschuetz & Bobak T. Kiani, 2022. "Quantum variational algorithms are swamped with traps," Nature Communications, Nature, vol. 13(1), pages 1-10, December.
    3. Enrico Fontana & Dylan Herman & Shouvanik Chakrabarti & Niraj Kumar & Romina Yalovetzky & Jamie Heredge & Shree Hari Sureshbabu & Marco Pistoia, 2024. "Characterizing barren plateaus in quantum ansätze with the adjoint representation," Nature Communications, Nature, vol. 15(1), pages 1-12, December.
    4. Howard Su & Huan-Hsin Tseng, 2025. "On Quantum BSDE Solver for High-Dimensional Parabolic PDEs," Papers 2506.14612, arXiv.org, revised Sep 2025.
    5. Sitan Chen & Jordan Cotler & Hsin-Yuan Huang & Jerry Li, 2023. "The complexity of NISQ," Nature Communications, Nature, vol. 14(1), pages 1-6, December.
    6. Ajagekar, Akshay & You, Fengqi, 2022. "Quantum computing and quantum artificial intelligence for renewable and sustainable energy: A emerging prospect towards climate neutrality," Renewable and Sustainable Energy Reviews, Elsevier, vol. 165(C).
    7. Michael Ragone & Bojko N. Bakalov & Frédéric Sauvage & Alexander F. Kemper & Carlos Ortiz Marrero & Martín Larocca & M. Cerezo, 2024. "A Lie algebraic theory of barren plateaus for deep parameterized quantum circuits," Nature Communications, Nature, vol. 15(1), pages 1-10, December.
    8. Daniel J. Egger & Claudio Gambella & Jakub Marecek & Scott McFaddin & Martin Mevissen & Rudy Raymond & Andrea Simonetto & Stefan Woerner & Elena Yndurain, 2020. "Quantum Computing for Finance: State of the Art and Future Prospects," Papers 2006.14510, arXiv.org, revised Jan 2021.
    9. Huang, Chenyi & Zhang, Shibin & Chang, Yan & Yan, Lily, 2024. "Quantum metric learning with fuzzy-informed learning," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 643(C).
    10. Antoine Jacquier & Oleksiy Kondratyev & Gordon Lee & Mugad Oumgari, 2023. "Quantum Computing for Financial Mathematics," Papers 2311.06621, arXiv.org.
    11. Ke Wan & Yiwen Liu, 2023. "Hybrid Quantum Algorithms integrating QAOA, Penalty Dephasing and Zeno Effect for Solving Binary Optimization Problems with Multiple Constraints," Papers 2305.08056, arXiv.org.
    12. Xinbiao Wang & Yuxuan Du & Zhuozhuo Tu & Yong Luo & Xiao Yuan & Dacheng Tao, 2024. "Transition role of entangled data in quantum machine learning," Nature Communications, Nature, vol. 15(1), pages 1-8, December.
    13. Abha Naik & Esra Yeniaras & Gerhard Hellstern & Grishma Prasad & Sanjay Kumar Lalta Prasad Vishwakarma, 2023. "From Portfolio Optimization to Quantum Blockchain and Security: A Systematic Review of Quantum Computing in Finance," Papers 2307.01155, arXiv.org.
    14. Ye, Zi & Yu, Kai & Guo, Gong-De & Lin, Song, 2024. "Quantum self-organizing feature mapping neural network algorithm based on Grover search algorithm," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 639(C).
    15. Jose Blanchet & Mark S. Squillante & Mario Szegedy & Guanyang Wang, 2025. "Connecting Quantum Computing with Classical Stochastic Simulation," Papers 2509.18614, arXiv.org.
    16. Kamila Zaman & Alberto Marchisio & Muhammad Kashif & Muhammad Shafique, 2024. "PO-QA: A Framework for Portfolio Optimization using Quantum Algorithms," Papers 2407.19857, arXiv.org.
    17. F. H. B. Somhorst & R. Meer & M. Correa Anguita & R. Schadow & H. J. Snijders & M. Goede & B. Kassenberg & P. Venderbosch & C. Taballione & J. P. Epping & H. H. Vlekkert & J. Timmerhuis & J. F. F. Bul, 2023. "Quantum simulation of thermodynamics in an integrated quantum photonic processor," Nature Communications, Nature, vol. 14(1), pages 1-10, December.
    18. Junyu Liu & Minzhao Liu & Jin-Peng Liu & Ziyu Ye & Yunfei Wang & Yuri Alexeev & Jens Eisert & Liang Jiang, 2024. "Towards provably efficient quantum algorithms for large-scale machine-learning models," Nature Communications, Nature, vol. 15(1), pages 1-6, December.
    19. Nobuyuki Yoshioka & Mirko Amico & William Kirby & Petar Jurcevic & Arkopal Dutt & Bryce Fuller & Shelly Garion & Holger Haas & Ikko Hamamura & Alexander Ivrii & Ritajit Majumdar & Zlatko Minev & Mario, 2025. "Krylov diagonalization of large many-body Hamiltonians on a quantum processor," Nature Communications, Nature, vol. 16(1), pages 1-8, December.
    20. He, Zhimin & Deng, Maijie & Zheng, Shenggen & Li, Lvzhou & Situ, Haozhen, 2023. "GSQAS: Graph Self-supervised Quantum Architecture Search," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 630(C).

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pone00:0208510. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: plosone (email available below). General contact details of provider: https://journals.plos.org/plosone/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.