#158158th of 168 in ML frameworks and librariesFor science, health and research, science

torchquantum

PyTorch library for simulating and training parameterized quantum circuits

Stars
1.7k
License
MIT
Last commit
Jul 2026
Last release
Feb 2024
Language
Jupyter Notebook
Stars, last 29 weeks+79
21 Apr 2026: 1,602 stars28 Apr 2026: 1,605 stars5 May 2026: 1,606 stars12 May 2026: 1,608 stars19 May 2026: 1,612 stars26 May 2026: 1,615 stars2 Jun 2026: 1,616 stars9 Jun 2026: 1,619 stars16 Jun 2026: 1,622 stars23 Jun 2026: 1,625 stars30 Jun 2026: 1,628 stars7 Jul 2026: 1,629 stars14 Jul 2026: 1,638 stars21 Jul 2026: 1,643 stars28 Jul 2026: 1,646 stars4 Aug 2026: 1,648 stars11 Aug 2026: 1,649 stars18 Aug 2026: 1,654 stars25 Aug 2026: 1,657 stars1 Sept 2026: 1,657 stars8 Sept 2026: 1,658 stars15 Sept 2026: 1,660 stars22 Sept 2026: 1,664 stars29 Sept 2026: 1,664 stars6 Oct 2026: 1,666 stars13 Oct 2026: 1,669 stars20 Oct 2026: 1,672 stars27 Oct 2026: 1,674 stars3 Nov 2026: 1,679 stars10 Nov 2026: 1,681 stars

1,602 on 21 Apr 20261,681 on 10 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

TorchQuantum simulates quantum circuits as PyTorch modules, using statevector simulation on CPU or GPU with batched tensors and autograd gradients. It targets quantum machine learning, VQE and QAOA research, and includes converters to deploy circuits on real IBMQ devices via Qiskit. The README says it scales to 30+ qubits with multiple GPUs.

Who it is for: Quantum ML and quantum algorithm researchers working in PyTorch

Strengths

  • Circuits are PyTorch modules, so hybrid quantum-classical models train with standard autograd
  • Batched statevector simulation on CPU or CUDA, with multi-GPU scaling to 30+ qubits
  • Exports to QASM and Qiskit for running on real IBMQ hardware
  • Examples cover MNIST QNN, VQE, QAOA, quantum kernels and on-chip parameter-shift training

Weaknesses

  • Pulse-level simulation is listed as coming soon in the feature list
  • Last release is v0.1.8 from February 2024; newer features sit on a dev branch
  • Documented Python support is 3.7 to 3.9, with a Qiskit issue noted on 3.10
  • Install is a git clone and editable install from source in the README

What it needs

  • GPU optional
  • Needs PyTorch >= 1.8.0, configargparse >= 0.14, Qiskit (for IBMQ deployment)
  • Models: statevector simulation, parameterized quantum circuits

Quick answers

Is torchquantum open source?

Yes. Its code is on GitHub under the MIT license.

Does torchquantum need a GPU?

No. It runs on a CPU and can use a GPU when you have one.

Also in ML frameworks and libraries

See all 168
Also in ML frameworks and libraries
RankProjectScore
1transformersPython library defining open models for text, vision, audio and multimodal tasks168.8k stars+1,522 (+0.9%) in 30 daysApache-2.094 out of 100
2pytorchPython tensor library with GPU support and tape-based autograd105.4k stars+1,043 (+1.0%) in 30 dayscustom license93 out of 100
3ultralyticsPython library and CLI for training and running YOLO vision models63.3k stars+1,015 (+1.6%) in 30 daysAGPL-3.093 out of 100
#4pytorch-image-modelsPyTorch library of image models, pretrained weights and training scripts37.3k stars+101 (+0.3%) in 30 daysApache-2.093 out of 100
#5supervisionPython toolkit for loading, annotating and counting computer vision detections Live demo ↗ (opens in a new tab)51.6k stars+514 (+1.0%) in 30 daysMIT92 out of 100