Metadata-Version: 2.4
Name: ztpcraft
Version: 0.2
Summary: Tianpu Zhao's personal toolbox
Author-email: Tianpu Zhao <pacosynthesis@gmail.com>
License-Expression: BSD-3-Clause
Project-URL: Repository, https://github.com/ZhaoTianPu/ZTPCraft
Keywords: quantum,toolbox,physics,research
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Requires-Python: <3.13,>=3.10
Description-Content-Type: text/markdown
License-File: license.md
License-File: license_chencrafts.md
Requires-Dist: matplotlib
Requires-Dist: numpy<3,>=1.26
Requires-Dist: scipy<1.14,>=1.13
Requires-Dist: tqdm
Requires-Dist: pandas
Requires-Dist: dill
Requires-Dist: pathos
Requires-Dist: psutil
Requires-Dist: scqubits>=4.3
Requires-Dist: qutip>=5
Requires-Dist: h5py>=3.10
Requires-Dist: cycler
Requires-Dist: IPython
Provides-Extra: arrays
Requires-Dist: jax>=0.4.35; extra == "arrays"
Provides-Extra: simulation
Requires-Dist: dynamiqs>=0.3; extra == "simulation"
Requires-Dist: jax>=0.4.35; extra == "simulation"
Requires-Dist: sympy; extra == "simulation"
Requires-Dist: pydantic>=2; extra == "simulation"
Provides-Extra: notebook
Requires-Dist: jupyterlab; extra == "notebook"
Requires-Dist: ipykernel; extra == "notebook"
Provides-Extra: gpu
Requires-Dist: nvidia-ml-py; extra == "gpu"
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pyright; extra == "dev"
Dynamic: license-file

# ZTPCraft

Tianpu Zhao's physics and quantum research toolbox, including fluxonium models,
fluxoid jump rates, oscillator integrals, and numerical utilities.

## Installation

After the first PyPI release, collaborators can install with:

```sh
python -m pip install ztpcraft
# To run the accompanying Jupyter notebooks:
python -m pip install 'ztpcraft[notebook]'
```

For development, clone this repository and run from its root:

```sh
python -m pip install -e '.[dev]'
```

Python 3.10–3.12 is required. The release workflow builds and tests wheels for
CPython 3.10–3.12 on Linux x86_64, macOS Apple Silicon/Intel, and Windows x86_64. SciPy is constrained to
1.13.x at build time and runtime because its Cython API changed in later versions.
Support for newer Python/SciPy versions requires updating and testing the extension.
Source builds require a C compiler; pip installs the declared Cython, NumPy, and
SciPy build dependencies automatically. On Windows, source builds require Microsoft
C++ Build Tools; installing a matching wheel does not require a compiler.
The Windows build is configured but remains unverified until its GitHub Actions
job passes. Optional JAX/dynamiqs features are outside this core wheel test matrix.

## Fluxoid jump rates

```python
from ztpcraft.projects.fluxonium.multiloop_fluxonium import (
    FluxoidSector, SectorBasis, TwoLoopFluxoidSystem,
    jump_matrix, prepare_rates, calculate_sector_rates,
)

basis = SectorBasis((FluxoidSector(0, 0), FluxoidSector(1, 0)), nlevels=3)
print(basis.size)  # six states, grouped by sector
```

See [the matrix-rate guide](ztpcraft/projects/fluxonium/multiloop_fluxonium/MATRIX_RATES.md)
for the model, operator conventions, and a complete calculation.

## Optional features

- `ztpcraft[arrays]`: JAX-based `TwoLoopArrayFluxonium` normal modes.
- `ztpcraft[simulation]`: dynamiqs/JAX simulations in the `f1f2` project.
- `ztpcraft[gpu]`: NVIDIA GPU monitoring.
- `ztpcraft[notebook]`: JupyterLab and a Python notebook kernel.

The separate `fluxonium.array_mode` module requires `ninatool`, installed separately
from its upstream source. It is loaded only when requested. Neither `ninatool` nor
JAX is needed for the fluxoid jump-rate API above. Importing an optional feature
without its dependencies raises the normal Python import error.

## Releases and license

See [RELEASING.md](RELEASING.md) for build checks and the one-time PyPI setup.
Licensed under BSD-3-Clause; see [license.md](license.md) and the retained
[CHENcrafts attribution](license_chencrafts.md).
