High-performance quantum simulator for matrix-free Hamiltonian evolution
Project description
Introduction
quantlop is a high-performance simulator for the time evolution of quantum systems whose Hamiltonians can be written as sparse sums of Pauli words.
It integrates with PennyLane, so Hamiltonians can be defined with familiar Python operators while the compute-intensive work runs in C++.
Rather than constructing the full Hamiltonian matrix, quantlop applies each Pauli word as a linear operator directly to the state vector.
It then uses a Krylov method to numerically approximate the action of the matrix exponential.
This matrix-free approach dramatically reduces memory usage and avoids costly dense-matrix operations, making larger simulations more practical.
Installation
The project requires Python 3.11 or later and a C++20-compatible compiler.
pip install quantlop
Usage example
import numpy as np
import pennylane as qp
import quantlop
# set number of qubits
nq = 3
# define Hamiltonian in Pauli basis
op = 0.5 * qp.Z(0) @ qp.Z(1) + 0.2 * qp.Y(0) @ qp.X(2)
ham = quantlop.Hamiltonian.from_pennylane(op, nq)
# prepare initial state vector
psi = np.zeros(2**nq, dtype=complex)
psi[0] = 1.0
# evolve state vector
evolved_psi = quantlop.evolve(ham, psi)
The function quantlop.evolve returns a new state vector corresponding to
\lvert \psi(t) \rangle = e^{-iH}\lvert \psi(0) \rangle.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quantlop-0.0.1.tar.gz.
File metadata
- Download URL: quantlop-0.0.1.tar.gz
- Upload date:
- Size: 49.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99fbb1056d1a0158db6cd029d1dfc247b99d6fd272954e7bbe6d4025344a9291
|
|
| MD5 |
760f538ee38cf561ff5d4c976e0409f1
|
|
| BLAKE2b-256 |
cc09c3864d42ed97d72ba38a925c02657a9caadc34878583a46fe188e1d09a9c
|
Provenance
The following attestation bundles were made for quantlop-0.0.1.tar.gz:
Publisher:
pypi.yml on SimoneGasperini/quantlop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quantlop-0.0.1.tar.gz -
Subject digest:
99fbb1056d1a0158db6cd029d1dfc247b99d6fd272954e7bbe6d4025344a9291 - Sigstore transparency entry: 2168520940
- Sigstore integration time:
-
Permalink:
SimoneGasperini/quantlop@1ba80807e68fcf7611b5a5aa1d53d9025236e5ad -
Branch / Tag:
refs/heads/master - Owner: https://github.com/SimoneGasperini
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@1ba80807e68fcf7611b5a5aa1d53d9025236e5ad -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file quantlop-0.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: quantlop-0.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 114.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee7ca019142c642a2194ec92a505c6c0db8f4405d6404e58b23fa32348dbafcc
|
|
| MD5 |
dcf7c6fa351d2bb4b82ac7f9792ca6d6
|
|
| BLAKE2b-256 |
6139067694a91187a71300d09154a8586ec9a49b1c26588a405592c27e78bfac
|
Provenance
The following attestation bundles were made for quantlop-0.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
pypi.yml on SimoneGasperini/quantlop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quantlop-0.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
ee7ca019142c642a2194ec92a505c6c0db8f4405d6404e58b23fa32348dbafcc - Sigstore transparency entry: 2168521008
- Sigstore integration time:
-
Permalink:
SimoneGasperini/quantlop@1ba80807e68fcf7611b5a5aa1d53d9025236e5ad -
Branch / Tag:
refs/heads/master - Owner: https://github.com/SimoneGasperini
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@1ba80807e68fcf7611b5a5aa1d53d9025236e5ad -
Trigger Event:
workflow_dispatch
-
Statement type: