Skip to content

Commit a767c94

Browse files
committed
Merge remote-tracking branch 'upstream/master' into lb/initialize_env
2 parents 854aa77 + 2171fb1 commit a767c94

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/algorithms/time_evolution/simpleupdate.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,7 @@ function su_iter(
142142
state2[r, c] = _apply_sitegate(state2[r, c], gate; alg.purified)
143143
elseif length(sites) == 2
144144
(d, r, c), = _nn_bondrev(sites..., (Nr, Nc))
145-
if alg.bipartite
146-
length(sites) > 2 && error("Multi-site MPO gates are not compatible with bipartite states.")
147-
r > 1 && continue
148-
end
145+
alg.bipartite && r > 1 && continue
149146
ϵ′ = _su_iter!(state2, gate, env2, sites, alg)
150147
ϵ = max(ϵ, ϵ′)
151148
(!alg.bipartite) && continue

test/examples/heisenberg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ end
5555
@testset "C4v AD optimization with scalartype T=$T and projector_alg=$projector_alg" for (T, projector_alg) in
5656
Iterators.product([Float64, ComplexF64], [:c4v_eigh, :c4v_qr])
5757
# initialize symmetric states
58-
Random.seed!(1234567)
58+
Random.seed!(123456789)
5959
symm = RotateReflect()
6060
H′ = heisenberg_XYZ_c4v(InfiniteSquare())
6161
H = T <: Real ? real(H′) : H′

test/timeevol/tf_ising_finiteT.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ dt, nstep = 1.0e-3, 400
4444
β = dt * nstep
4545

4646
# when g = 2, β = 0.4 and 2β = 0.8 belong to two phases (without and with nonzero σᶻ)
47-
@testset "Finite-T SU (bipartite = $(bipartite))" for bipartite in (true, false)
47+
@testset "Finite-T SU (force_mpo = $(force_mpo))" for force_mpo in (false, true)
4848
# use second order Trotter decomposition
4949
symmetrize_gates = true
50+
bipartite = true
5051

5152
# PEPO approach: results at β, or T = 2.5
52-
alg = SimpleUpdate(; trunc = trunc_pepo, purified = false, bipartite)
53+
alg = SimpleUpdate(; trunc = trunc_pepo, purified = false, bipartite, force_mpo)
5354
pepo, wts, info = time_evolve(pepo0, ham, dt, nstep, alg, wts0; symmetrize_gates)
5455

5556
## BP gauge fixing
@@ -72,7 +73,7 @@ dt, nstep = 1.0e-3, 400
7273
@test isapprox(abs.(result_2β), bm_2β, rtol = 1.0e-4)
7374

7475
# Purification approach: results at 2β, or T = 1.25
75-
alg = SimpleUpdate(; trunc = trunc_pepo, purified = true, bipartite)
76+
alg = SimpleUpdate(; trunc = trunc_pepo, purified = true, bipartite, force_mpo)
7677
pepo, wts, info = time_evolve(pepo0, ham, dt, 2 * nstep, alg, wts0; symmetrize_gates)
7778
env = converge_env(InfinitePEPS(pepo), 8)
7879
result_2β′ = measure_mag(pepo, env; purified = true)

0 commit comments

Comments
 (0)