Skip to content

Commit 60af5a4

Browse files
committed
removed too much
1 parent a165a9f commit 60af5a4

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

test/algorithms.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ module TestAlgorithms
478478
@test f f_th atol = 1.0e-10
479479

480480
O, M, E = classical_ising_tensors(beta)
481-
481+
482482
denom = expectation_value(ψ, O_mpo, envs)
483483
denom2 = expectation_value(ψ, (O_mpo, 1 => O), envs)
484484
@test denom denom2 atol = 1.0e-10

test/setup.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,20 @@ function kitaev_model(; t = 1.0, mu = 1.0, Delta = 1.0, L = Inf)
293293
end
294294
end
295295

296-
function classical_ising_tensors(beta)
296+
function ising_bond_tensor)
297297
J = 1.0
298-
K = beta * J
298+
K = β * J
299299

300300
# Boltzmann weights
301301
t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)]
302302
r = eigen(t)
303303
nt = r.vectors * sqrt(Diagonal(r.values)) * r.vectors
304+
return nt
305+
end
306+
307+
function classical_ising_tensors(beta)
308+
nt = ising_bond_tensor(beta)
309+
J = 1.0
304310

305311
# local partition function tensor
306312
δbulk = zeros(ComplexF64, (2, 2, 2, 2))
@@ -333,6 +339,7 @@ function classical_ising(; β = log(1 + sqrt(2)) / 2, L = Inf)
333339

334340
L == Inf && return InfiniteMPO([Obulk])
335341

342+
nt = ising_bond_tensor(β)
336343
δleft = zeros(ComplexF64, (1, 2, 2, 2))
337344
δleft[1, 1, 1, 1] = 1
338345
δleft[1, 2, 2, 2] = 1

0 commit comments

Comments
 (0)