#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
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| Rank | Project | Score |
|---|---|---|
| 1 | transformersPython library defining open models for text, vision, audio and multimodal tasks | 94 out of 100 |
| 2 | pytorchPython tensor library with GPU support and tape-based autograd | 93 out of 100 |
| 3 | ultralyticsPython library and CLI for training and running YOLO vision models | 93 out of 100 |
| #4 | pytorch-image-modelsPyTorch library of image models, pretrained weights and training scripts | 93 out of 100 |
| #5 | supervisionPython toolkit for loading, annotating and counting computer vision detections | 92 out of 100 |