|
147 | 147 | ## Spaces |
148 | 148 |
|
149 | 149 | TensorKit.spacetype(::Type{P}) where {P <: InfinitePEPO} = spacetype(eltype(P)) |
150 | | -virtualspace(T::InfinitePEPO, r::Int, c::Int, h::Int, dir) = virtualspace(T[r, c, h], dir) |
151 | | -domain_physicalspace(T::InfinitePEPO, r::Int, c::Int) = domain_physicalspace(T[r, c, 1]) |
152 | | -codomain_physicalspace(T::InfinitePEPO, r::Int, c::Int) = codomain_physicalspace(T[r, c, end]) |
| 150 | +function virtualspace(T::InfinitePEPO, r::Int, c::Int, h::Int, dir) |
| 151 | + Nr, Nc, Nh = size(T) |
| 152 | + return virtualspace(T[mod1(r, Nr), mod1(c, Nc), mod1(h, Nh)], dir) |
| 153 | +end |
| 154 | +function domain_physicalspace(T::InfinitePEPO, r::Int, c::Int) |
| 155 | + Nr, Nc, = size(T) |
| 156 | + return domain_physicalspace(T[mod1(r, Nr), mod1(c, Nc), 1]) |
| 157 | +end |
| 158 | +function codomain_physicalspace(T::InfinitePEPO, r::Int, c::Int) |
| 159 | + Nr, Nc, = size(T) |
| 160 | + return codomain_physicalspace(T[mod1(r, Nr), mod1(c, Nc), end]) |
| 161 | +end |
153 | 162 | physicalspace(T::InfinitePEPO) = [physicalspace(T, row, col) for row in axes(T, 1), col in axes(T, 2)] |
154 | 163 | function physicalspace(T::InfinitePEPO, r::Int, c::Int) |
155 | 164 | codomain_physicalspace(T, r, c) == domain_physicalspace(T, r, c) || throw( |
|
0 commit comments