Skip to content

Drop ITensorMPS test dep; cross-check OpSum→TTN via path-graph linearization#372

Closed
mtfishman wants to merge 1 commit into
mainfrom
mf/drop-itensormps-mpo-cross-check
Closed

Drop ITensorMPS test dep; cross-check OpSum→TTN via path-graph linearization#372
mtfishman wants to merge 1 commit into
mainfrom
mf/drop-itensormps-mpo-cross-check

Conversation

@mtfishman
Copy link
Copy Markdown
Member

Summary

  • Drops ITensorMPS from test/Project.toml [deps] and [compat].
    Continuation of #332
    (which quarantined the ITensorMPS.MPO cross-check into its own file) and
    P2 item 1 of the cleanup track in
    ITensorDevelopmentPlans tn_stack_consolidation.

  • Replaces the MPO reference with a path-graph TTN built from the same
    TreeTensorNetwork(::OpSum, ::IndsNetwork) constructor, the same OpSum
    (vertex-relabeled via replace_vertices), and the same Index objects
    threaded through a new path_siteinds(sites) helper that hands each
    pre-existing Index into a named_path_graph(N) IndsNetwork.

  • The fermion testset's previously-broken Tline ≈ Tttno comparison —
    broken under the old MPO-side sign convention — now passes cleanly under
    the same-algorithm comparison and is promoted from @test_broken to a
    regular test; the to_matrix matricization workaround is dropped along
    with it.

  • File renamed to test_opsum_to_ttn_cross_check.jl (the _mpo_ qualifier
    no longer applies). The replace_vertices doc comment in test/utils.jl
    updated to point at the new file.

ITensorMPS remains in the Manifest because ITensorVisualizationBase
declares it as a direct dep; converting that to a weakdep is a separate
upstream cleanup.

No source changes; no version bump needed (still on the 0.22.0-DEV
prerelease accumulator).

…ization

The legacy `test_opsum_to_ttn_mpo_cross_check.jl` validated
`TreeTensorNetwork(::OpSum, ::IndsNetwork)` on a comb tree by contracting
against an `ITensorMPS.MPO` built on a linearized version of the same
sites. Replace the MPO reference with a path-graph TTN built from the
same constructor, the same OpSum (`replace_vertices`-relabeled onto
`1:N`), and the same `Index` objects (carried through via the new
`path_siteinds(sites)` helper, which threads each pre-existing Index
into a `named_path_graph(N)` IndsNetwork).

Both sides now exercise the comb-tree and path-graph branches of the
same algorithm, so the comparison is a structural-invariance check
(dense Hamiltonian unchanged under TTN topology) rather than a
cross-implementation check. The fermion testset's previously-broken
`Tline ≈ Tttno` comparison — broken under the old MPO-side sign
convention — now passes cleanly and is promoted to a regular test;
the `to_matrix` matricization workaround is dropped along with it.

File renamed to `test_opsum_to_ttn_cross_check.jl` (mpo qualifier no
longer applies). `ITensorMPS` removed from `test/Project.toml` `[deps]`
and `[compat]`. The `replace_vertices` doc comment in `test/utils.jl`
updated to point at the new file.

`ITensorMPS` remains in `Manifest.toml` because
`ITensorVisualizationBase` lists it as a direct dep (likely should be a
weakdep — separate upstream cleanup).
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.91%. Comparing base (c0cb74d) to head (c27fb17).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #372      +/-   ##
==========================================
+ Coverage   76.87%   76.91%   +0.03%     
==========================================
  Files          58       58              
  Lines        2638     2638              
==========================================
+ Hits         2028     2029       +1     
+ Misses        610      609       -1     
Flag Coverage Δ
docs 51.72% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mtfishman
Copy link
Copy Markdown
Member Author

mtfishman commented May 14, 2026

(Closing as nonsense made by Claude.)

@mtfishman mtfishman closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant