Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scatterworks-0.1.0.tar.gz (55.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scatterworks-0.1.0-py3-none-any.whl (62.0 kB view details)

Uploaded Python 3

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

Hashes for scatterworks-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5eb50acfd12e57dcc5b7780a97c959d72a885c2df849ff0a839aa87b92b8ceff
MD5 e6a338390ef02a9456a49a6cddf434a1
BLAKE2b-256 b44a1f81ed107bec349107408d71d19b17024c9d8da8333257d20102451ffa25

See more details on using hashes here.

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

Hashes for scatterworks-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cac92949cae54adc0591b66de2e05fac5ca37ddd5a98451366dae476fc9d2579
MD5 b99f003b08f04ac2d48acacdd2cd00ea
BLAKE2b-256 bc1917ba44ff881c71e32ceee4c352ae4284509138f8878c75d3e7b15993ae07

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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