Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive contraction in Tenet.transform! with Tenet.ContractSimplification() #144

Closed
Todorbsc opened this issue May 31, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Todorbsc
Copy link
Contributor

When executing

Tenet.transform!(tn::TensorNetwork, config::ContractSimplification)

with Tenet.ContractSimplification(), the targets are all the indices of the tensor network.
Maybe the error is in this line

targets = unique(Iterators.map(x -> inds(tn; parallelto=x), targets))

because of the initialization of the target indices.

The execution in a MN5 interactive node gives:

ERROR: KeyError: key :ݿ not found
Stacktrace:
 [1] getindex
   @ ./dict.jl:498 [inlined]
 [2] tensors
   @ ~/.julia/dev/Tenet/src/TensorNetwork.jl:96 [inlined]
 [3] tensors
   @ ~/.julia/dev/Tenet/src/TensorNetwork.jl:93 [inlined]
 [4] tensors(tn::TensorNetwork; kwargs::@Kwargs{intersects::Vector{Symbol}})
   @ Tenet ~/.julia/dev/Tenet/src/TensorNetwork.jl:81
 [5] tensors
   @ ~/.julia/dev/Tenet/src/TensorNetwork.jl:75 [inlined]
 [6] contract!(tn::TensorNetwork, i::Vector{Symbol})
   @ Tenet ~/.julia/dev/Tenet/src/TensorNetwork.jl:533
 [7] contract!(tn::TensorNetwork, i::Vector{Symbol})
   @ Tenet ~/.julia/dev/Tenet/src/TensorNetwork.jl:543 [inlined]
 [8] transform!(tn::TensorNetwork, config::Tenet.ContractSimplification)
   @ Tenet ~/.julia/dev/Tenet/src/Transformations.jl:153
 [9] top-level scope
   @ REPL[10]:1
@Todorbsc Todorbsc changed the title Resolve excessive contraction in Tenet.transform! with `Tenet.ContractSimplification()' Resolve excessive contraction in Tenet.transform! with Tenet.ContractSimplification() May 31, 2024
@Todorbsc Todorbsc added the bug Something isn't working label May 31, 2024
@Todorbsc Todorbsc assigned Todorbsc, mofeing and jofrevalles and unassigned Todorbsc May 31, 2024
@mofeing mofeing changed the title Resolve excessive contraction in Tenet.transform! with Tenet.ContractSimplification() Excessive contraction in Tenet.transform! with Tenet.ContractSimplification() Jun 1, 2024
mofeing added a commit that referenced this issue Jun 1, 2024
@mofeing
Copy link
Member

mofeing commented Jun 1, 2024

Fixed in dccc6f5

@mofeing mofeing closed this as completed Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants