Skip to content

Commit

Permalink
Fix modular arithmetic in ProjectedEntangledPair constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Jul 6, 2023
1 parent e5be60d commit 892eefe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Quantum/PEP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ function ProjectedEntangledPair{P,B}(
elseif dir === :r
hinds[(i, (j, mod1(j + 1, n)))]
elseif dir === :u
vinds[((mod1(i - 1, n), i), j)]
vinds[((mod1(i - 1, m), i), j)]
elseif dir === :d
vinds[((i, mod1(i + 1, n)), j)]
vinds[((i, mod1(i + 1, m)), j)]
elseif dir === :i
iinds[(i, j)]
elseif dir === :o
Expand Down

0 comments on commit 892eefe

Please sign in to comment.