ScatterWorks
scatterworks is a Python package for building and solving scattering-network
models. It keeps the directed network geometry separate from the local
scattering matrices, then assembles them into global operators for spectra,
transport, and finite-device calculations.
The same network object can represent periodic unit cells and finite systems. Its explicit link basis makes local scattering templates and the flow of wave amplitudes straightforward to inspect.
Installation
ScatterWorks requires Python 3.11 or newer. Install the core package with:
pip install scatterworks
Install the optional Bokeh plotting support with:
pip install "scatterworks[plot]"
Install symbolic scattering support with:
pip install "scatterworks[symbolic]"
Install the optional MUMPS-backed sparse solver with:
pip install "scatterworks[solver]"
Optional features can be installed together. For example, to install all three extras, run:
pip install "scatterworks[plot,symbolic,solver]"
For an editable source checkout, run pip install -e .. The repository uses
Pixi for development. Build the documentation
from the repository root with:
pixi run docs-build
Quick start
A network is defined by integer rows containing a source node and a sink node:
import numpy as np
import scatterworks as sw
links = np.array(
[
[0, 1],
[1, 0],
],
dtype=int,
)
network = sw.Network(links)
print(network.links)
For a periodic model, append one integer unit-cell shift per lattice dimension to each row:
unit_cell_links = np.array(
[
[0, 1, 0, 0],
[0, 1, -1, -1],
[1, 0, 1, 0],
[1, 0, 0, 1],
],
dtype=int,
)
unit_cell = sw.Network(unit_cell_links)
After defining the topology, use
scatterworks.scattering.scattering_equations to assemble local scattering
matrices into a global operator. Lead-to-lead problems can be solved with
scatterworks.scattering.solve_scattering_equations or
scatterworks.scattering.schur_solve.
Documentation
- Start with the network model basics.
- Work through the Fabry-Perot interferometer for a small finite example.
- See the Chalker-Coddington network for a periodic unit cell.
- Follow the Kagome ribbon tutorial to cut and relink a finite strip.
- Browse the package reference for the Python API.
Metadata
Release files for scatterworks 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 |
|---|---|---|---|---|
| scatterworks-0.1.0.tar.gz | 55.9 kB | Without provenance | Details for scatterworks-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scatterworks-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for scatterworks-0.1.0-py3-none-any.whl |
Total release size: 117.8 kB
Release files / scatterworks-0.1.0.tar.gz
| Download URL | scatterworks-0.1.0.tar.gz |
|---|---|
| Size | 55.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5eb50acfd12e57dcc5b7780a97c959d72a885c2df849ff0a839aa87b92b8ceff
|
|
BLAKE2b-256 checksum How to use checksums |
b44a1f81ed107bec349107408d71d19b17024c9d8da8333257d20102451ffa25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / scatterworks-0.1.0-py3-none-any.whl
| Download URL | scatterworks-0.1.0-py3-none-any.whl |
|---|---|
| Size | 62.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cac92949cae54adc0591b66de2e05fac5ca37ddd5a98451366dae476fc9d2579
|
|
BLAKE2b-256 checksum How to use checksums |
bc1917ba44ff881c71e32ceee4c352ae4284509138f8878c75d3e7b15993ae07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for scatterworks 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.
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.