Library for exact calculations of strongly correlated systems.
Warning
This package is currently in a preview state. The API is subject to change without advance notice. It is not recommended for production usage.
The main goal of this package is to provide an easy-to-use interface for performing precise calculations on strongly correlated systems. The package offers the following features:
- CPU/GPU agnostic code,
- Customizable system topologies, particle types, ensembles, and more,
- Support for different data types, including real/complex numbers and dense/sparse matrices.
If you encounter any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request.
We hope this library enhances your research on strongly correlated systems. Happy computing!
Install with wheel file
- Download wheel file from the releases page.
- Install wheel with
pip
pip install pystrel-0.1.0-py3-none-any.whl
Install with git
- Clone repository
git clone https://github.com/andywiecko/pystrel
- Install
flit
(if necessary)
pip install flit
- Install package (including dev tools)
flit install
Install with pip
(TBA with v1.0)
tag | Operator |
---|---|
t |
|
V |
|
Delta |
|
mu |
|
epsilon |
tag | Operator |
---|---|
Jz |
|
hz |
|
gamma |
|
hx |
This package is designed to easily switch between CPU and GPU target devices.
To enable GPU computation, you need to install CUDA
/ROCm
(depending on the GPU manufacturer) and then cupy
.
Below, you can find an example usage of the package for solving the eigenproblem of the given Hamiltonian (with periodic boundary condition):
import pystrel as ps
L = 10
J = 1.0
params = {
"sites": L,
"terms": {
'Jz': {(i, (i+1) % L): -J for i in range(L)},
'hz': {i: (-1.0)**i for i in range(L)},
},
}
model = ps.Model(params)
h = model.build_hamiltonian(device='cpu', sparsity='dense')
e, v = ps.spectrum.get_full_spectrum(h)
Visit the documentation page for more details. To learn about advanced usage, please refer to the following tutorials:
- Example 01 – Basics
- Example 02 – Dynamics
- Example 03 – $t$-$V$ model
- Example 04 – Quantum annealing
- Example 05 – Quantum braiding
Tutorial notebooks can be found and downloaded from the project repository: examples/
.
For performance benchmarking using CPU/GPU, please refer to the results available here. Keep in mind that performance may vary based on your machine's specifications and the specific problem being solved.
It's worth noting that GPUs tend to perform better with dense matrices, whereas CPUs show better performance with sparse matrices. However, in dynamic contexts, there might not be a noticeable speedup from parallelization.
Note
Please be aware that performance characteristics may change in future versions.
List of the tasks to consider before the v1.0.0
release:
- perf: state class
- perf: gpu kernels
- perf: numba acceleration
- feat: topology utils
- feat: additional terms: 3dim (tJ like), 4 dim (Hubbard like)
- feat: lioms
- feat: additional operators
- feat: parameters json/yaml load