jTWA
jTWA implements the semiclassical Truncated Wigner Approximation (TWA) in python, relying on Google's jax library. This allows to write easily understandable python code without compromising on speed, as all calculations are compiled and executed on GPUs, if available.
jTWA is designed to work with bosonic systems with potentially different numbers of internal degrees of freedom.
However, basic functionalities for spin-1 systems are already available in jTWA.spin1.
Documentation & Installation
All code is documented on readthedocs. Working with jTWA is designed to be straightforward. For the installation procedure, have a look at the corresponding section in the documentation.
Getting Started: A Minimal Example
A minimal working example of the codebase can be found in the main.py located in the root of the directory.
To execute, run python main.py config.json as described in the quickstart section of the documentation.
To demonstrate the elementary features, here are the contents of the main.py:
import jax
import sys
import json
import matplotlib.pyplot as plt
jax.config.update("jax_enable_x64", True)
import jTWA
if __name__ == "__main__":
configuration_file = sys.argv[1]
with open(configuration_file) as f:
cfg = json.load(f)
spin_operators = jTWA.spin1.observables.get_spin_operators(cfg)
samples = jTWA.spin1.initState.getPolarState(cfg)
cfg = jTWA.spin1.hamiltonian.update_cfg(cfg)
hamiltonian = jTWA.spin1.hamiltonian.hamiltonian
obs = jTWA.integrate.obtain_evolution(samples, hamiltonian, spin_operators, cfg)
jTWA.util.write_data(obs, cfg)
obs = jTWA.util.read_data(cfg)
jTWA.visualization.create_visuals(obs, cfg)
plt.show()
Issues & Requests
If you encounter any issues, please open an issue or submit a pull request.
License
Metadata
Release files for jTWA 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jtwa-0.0.4.tar.gz | 1.2 MB | Without provenance | Details for jtwa-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jtwa-0.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for jtwa-0.0.4-py2.py3-none-any.whl |
Total release size: 1.3 MB
Release files / jtwa-0.0.4.tar.gz
| Download URL | jtwa-0.0.4.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f663a716082ebd5a494a03b3563b417f888672ff9ee24aee25c0fec57ea31f6
|
|
BLAKE2b-256 checksum How to use checksums |
b765af7694d26e63bd778e7d90c60bacfaa08b6fd8ab2891eb3a8971655251ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / jtwa-0.0.4-py2.py3-none-any.whl
| Download URL | jtwa-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5ff427e8be0d8bfffaa211eb23783365577712651d85bdc49e710524aa6bbe7b
|
|
BLAKE2b-256 checksum How to use checksums |
36bd8e9887eb7ae61cacf17c8cddabd7ed48cf7a06745f4329035860be36467b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for jTWA 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.