This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.1 instead.
Reason given by maintainers: Accepts python 3.14 which fails when compiling numba kernels
twpasolver
Simulation of traveling-wave parametric amplifiers (TWPAs) with coupled mode equations (CMEs).
Scope: this release simulates kinetic-inductance TWPAs (KI-TWPAs). The cells of the line can be any linear circuit, but the only nonlinearity is that of a kinetic inductance. Josephson-junction devices are not supported yet.
- Circuit models: lumped and distributed elements, composed into unit cells, supercells and multi-segment devices. ABCD/S/Z parameters of any two-port network. User-defined models are supported.
- Linear response: Bloch wavenumber, attenuation and impedance, stopbands, transmission.
- Two gain models:
simple: the traditional forward-only CMEs of a homogeneous line. Fast, for quick sweeps and comparison with the literature.bloch: forward and backward waves in the exact Bloch-mode basis of the loaded line, with reflections at the ends from arbitrary connectors and internal reflections at the junctions between segments. Port-resolved gains (S21, S12, S11, S22). Equivalent to harmonic balance simulations in preliminary testing.
- Mode sets Automatically builds all 3WM and 4WM interactions with any number of modes and independent tones (pump harmonics, frequency conversion sidebands, multiple pumps), with the rotating-wave terms found exactly.
Documentation
Tutorials, physics notes and the API reference: https://twpalab.github.io/twpasolver/.
Installation
pip install twpasolver
The CME solvers are compiled with Numba and cached to disk on first use. Run the warmup once after installing to compile them up front (a few minutes), instead of the first time you run an analysis:
twpasolver-warmup
For development, clone the repository and install with Poetry and the pre-commit hooks:
git clone https://github.com/twpalab/twpasolver
cd twpasolver
poetry install --with docs,analysis
pre-commit install
Example
The gain of the kinetic-inductance TWPA used in the tutorials, at the pump that best phase matches the 4-12 GHz band:
import numpy as np
from twpasolver import TWPAnalysis
an = TWPAnalysis(twpa="docs/source/notebooks/imskit_v3_holotype.json", freqs=(0.2, 40, 2e-3))
pm = an.phase_matching(signal_freqs=(4, 12, 0.1), pump_freqs=(14, 18, 0.05))
result = an.gain(np.linspace(4, 12, 151), pump=pm.optimal_pump_freq, model="bloch")
print(f"pump {pm.optimal_pump_freq:.2f} GHz, mean gain {result.bandwidth()['mean_gain']:.1f} dB")
result.plot()
Citing
If you use twpasolver in published work, please cite the repository: https://github.com/twpalab/twpasolver.
License
twpasolver is licensed under the Apache License 2.0.
Metadata
Release files for twpasolver 0.1.0
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 |
|---|---|---|---|---|
| twpasolver-0.1.0.tar.gz | 88.4 kB | With provenance | Details for twpasolver-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| twpasolver-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for twpasolver-0.1.0-py3-none-any.whl |
Total release size: 192.3 kB
Release files / twpasolver-0.1.0.tar.gz
| Download URL | twpasolver-0.1.0.tar.gz |
|---|---|
| Size | 88.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
559fe78f5c40f6351dda193cea274a1741e68a5e23b17a2b5ae23a290021ea2c
|
|
BLAKE2b-256 checksum How to use checksums |
67e694eb818560a7c354a36fe7854d6922902b22ab9f76fa4fb95de7501b1ccc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / twpasolver-0.1.0-py3-none-any.whl
| Download URL | twpasolver-0.1.0-py3-none-any.whl |
|---|---|
| Size | 103.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7151dc970b187c0e24520a42acce01dea058b0ee56f257d5d8b278a73ff0588
|
|
BLAKE2b-256 checksum How to use checksums |
efbb84b52452b2997af4383f432f9e3c64b661d2ea687e356638f3b00a8ec0a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logSecurity for twpasolver 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for twpasolver-0.1.0.tar.gz
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 Nov 30, 2026.
Transparency logA 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.