Skip to content

Refactor TensorNetwork type; add NormNetwork struct. #119

Open
jack-dunham wants to merge 112 commits into
mainfrom
jd/tensornetwork-refactor
Open

Refactor TensorNetwork type; add NormNetwork struct. #119
jack-dunham wants to merge 112 commits into
mainfrom
jd/tensornetwork-refactor

Conversation

@jack-dunham

Copy link
Copy Markdown
Contributor

This PR refactors the TensorNetwork data type to include a reverse index map, and to be stricter about it's construction and how it's tensors can be set.

This PR also adds NormNetwork type, as a wrapper around a TensorNetwork, to represent the norm of a tensor network.

JoeyT1994 and others added 30 commits January 6, 2026 09:55
Introduce `BeliefPropagationProblem` wrapper to hold the cache and the
error `diff` field.

Also simplifies some kwargs wrangling.
Also includes some fixes to the way `TensorNetwork` types are
constructed based on index structure.
…instead of trying to operate on existing graphs

The reason for this is:
- One only cares about the edges of the input graph
- A simple graph cannot be used as it "forgets" its edge names resulting
in recursion
- As shown with `TensorNetwork`, removing edges may not always be
defined.
This was caused by the change to the `cache` being backed by a directed
graph.
@jack-dunham jack-dunham force-pushed the jd/tensornetwork-refactor branch from 1310cc2 to 7c51b20 Compare June 9, 2026 20:34
Comment thread src/normnetwork.jl
Comment thread src/normnetwork.jl Outdated
Comment thread src/abstracttensornetwork.jl Outdated
Comment thread src/abstracttensornetwork.jl Outdated
Comment thread src/normnetwork.jl Outdated
Comment thread src/tensornetwork.jl Outdated
Comment thread src/tensornetwork.jl Outdated
Comment thread src/ITensorNetworksNext.jl
@jack-dunham jack-dunham marked this pull request as ready for review June 25, 2026 15:15
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.

4 participants