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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scatterworks-0.1.0.tar.gz.
File metadata
- Download URL: scatterworks-0.1.0.tar.gz
- Upload date:
- Size: 55.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eb50acfd12e57dcc5b7780a97c959d72a885c2df849ff0a839aa87b92b8ceff
|
|
| MD5 |
e6a338390ef02a9456a49a6cddf434a1
|
|
| BLAKE2b-256 |
b44a1f81ed107bec349107408d71d19b17024c9d8da8333257d20102451ffa25
|
File details
Details for the file scatterworks-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scatterworks-0.1.0-py3-none-any.whl
- Upload date:
- Size: 62.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cac92949cae54adc0591b66de2e05fac5ca37ddd5a98451366dae476fc9d2579
|
|
| MD5 |
b99f003b08f04ac2d48acacdd2cd00ea
|
|
| BLAKE2b-256 |
bc1917ba44ff881c71e32ceee4c352ae4284509138f8878c75d3e7b15993ae07
|