You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9dad224
Browse filesBrowse the repository at this point in the historyBrowse files
feat: ❄️ add Nix flake and update dependencies (#23)
* feat: ❄️ add Nix flake dev shell
Provides a `nix develop` shell with uv, git and gh plus the native libs
binary wheels need, as an alternative to the DevContainer. Python and all
project dependencies stay managed by uv. Also drops the duplicate arXiv
link from the README abstract.
* chore: ❄️ lock and fix up the Nix flake
Validated with nix flake check --all-systems and a full dev shell run.
- Commit flake.lock, pinning nixpkgs.
- Drop x86_64-darwin: unsupported by nixpkgs-unstable since 26.11.
- Use stdenv.hostPlatform.isLinux and pkgs.nixfmt (deprecation warnings).
- Activate the venv via UV_PROJECT_ENVIRONMENT instead of sourcing
.venv/bin/activate, which hardcodes paths and misses relocated venvs.
* fix: 🐛 close the unterminated ignoreWords array in cspell.json
The file was invalid JSON, so cSpell silently fell back to its defaults.
* feat!: ⬆️ support Python 3.12-3.14, default to 3.14
numpy 2.5 requires >=3.12, so a 3.11 floor silently capped users at
numpy 2.4.x; 3.11 is also security-only until Oct 2027. Raise the floor to
3.12 and add 3.14.
- requires-python >=3.12,<3.15 and matching classifiers.
- .python-version, docpages, copilot-setup-steps and the Sonar job use 3.14.
- Test matrix covers the range ends: 3.12 and 3.14.
- ruff target-version and pyright pythonVersion track the *oldest* supported
version, so they stay one step behind the default at 3.12.
BREAKING CHANGE: Python 3.11 is no longer supported.
* fix: 🚨 single-source the ruff pin at 0.16.5
The pre-commit config still referenced the retired charliermarsh/ruff-pre-commit
mirror, but update-ruff.yml only rewrites revs for astral-sh/ruff-pre-commit, so
the hook silently stayed on v0.12.11 while pyproject moved to 0.16.5.
Point the hook at astral-sh and pin both to 0.16.5, which lets the monthly
workflow keep them in sync from now on.
Fixes the B008 this uncovered: random_mpo built its default Generator in the
signature, so every caller that omitted rng shared one generator and test data
depended on execution order.
* chore: improve wording
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ramón L. Panadés-Barrueta <rpana92@gmail.com>
* fix: 💚 keep the benchmark job on an interpreter both sides accept
The job benchmarks the base commit and the PR commit in one run, so pinning
it to 3.14 broke it: main still declares requires-python <3.14 and uv refused
to sync the base checkout. Use 3.13, which satisfies both ranges.
* fix: 💚 regenerate uv.lock after the merge from main
Git text-merged the two lockfiles and produced an ipython entry without a
source field, so every job died at 'uv sync' with:
error: Failed to parse `uv.lock`
Caused by: Dependency `ipython` has missing `source` field but has more
than one matching package
Lockfiles cannot be merged line by line; reset to main's copy and re-resolved
against the merged pyproject.
* ci: 💚 loosen the benchmark regression threshold to 25%
The comparison runs on a shared ubuntu-latest runner, where PRs that touch
no source file have drifted by 10.8%, 12.4% and 20.2%. At 10% the check
reported noise as a regression often enough to be ignored, which defeats
the point of having it.
---------
Signed-off-by: Ramón L. Panadés-Barrueta <rpana92@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
An implementation of the SRC algorithm introduced in [Camaño, Epperly and Tropp, *Quantum***10**, 2022 (2026)](https://doi.org/10.22331/q-2026-03-10-2022) ([arXiv:2504.06475](https://arxiv.org/abs/2504.06475)), extending the idea to other kinds of tensor networks.
7
+
An implementation of the SRC algorithm introduced in [Camaño, Epperly and Tropp, *Quantum***10**, 2022 (2026)](https://doi.org/10.22331/q-2026-03-10-2022), extending the idea to other kinds of tensor networks.
8
8
9
9
### Features
10
10
@@ -116,6 +116,33 @@ process is done, you will have _all_ project dependencies installed, including
116
116
> DevContainer is non-deterministic. You might have to execute the *Reload Window*
117
117
> command to get everything to work as expected after a fresh build of the container.
118
118
119
+
### Alternative: Nix flake
120
+
121
+
If you prefer [Nix] over Docker, the repository ships a `flake.nix` that provides
122
+
a development shell with [uv], [Git] and the [GitHub CLI], plus the native
123
+
libraries the binary wheels need at runtime. Python itself and all project
124
+
dependencies remain managed by `uv`.
125
+
126
+
With [flakes enabled](https://nixos.wiki/wiki/Flakes#Enable_flakes_temporarily), run:
127
+
128
+
```bash
129
+
nix develop
130
+
```
131
+
132
+
Entering the shell runs `uv sync --all-groups` and activates the uv project
133
+
environment (`$UV_PROJECT_ENVIRONMENT` if set, otherwise `.venv`), so you land
134
+
in a ready-to-use environment. GPU extras are not installed by the flake: add them
135
+
explicitly with `uv sync --all-groups --extra gpu-nvidia` (or `--all-groups --extra gpu-rocm`) on a machine with the matching drivers.
136
+
137
+
If you use [direnv], the provided `.envrc` enters the shell automatically:
138
+
139
+
```bash
140
+
direnv allow
141
+
```
142
+
143
+
Unlike the DevContainer, the Nix shell does not install the `pre-commit` hooks for
144
+
you. Run `pre-commit install --install-hooks` once after the first `nix develop`.
145
+
119
146
## Documentation
120
147
121
148
We use [MkDocs] to generate our documentation pages. You can find the latest version [at this link].
@@ -135,5 +162,9 @@ the editor will prompt you to open a new page in your browser, where you can see
135
162
[Docker]: https://docs.docker.com/get-docker/
136
163
[Visual Studio Code]: https://code.visualstudio.com/
137
164
[GitHub CLI]: https://cli.github.com/
165
+
[Git]: https://git-scm.com/
166
+
[Nix]: https://nixos.org/download/
167
+
[direnv]: https://direnv.net/
168
+
[uv]: https://docs.astral.sh/uv/
138
169
[MkDocs]: https://www.mkdocs.org/
139
170
[at this link]: https://docs.algorithmiq.fi/src_method
0 commit comments