Skip to content

Commit 2819116

Browse files
authored
Fix lazy ITensor (#14)
1 parent adb429b commit 2819116

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensorNetworksNext"
22
uuid = "302f2e75-49f0-4526-aef7-d8ba550cb06c"
33
authors = ["ITensor developers <[email protected]> and contributors"]
4-
version = "0.1.9"
4+
version = "0.1.10"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"

src/lazynameddimsarrays.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ TermInterface.operation(m::Mul) = *
294294
union::Union{A, Mul{LazyNamedDimsArray{T, A}}}
295295
end
296296
function LazyNamedDimsArray(a::AbstractNamedDimsArray)
297-
return LazyNamedDimsArray{eltype(a), typeof(a)}(a)
297+
# Use `eltype(typeof(a))` for arrays that have different
298+
# runtime and compile time eltypes, like `ITensor`.
299+
return LazyNamedDimsArray{eltype(typeof(a)), typeof(a)}(a)
298300
end
299301
function LazyNamedDimsArray(a::Mul{LazyNamedDimsArray{T, A}}) where {T, A}
300302
return LazyNamedDimsArray{T, A}(a)

0 commit comments

Comments
 (0)