Skip to content

Conversation

Ryo-wtnb11
Copy link
Collaborator

@Ryo-wtnb11 Ryo-wtnb11 commented May 11, 2025

This PR includes the structural manipulation of a given tree as follows:

  • swap_2site(g::NamedGraph, vs::Pair{Int, Int}): swap 2 site-tensors which are specified by vs.
  • add_subtree(g::NamedGraph, v::Int, edge::NamedEdge): add (connect) a subtree, that is the partition not including v, on (with) the vertex v.

@Ryo-wtnb11
Copy link
Collaborator Author

This PR does structural searchs for reasonable TTN. We can try the crossinterpolate function of the version including the structural search.

function crossinterpolate_adaptivetree(
    ::Type{ValueType},
    f,
    localdims::Union{Vector{Int},NTuple{N,Int}},
    g::NamedGraph,
    nsearch:: Int = 10,
    initialpivots::Vector{MultiIndex} = [ones(Int, length(localdims))];
    kwargs...,
) where {ValueType,N}

The variable of nsearch is the number of structural searches that will be conducted.
This only changes the TTN structure by swapping the local two tensors so far. However you can find another proposer in newstractureproposer.jl

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