Skip to main content
QUICK REVIEW

[Paper Review] TensorLy-Quantum: Quantum Machine Learning with Tensor Methods

Taylor L. Patti, Jean Kossaifi|arXiv (Cornell University)|Dec 19, 2021
Parallel Computing and Optimization TechniquesComputer Science5 citations
TL;DR

TensorLy-Quantum is a PyTorch-based, GPU-accelerated quantum circuit simulator that leverages tensor network methods to enable efficient simulation of large-scale quantum circuits. By using factorized tensor representations and optimized contractions via the TensorLy ecosystem, it achieves world-record simulations of up to hundreds of qubits on a single GPU and thousands across multiple GPUs, with up to four orders of magnitude speedup over QuTiP on GPU for partial traces.

ABSTRACT

Simulation is essential for developing quantum hardware and algorithms. However, simulating quantum circuits on classical hardware is challenging due to the exponential scaling of quantum state space. While factorized tensors can greatly reduce this overhead, tensor network-based simulators are relatively few and often lack crucial functionalities. To address this deficiency, we created TensorLy-Quantum, a Python library for quantum circuit simulation that adopts the PyTorch API. Our library leverages the optimized tensor methods of the existing TensorLy ecosystem to represent, simulate, and manipulate large-scale quantum circuits. Through compact tensor representations and efficient operations, TensorLy-Quantum can scale to hundreds of qubits on a single GPU and thousands of qubits on multiple GPUs. TensorLy-Quantum is open-source and accessible at https://github.com/tensorly/quantum

Motivation & Objective

  • To address the lack of efficient, extensible, and machine learning-integrated quantum simulators that support tensor network methods.
  • To reduce the computational overhead of simulating large quantum systems by leveraging factorized tensor representations and optimized contractions.
  • To integrate advanced tensor algebra (e.g., decomposition, regression) into quantum simulation for enhanced expressivity and performance.
  • To provide a PyTorch-compatible, GPU-accelerated backend for quantum machine learning that supports automatic differentiation and scalable simulation.
  • To enable simulation of complex quantum protocols, such as MaxCut and QML with Markov Chain Monte Carlo, at scale.

Proposed method

  • The library uses a PyTorch-style API to represent quantum states, gates, and operators as factorized tensors, enabling end-to-end differentiable quantum circuit simulation.
  • It employs tensor-train (TT) and matrix-product state (MPS) representations to compactly encode quantum states and reduce memory usage exponentially with qubit count.
  • Quantum operations such as partial traces and expectation value calculations are performed directly in the factorized tensor form without reconstructing dense tensors.
  • Tensor contractions are optimized using the Opt-Einsum library and accelerated via GPU using cuQuantum, enabling high-performance computation on large-scale tensor networks.
  • The library inherits full Autograd support from PyTorch, allowing for efficient gradient computation in quantum machine learning workflows.
  • It integrates with the broader TensorLy ecosystem, enabling access to tensor decomposition, regression, and conversion tools for seamless interoperability with other scientific computing backends.

Experimental results

Research questions

  • RQ1Can tensor network-based simulation with factorized representations enable scalable quantum circuit simulation beyond the limits of dense tensor representations?
  • RQ2To what extent can GPU-accelerated tensor contractions and optimized contraction paths improve simulation performance for large-scale quantum circuits?
  • RQ3How effectively can a PyTorch-compatible, differentiable quantum simulator integrate advanced tensor algebra operations like decomposition and regression into quantum machine learning pipelines?
  • RQ4Can the library achieve world-record simulations of quantum optimization problems such as MaxCut at scale, particularly on GPU?
  • RQ5How does the performance of tensor-based simulation compare to traditional dense-state simulators like QuTiP in terms of speed and memory efficiency?

Key findings

  • TensorLy-Quantum achieves a 200x speedup on CPU and up to 40,000x speedup on GPU for partial trace operations on 20-qubit systems compared to QuTiP.
  • The library successfully simulates a 500-qubit transverse-field Ising model Hamiltonian with 5,000 gates, completing a full gradient calculation via backpropagation in under 10 seconds on a single A100 GPU.
  • It sets world records for the largest single-GPU MaxCut simulation and scales to thousands of qubits using multi-GPU setups with cuQuantum backend acceleration.
  • Without factorized tensor methods, simulating systems with just 25 qubits would require ~10^6 GB of memory, making such simulations infeasible with dense representations.
  • The integration of PyTorch Autograd enables full differentiability of quantum circuits, supporting efficient training of variational quantum algorithms.
  • The library supports novel features such as Multi-Basis Encoding for MaxCut and Markov Chain Monte Carlo-based QML, demonstrating its extensibility beyond standard quantum simulation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.