Skip to content

Commit

Permalink
Implement conj,conj! for TensorNetwork
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Feb 26, 2024
1 parent 467f6f6 commit fd489a6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/TensorNetwork.jl
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,13 @@ EinExprs.einexpr(tn::TensorNetwork; optimizer = Greedy, outputs = inds(tn, :open
kwargs...,
)

function Base.conj!(tn::TensorNetwork)
foreach(conj!, tensors(tn))
return tn
end

Base.conj(tn::TensorNetwork) = TensorNetwork(map(conj, tensors(tn)))

# TODO sequence of indices?
# TODO what if parallel neighbour indices?
"""
Expand Down

0 comments on commit fd489a6

Please sign in to comment.