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
[BREAKING] Drop ttn/mps name aliases and simplify test/utils.jl
Follow-up to the IndsNetwork/graph ctor removal in the same branch.
Drop the `ttn` / `mps` short-name surface entirely (rather than narrowing it):
the surviving constructors keep the canonical `TreeTensorNetwork` name. This
covers `ttn(::OpSum, ::IndsNetwork)` (and its `eltype`-leading variant) and
`ttn(::ITensor, ::IndsNetwork)`. `mpo` continues to dispatch through to
`TreeTensorNetwork(::OpSum, ::IndsNetwork)`.
Docs: drop `ttn` / `mps` from `using ITensorNetworks` in `docs/make.jl` and
the `mps`-specific section from `tree_tensor_networks.md`; rewrite the
constructor examples in `itensor_networks.md` and `tree_tensor_networks.md`
to build link inds explicitly with `random_itensor` so they don't fall back
to `EmptyNumber` placeholders that fail the downstream `add` / `qr` /
`directsum` examples; rename `ttn` callsites to `TreeTensorNetwork` in
`solvers.md` and `experimental_methods.md`. Fixes the docs build failure
on PR #356.
`src/abstractitensornetwork.jl`: `_siteinds` now `collect`s the inds before
iterating, so the return type is a `Vector{Index}` rather than a `Tuple`.
The `IndsNetwork` `vertex_data` setter expects a vector, and the previous
behaviour produced a `Tuple` whenever a vertex's tensor had no shared
neighbour inds. Also rename `truncate(ttn) → truncate(tn)` in a docstring.
`test/utils.jl`: substantial simplification (~261 → ~75 effective lines).
Drop `random_mps`, `random_ttn`, `Op`-handling, the `generic_state` machinery,
and the `@traitfn` indirection. Surviving surface: `random_tensornetwork`
(graph or `IndsNetwork` input, eltype + distribution variants), `productstate`
(renamed from `tensornetworkstate`, since it only builds product states;
routed through `insert_linkinds` so the default `link_space` follows
`trivial_space` and stays QN-aware), and the `ModelHamiltonians` submodule.
Test callsites updated: `ttn(state, s) → TreeTensorNetwork(productstate(state, s))`,
`ttn(os, s) → TreeTensorNetwork(os, s)`, `ttn(A, is; cutoff) → TreeTensorNetwork(A, is; cutoff)`,
and `tensornetworkstate → productstate`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments