Drop ITensorMPS test dep; cross-check OpSum→TTN via path-graph linearization#372
Closed
mtfishman wants to merge 1 commit into
Closed
Drop ITensorMPS test dep; cross-check OpSum→TTN via path-graph linearization#372mtfishman wants to merge 1 commit into
mtfishman wants to merge 1 commit into
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
(Closing as nonsense made by Claude.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drops
ITensorMPSfromtest/Project.toml[deps]and[compat].Continuation of #332
(which quarantined the
ITensorMPS.MPOcross-check into its own file) andP2 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 sameIndexobjectsthreaded through a new
path_siteinds(sites)helper that hands eachpre-existing Index into a
named_path_graph(N)IndsNetwork.The fermion testset's previously-broken
Tline ≈ Tttnocomparison —broken under the old MPO-side sign convention — now passes cleanly under
the same-algorithm comparison and is promoted from
@test_brokento aregular test; the
to_matrixmatricization workaround is dropped alongwith it.
File renamed to
test_opsum_to_ttn_cross_check.jl(the_mpo_qualifierno longer applies). The
replace_verticesdoc comment intest/utils.jlupdated to point at the new file.
ITensorMPSremains in the Manifest becauseITensorVisualizationBasedeclares 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-DEVprerelease accumulator).