Skip to content

Commit

Permalink
Fix Vector{ITensor} to TensorNetwork conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Sep 10, 2024
1 parent 03e4a50 commit c9c8a08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/TenetITensorsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Base.convert(::Type{ITensor}, tensor::Tensor; inds=Dict{Symbol,Index}()
return ITensor(parent(tensor), indices)
end

Base.convert(::Type{TensorNetwork}, tn::Vector{ITensor}) = TensorNetwork(map(Tensor, tn))
Base.convert(::Type{TensorNetwork}, tn::Vector{ITensor}) = TensorNetwork(map(t -> convert(Tensor, t), tn))

function Base.convert(::Type{Vector{ITensor}}, tn::Tenet.AbstractTensorNetwork; inds=Dict{Symbol,Index}())
indices = merge(inds, Dict(
Expand Down

0 comments on commit c9c8a08

Please sign in to comment.