Thanks for your interest in improving src_method. Bug reports, benchmarks on
new hardware, and algorithmic improvements are all welcome.
Before we can merge your contribution, you must sign the Contributor License Agreement. The CLA bot will post a one-time comment on your first pull request with instructions; signing is a single comment on that thread and applies to all your future contributions.
Open an issue with:
- the versions of
src_method,numpyand (if relevant)cupy, - a minimal reproducer, ideally with a fixed
seed=, - the observed and expected behaviour.
For numerical-accuracy reports, please include the bond dimensions, the number
of sites, the dtype, and the error metric you used.
The repository ships a Dev Container configuration
that installs every dependency and the git hooks for you. If you would
rather set things up by hand, you need uv:
uv sync --all-groups --all-extras
uv run prek install --prepare-hooksIf your clone still carries the old pre-commit shims, add --force to
replace them.
All of these must pass before a pull request can be merged;
prek runs the first two automatically.
uv run ruff check src/ tests/ # lint
uv run ruff format --check src/ tests/
uv run pytest -m "not slow" # fast test suite
uv run pytest # full suite, including slow testsNew behaviour needs a test. Numerical changes need a test that pins the accuracy, not just the shapes.
- Keep pull requests focused on a single concern.
- Use Conventional Commits, optionally
with a gitmoji after the colon, e.g.
fix: 馃悰 trim terminal bond on the left-to-right sweep. - Update the documentation and the docstrings alongside the code.
- If the change affects performance, include before/after numbers and the hardware they were measured on.
The project targets Python 3.11+ and is checked with ruff under a strict rule
set. Public functions carry type hints and Google-style docstrings without type
annotations in the argument list. Keep lines within the configured limit and
prefer clear code over clever code.