JF Tools
Collection of small useful helper tools for Python by Johannes Feist.
Short Iterative Lanczos Backend Selection
The jftools.short_iterative_lanczos solver provides two backends:
numbafor array-based propagation.pythonfor the reference implementation.
Select backend behavior with the backend function argument:
auto(default): selectnumbaonly when both the Hamiltonian and the input state are compatible with the Numba implementation; otherwise fall back topython.python: force the original Python implementation.numba: force the Numba backend.
Current Numba compatibility is intentionally narrower than the Python backend:
- States must be
numpy.ndarray(converted tocomplex128) orqutip.Qobjstates. - Hamiltonians may be dense NumPy arrays, SciPy CSR matrices/arrays, callable
Hfun(t, phi, Hphi)operators working on array states, or the specialized sum-operator form(H0, (H1, f1), ...).
The Python backend uses the same NumPy/Qobj-style state handling as the reference implementation.
Example:
prop = jftools.short_iterative_lanczos.lanczos_timeprop(H, maxsteps=14, target_convg=1e-12, backend="auto")
Installation
jftools is a pure Python package again. There is no compiled extension build step.
Recommended (uv-only) workflow:
uv sync --group dev
uv run python -m pip install -e .
For a non-editable local install through uv:
uv run python -m pip install .
QuTiP Compatibility
Short iterative Lanczos targets modern QuTiP (5.x):
- QuTiP Hamiltonians are converted through
H.data.as_scipy()when available. - QuTiP state outputs preserve
dimsand state shape.
Publishing
Before publishing a new version:
- Update
__version__in jftools/init.py. - Commit the version bump.
- Build locally.
For a local packaging sanity check on your current machine only:
uv build
Metadata
Release files for jftools 0.5.2
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 |
|---|---|---|---|---|
| jftools-0.5.2.tar.gz | 105.7 kB | Without provenance | Details for jftools-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jftools-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for jftools-0.5.2-py3-none-any.whl |
Total release size: 127.0 kB
Release files / jftools-0.5.2.tar.gz
| Download URL | jftools-0.5.2.tar.gz |
|---|---|
| Size | 105.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e974acb5b80ebe75ace3a192fade212a764c89882399ec8d69cbf949d8492bb
|
|
BLAKE2b-256 checksum How to use checksums |
34c1ee6f1968131beaf7af18fdc94a0753bdcec245e500a4912f6df138cb0c10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Release files / jftools-0.5.2-py3-none-any.whl
| Download URL | jftools-0.5.2-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c56b1ad3eb1f20dda2ba31e7b4e6afd67b2f417dbc02b016b64e129a0330a4d0
|
|
BLAKE2b-256 checksum How to use checksums |
d56a4b8dade64564fcfff3d6582837b13cef5b23a2bc33151466f056bb35af95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Security for jftools 0.5.2
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.