Skip to content

Commit deba165

Browse files
committed
expand physicalspace functionality
1 parent 19dc9bd commit deba165

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/operators/infinitepepo.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ domain_physicalspace(T::InfinitePEPO, r::Int, c::Int) = domain_physicalspace(T[r
153153
function codomain_physicalspace(T::InfinitePEPO, r::Int, c::Int)
154154
return codomain_physicalspace(T[r, c, end])
155155
end
156+
physicalspace(T::InfinitePEPO) = physicalspace.(Ref(T), 1:size(T, 1), 1:size(T, 2))
156157
function physicalspace(T::InfinitePEPO, r::Int, c::Int)
157158
codomain_physicalspace(T, r, c) == domain_physicalspace(T, r, c) || throw(
158159
SpaceMismatch(

src/states/infinitepeps.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ end
137137
## Spaces
138138

139139
TensorKit.spacetype(::Type{T}) where {T <: InfinitePEPS} = spacetype(eltype(T))
140+
virtualspace(n::InfinitePEPS, dir) = virtualspace.(unitcell(n), dir)
140141
virtualspace(n::InfinitePEPS, r::Int, c::Int, dir) = virtualspace(n[r, c], dir)
142+
physicalspace(n::InfinitePEPS) = physicalspace.(unitcell(n))
141143
physicalspace(n::InfinitePEPS, r::Int, c::Int) = physicalspace(n[r, c])
142144

143145
## InfiniteSquareNetwork interface

0 commit comments

Comments
 (0)