Commit 1733090
Add explicit
Continuing the precompile fix from the previous commit. Several files
across `src/` call bare `hascommoninds(t1::ITensor, t2::ITensor)` or
`uniqueinds(t1::ITensor, t2::ITensor)` (both ITensors functions on
ITensor pairs — these are legitimate, not the deleted network+edge
wrappers) but don't import those names themselves. They were relying on
`abstractitensornetwork.jl`'s top-level `using ITensors: ..., hascommoninds,
unioninds, uniqueinds, ...` to bring those names into the
`ITensorNetworks` module namespace via transitive scope.
The wrapper deletion in this PR removed those imports from
`abstractitensornetwork.jl` (since the wrappers it defined were the only
local users), which in turn breaks the transitive scope downstream files
were depending on. Cold precompile fails; Revise's incremental updates
mask the problem locally.
Files updated (each gets only the names it actually uses):
- `src/apply.jl` — adds `hascommoninds` to the existing
`using ITensors: ...` line.
- `src/solvers/subspace/densitymatrix.jl` — adds
`using ITensors: hascommoninds, uniqueinds`.
- `src/solvers/applyexp.jl` — adds `using ITensors: uniqueinds`.
- `src/treetensornetworks/projttns/projttn.jl` — adds `hascommoninds`
to the existing `using ITensors: ITensor` line.
- `src/treetensornetworks/projttns/projouterprodttn.jl` — same.
`src/solvers/subspace/ortho_subspace.jl` already does bare
`using ITensors`, which brings everything into scope, so it's unaffected.
These imports made the transitive dependency that already existed
explicit. No semantic changes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>hascommoninds/uniqueinds imports where transitive scope was lost1 parent 5fe5564 commit 1733090
5 files changed
Lines changed: 6 additions & 4 deletions
File tree
- src
- solvers
- subspace
- treetensornetworks/projttns
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments