Skip to content

Commit 6c4e3f0

Browse files
Disallow dual physical spaces for symmetries with non-trivial braiding (#284)
* Disallow dual physical spaces for symmetries with non-trivial braiding * Update error message for iPEPO --------- Co-authored-by: Yue Zhengyuan <yuezy1997@icloud.com>
1 parent ded883a commit 6c4e3f0

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/operators/infinitepepo.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ struct InfinitePEPO{T <: PEPOTensor}
1212
InfinitePEPO{T}(A::Array{T, 3}) where {T} = new{T}(A)
1313
function InfinitePEPO(A::Array{T, 3}) where {T <: PEPOTensor}
1414
# space checks
15+
bosonic_braiding = BraidingStyle(sectortype(T)) === Bosonic()
1516
for (d, w, h) in Tuple.(CartesianIndices(A))
17+
(bosonic_braiding || (!isdual(domain_physicalspace(A[d, w, h])) && !isdual(codomain_physicalspace(A[d, w, h])))) ||
18+
throw(ArgumentError("Dual physical spaces for symmetry sectors with non-trivial twists are not allowed (for now)."))
1619
codomain_physicalspace(A[d, w, h]) == domain_physicalspace(A[d, w, _next(h, end)]) ||
1720
throw(SpaceMismatch("Physical space at site $((d, w, h)) does not match."))
1821
north_virtualspace(A[d, w, h]) == south_virtualspace(A[_prev(d, end), w, h])' ||

src/states/infinitepeps.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ struct InfinitePEPS{T <: PEPSTensor}
1111
A::Matrix{T}
1212
InfinitePEPS{T}(A::Matrix{T}) where {T <: PEPSTensor} = new{T}(A)
1313
function InfinitePEPS(A::Array{T, 2}) where {T <: PEPSTensor}
14+
bosonic_braiding = BraidingStyle(sectortype(T)) === Bosonic()
1415
for (d, w) in Tuple.(CartesianIndices(A))
16+
(bosonic_braiding || !isdual(physicalspace(A[d, w]))) ||
17+
throw(ArgumentError("Dual physical spaces for symmetry sectors with non-trivial twists are not allowed (for now)."))
1518
north_virtualspace(A[d, w]) == south_virtualspace(A[_prev(d, end), w])' ||
1619
throw(
1720
SpaceMismatch("North virtual space at site $((d, w)) does not match.")

0 commit comments

Comments
 (0)