Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/generalize-projttnsum' into ge…
Browse files Browse the repository at this point in the history
…neralize-projttnsum
  • Loading branch information
b-kloss committed Feb 1, 2024
2 parents aa464bf + 1202049 commit 468cace
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/treetensornetworks/projttns/projttnsum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ terms(P::ProjTTNSum) = P.terms

copy(P::ProjTTNSum) = ProjTTNSum(copy.(terms(P)))

ProjTTNSum(ttnos::Vector{<:TTN}) = ProjTTNSum([ProjTTN(M) for M in ttnos])
ProjTTNSum(operators::Vector{<:AbstractTTN}) = ProjTTNSum(ProjTTN.(operators))

on_edge(P::ProjTTNSum) = on_edge(terms(P)[1])

nsite(P::ProjTTNSum) = nsite(terms(P)[1])

function set_nsite(Ps::ProjTTNSum, nsite)
return ProjTTNSum(map(M -> set_nsite(M, nsite), Ps.terms))
return ProjTTNSum(map(p -> set_nsite(p, nsite), terms(Ps)))
end

underlying_graph(P::ProjTTNSum) = underlying_graph(terms(P)[1])
Expand Down

0 comments on commit 468cace

Please sign in to comment.