sax
Autograd and XLA for S-parameters
Decision gist · record as of 2026-08-14
Yes, if you work with S-parameter circuit simulation or photonic design. SAX is actively maintained, has no known vulnerabilities, and offers a clean functional interface built on JAX's autodiff and XLA compilation. The dependency footprint is large but manageable. Install with caution if your environment has strict dependency constraints; otherwise, it is a solid choice for frequency-domain circuit work.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.11.0; JAX installation may require additional system dependencies depending on your platform (CPU vs.
- GPU/TPU support).
- Low install friction with a pure-wheel distribution.
License · maintenance · safety
Apache Software License (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes, but there are no copyleft obligations.
last release 2026-06-09 (66 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 136,305 downloads/mo, #11,400 on PyPI
Alternatives
Verify before relying
pip install sax
import sax
import jax.numpy as jnp
def coupler(coupling=0.5):
kappa = coupling**0.5
tau = (1-coupling)**0.5
return sax.reciprocal({
("in0", "out0"): tau,
("in0", "out1"): 1j*kappa,
("in1", "out0"): 1j*kappa,
("in1", "out1"): tau,
})
result = coupler(coupling=0.3)- Whether the package's 19 dependencies can be installed together without version conflicts in typical environments.
- Performance characteristics and scalability limits for large circuit topologies or high-dimensional parameter sweeps.
What it is and what it does
SAX wraps JAX to provide a functional, dictionary-based framework for simulating and optimizing circuits described by S-parameters (scattering matrices). It was built for photonic integrated circuits but works with any frequency-domain circuit model. Rather than defining custom data structures, SAX stays close to JAX's functional paradigm: you write component models as functions returning S-dictionaries, compose them into circuits via netlists, and optimize them using JAX's autodiff and XLA compilation.
The package handles the boilerplate of circuit composition and parameter passing, allowing you to define a directional coupler, waveguide, or other component once and then combine them into larger systems like Mach-Zehnder interferometers. You can then sweep parameters (wavelength, coupling strength, length) across ranges and plot transmission spectra or use JAX's optimization tools to tune component parameters for a target response.
Use it for
- Design and simulate photonic integrated circuits by composing waveguides, couplers, and other optical components into larger systems.
- Optimize photonic circuit parameters (coupling ratios, waveguide lengths, phase shifts) to achieve target transmission or reflection spectra.
- Perform frequency-domain S-parameter analysis on arbitrary circuits without writing custom matrix algebra.
- Leverage JAX autodiff to compute gradients for circuit optimization or sensitivity analysis across wavelength ranges.
- Combine circuit simulation with machine learning workflows via JAX's ecosystem (Optax, Flax, etc.).
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with S-parameter circuit simulation or photonic design.
SAX is actively maintained, has no known vulnerabilities, and offers a clean functional interface built on JAX's autodiff and XLA compilation. The dependency footprint is large but manageable. Install with caution if your environment has strict dependency constraints; otherwise, it is a solid choice for frequency-domain circuit work.
Install
sax on PyPI
Before you install
Low install friction with a pure-wheel distribution. Active maintenance (66 days since last release) and support for current Python versions (3.11–3.14). Requires 19 runtime dependencies including JAX, NumPy, and scientific libraries; installation is straightforward but the dependency stack is substantial.
Requires Python >=3.11.0; JAX installation may require additional system dependencies depending on your platform (CPU vs. GPU/TPU support).
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes, but there are no copyleft obligations.
Quickstart
pip install sax
import sax
import jax.numpy as jnp
def coupler(coupling=0.5):
kappa = coupling**0.5
tau = (1-coupling)**0.5
return sax.reciprocal({
("in0", "out0"): tau,
("in0", "out1"): 1j*kappa,
("in1", "out0"): 1j*kappa,
("in1", "out1"): tau,
})
result = coupler(coupling=0.3)
Verify before relying
- Whether the package's 19 dependencies can be installed together without version conflicts in typical environments.
- Performance characteristics and scalability limits for large circuit topologies or high-dimensional parameter sweeps.
Package facts
| License | Apache Software License permissive |
| Python support | Supports the current Python release >=3.11.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 19 packagesjaxjaxellipjaxtypingklujaxlarkmatplotlibnatsortnetworkxnumpyoptaxorjsonpandaspydanticpyyamlscikit-rfsympytqdmtyping-extensionsxarray |
| Maintenance | Actively maintained 66 days since the last release |
| First released | |
| Downloads | 136,305 / month, #11,400 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Physics |
Evidence: sax-0.18.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “s-parameter circuit simulator”
- saxSAX is a JAX-based simulator and optimizer for S-parameter circuits,…
- gpluginsGplugins provides a plugin system for GDSFactory that enables device…
- scikit-rfscikit-rf is an object-oriented Python library for RF and microwave…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also gplugins · kfactory · jax · gdsfactory · scikit-rf · jax-cuda12-pjrt · jax-cuda13-pjrt · jaxlib · PySpice · gdsfactoryplus