https://github.com/pasqal-io/pyqtorch
PyTorch-based state vector simulator
https://github.com/pasqal-io/pyqtorch
quantum-machine-learning torch
Last synced: 2 months ago
JSON representation
PyTorch-based state vector simulator
- Host: GitHub
- URL: https://github.com/pasqal-io/pyqtorch
- Owner: pasqal-io
- License: apache-2.0
- Created: 2022-01-25T13:09:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-03T15:50:03.000Z (2 months ago)
- Last Synced: 2025-04-03T21:38:49.192Z (2 months ago)
- Topics: quantum-machine-learning, torch
- Language: Python
- Homepage: https://pasqal-io.github.io/pyqtorch/
- Size: 5.06 MB
- Stars: 44
- Watchers: 8
- Forks: 16
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-quantum-software - PyQTorch - PyTorch-based state vector simulator designed for quantum machine learning from [Pasqal](https://www.pasqal.com). (Quantum simulators)
README
# pyqtorch
**pyqtorch** is a [PyTorch](https://pytorch.org/)-based state vector simulator designed for quantum machine learning.
It acts as the main backend for [`Qadence`](https://github.com/pasqal-io/qadence), a digital-analog quantum programming interface.
`pyqtorch` allows for writing fully differentiable quantum programs using both digital and analog operations; enabled via a intuitive, torch-based syntax.[](https://github.com/pasqal-io/pyqtorch/actions/workflows/test.yml)
[](https://opensource.org/licenses/Apache-2.0)
[](https://pypi.org/project/pyqtorch/)
## Installation guide
`pyqtorch` can be installed from PyPI with `pip` as follows:
```bash
pip install pyqtorch
```## Install from source
We recommend to use the [`hatch`](https://hatch.pypa.io/latest/) environment manager to install `pyqtorch` from source:
```bash
python -m pip install hatch# get into a shell with all the dependencies
python -m hatch shell# run a command within the virtual environment with all the dependencies
python -m hatch run python my_script.py
```Please note that `hatch` will not combine nicely with other environment managers such Conda. If you want to use Conda, install `pyqtorch` from source using `pip`:
```bash
# within the Conda environment
python -m pip install -e .
```## Contributing
Please refer to [CONTRIBUTING](CONTRIBUTING.md) to learn how to contribute to `pyqtorch`.