Skip to content

Commit

Permalink
Scrap eltype for CTMRGEnv, add args to similar(::PEPO)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrehmer committed Dec 11, 2024
1 parent 17eac3d commit 20a68f9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/environments/ctmrg_environments.jl
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ function Base.rot180(env::CTMRGEnv{C,T}) where {C,T}
return CTMRGEnv(copy(corners′), copy(edges′))
end

Base.eltype(env::CTMRGEnv) = eltype(env.corners[1])
Base.axes(x::CTMRGEnv, args...) = axes(x.corners, args...)
function eachcoordinate(x::CTMRGEnv)
return collect(Iterators.product(axes(x, 2), axes(x, 3)))
Expand Down
2 changes: 1 addition & 1 deletion src/operators/infinitepepo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ VectorInterface.scalartype(T::InfinitePEPO) = scalartype(T.A)

## Copy
Base.copy(T::InfinitePEPO) = InfinitePEPO(copy(T.A))
Base.similar(T::InfinitePEPO) = InfinitePEPO(similar.(T.A))
Base.similar(T::InfinitePEPO, args...) = InfinitePEPO(similar.(T.A, args...))

Check warning on line 117 in src/operators/infinitepepo.jl

View check run for this annotation

Codecov / codecov/patch

src/operators/infinitepepo.jl#L117

Added line #L117 was not covered by tests
Base.repeat(T::InfinitePEPO, counts...) = InfinitePEPO(repeat(T.A, counts...))

Base.getindex(T::InfinitePEPO, args...) = Base.getindex(T.A, args...)
Expand Down
1 change: 0 additions & 1 deletion src/states/infiniteweightpeps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ end
Mirror the unit cell of an iPEPS with weights by its anti-diagonal line.
"""
function mirror_antidiag(peps::InfiniteWeightPEPS)
Nr, Nc = size(peps)
vertices2 = mirror_antidiag(peps.vertices)
for (i, t) in enumerate(vertices2)
vertices2[i] = permute(t, ((1,), (3, 2, 5, 4)))
Expand Down

0 comments on commit 20a68f9

Please sign in to comment.