Skip to content

Commit 8144b60

Browse files
committed
Fix unitcell tests
1 parent 5603c2a commit 8144b60

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎src/operators/transfermatrix.jl‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ function initialize_mps(
153153
return InfiniteMPS(
154154
[
155155
f(
156-
T,
157-
virtualspaces[_prev(i, end)] * _elementwise_dual(north_virtualspace(O, i)),
158-
virtualspaces[mod1(i, end)],
159-
) for i in 1:length(O)
156+
T,
157+
virtualspaces[_prev(i, end)] * _elementwise_dual(north_virtualspace(O, i)),
158+
virtualspaces[mod1(i, end)],
159+
) for i in 1:length(O)
160160
]; kwargs...
161161
)
162162
end

‎test/testsuite/ctmrg/unitcell.jl‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Test
22
using Random
33
using PEPSKit, Adapt
4-
using PEPSKit: ctmrg_iteration, compute_gauge_fix_gauge, ScramblingEnvGauge
4+
using PEPSKit: ctmrg_iteration, compute_gauge_fix_gauge, ScramblingEnvGauge, default_allocator, SerialScheduler
55
using TensorKit
66

77
# settings
@@ -22,9 +22,10 @@ function test_unitcell(
2222
peps = adapt(AT, InfinitePEPS(randn, stype, Pspaces, Nspaces, Espaces))
2323
env = CTMRGEnv(randn, stype, peps, chis_north, chis_east, chis_south, chis_west)
2424

25+
allocator = default_allocator(n, SerialScheduler())
2526
# apply one CTMRG iteration with fixeds
26-
env′, info = ctmrg_iteration(InfiniteSquareNetwork(peps), env, ctm_alg)
27-
env″, info = ctmrg_iteration(InfiniteSquareNetwork(peps), env′, ctm_alg) # another iteration to fix spaces
27+
env′, info = ctmrg_iteration(InfiniteSquareNetwork(peps), env, ctm_alg, allocator)
28+
env″, info = ctmrg_iteration(InfiniteSquareNetwork(peps), env′, ctm_alg, allocator) # another iteration to fix spaces
2829

2930
# compute random expecation value to test matching bonds
3031
random_op = LocalOperator(

0 commit comments

Comments
 (0)