Skip to main content

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:

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:

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

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 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 for build checks and the one-time PyPI setup. Licensed under BSD-3-Clause; see license.md and the retained CHENcrafts attribution.

Metadata

Release files for ztpcraft 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ztpcraft 0.2
File Size Uploaded
ztpcraft-0.2.tar.gz 116.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ztpcraft 0.2
File
ztpcraft-0.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
ztpcraft-0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
ztpcraft-0.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
ztpcraft-0.2-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
ztpcraft-0.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
ztpcraft-0.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
ztpcraft-0.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
ztpcraft-0.2-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
ztpcraft-0.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
ztpcraft-0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
ztpcraft-0.2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
ztpcraft-0.2-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details

Total release size: 4.5 MB

Release files / ztpcraft-0.2.tar.gz

Download URL ztpcraft-0.2.tar.gz
Size 116.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bd8c06188ccb4b7be8f2a3a5dd6fdd78b7b6abe1843d2f121202305075b35306
BLAKE2b-256 checksum
How to use checksums
a01f4f0db7e546046f4e760aae3721a8e13aa5ff0f7b5e16ce41bebc0766d787
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp312-cp312-win_amd64.whl

Download URL ztpcraft-0.2-cp312-cp312-win_amd64.whl
Size 205.8 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
dc83d2f1e3b6310bc707433a461f8a46e5ed8b33b855c5f068b37fc144e4bfb1
BLAKE2b-256 checksum
How to use checksums
67e65c890fbc9ee1c579d6af6d5b66a91809c36b50521a893ccb3ce7353e1df5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL ztpcraft-0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 809.9 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f82cab7daf86ab74992e150e452a4656f4d2e672cd9359c768d9b7b92eb38354
BLAKE2b-256 checksum
How to use checksums
d461bc9e429b008ee42f89ce7c94025984676ea90848770df86d6d0144657a12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL ztpcraft-0.2-cp312-cp312-macosx_11_0_arm64.whl
Size 214.2 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
54fbb428493ea1415b14f06444a8fc9b0f2b0405ec1be73e0d70ad3c1825ebf4
BLAKE2b-256 checksum
How to use checksums
34b1e11c89fd7db33d912be4f23727a36d8d35979eed0a347d56d3aa45a3554d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp312-cp312-macosx_10_13_x86_64.whl

Download URL ztpcraft-0.2-cp312-cp312-macosx_10_13_x86_64.whl
Size 229.3 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
8cdab902710926205700ee5240612e93b65111ace8f5595d4cc809447f61f69c
BLAKE2b-256 checksum
How to use checksums
3278faa1a83b4ba6f03383a3bb20a0b25c898610201cb13f082d7f6670fdea02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp311-cp311-win_amd64.whl

Download URL ztpcraft-0.2-cp311-cp311-win_amd64.whl
Size 206.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b68e9524ecd9bd5a50726029b18f697b27d3bae3aebe4d8475a5c4195016a7e4
BLAKE2b-256 checksum
How to use checksums
f3b43f65292daa382c7284408c6e048f14caea513459f508a1bac326cb15b3b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL ztpcraft-0.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 809.7 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e448074d647dfbe96a67a931ab4a6acc872282172c2b372427f2a4fe618cf3e5
BLAKE2b-256 checksum
How to use checksums
8e4d0e24f404f55446568e5179ec8c67255ad923e36ffd650ed54d4014e28a1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL ztpcraft-0.2-cp311-cp311-macosx_11_0_arm64.whl
Size 215.2 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
491def40b8aced686762f0cf16333328dda28e2af9bfa3d0040a073475a2ad81
BLAKE2b-256 checksum
How to use checksums
d88e3b99b3c487d292ceff29f6eed63f55754bf2924011fd07975e30cb064c25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp311-cp311-macosx_10_9_x86_64.whl

Download URL ztpcraft-0.2-cp311-cp311-macosx_10_9_x86_64.whl
Size 229.5 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
14e55d307fa8910c89c8ac277f8796d4fee4808cc9bc228d526810381331b273
BLAKE2b-256 checksum
How to use checksums
f57029824643b9a3986647d2da938528d267ad426c74ba6c5a6c26fda49229ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp310-cp310-win_amd64.whl

Download URL ztpcraft-0.2-cp310-cp310-win_amd64.whl
Size 206.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
43f53de34f3beee2cf2091433ae1e7602d0dce8843b355199eb6e64d3214acc9
BLAKE2b-256 checksum
How to use checksums
6ba9a0e99e2b8786f5e35799a62c017d249c18b8b5655fd7433e95673a1ead62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL ztpcraft-0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 777.2 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
692081f584067de2272ffbab085ea80b45cf2c9c240d03dedc5c183ae4555b15
BLAKE2b-256 checksum
How to use checksums
c06a2e143b61869176cd357fc65225001e2abeadcafee4d5bbbb69f20d86982a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp310-cp310-macosx_11_0_arm64.whl

Download URL ztpcraft-0.2-cp310-cp310-macosx_11_0_arm64.whl
Size 215.7 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
16aa21316ed8c2638135bea0f28701f9cb496c29c0e2faeb9b84b06f562d4851
BLAKE2b-256 checksum
How to use checksums
62c6ac70f7b0332ba0ed909cddb202f5a5f75ca89e43eac23b6ff22105a72236
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ztpcraft-0.2-cp310-cp310-macosx_10_9_x86_64.whl

Download URL ztpcraft-0.2-cp310-cp310-macosx_10_9_x86_64.whl
Size 230.0 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
74ac5c44ee6384b2e444d4d450dc9d520834e4c59035d72919a80343830585da
BLAKE2b-256 checksum
How to use checksums
be3c3234f0f43c9e49a099c8b014a33e934e563a6b23234e0709453779d970ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2 This release

13 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page