Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
da6174e
Improve time evolution interface
Yue-Zhengyuan Oct 23, 2025
9e4e746
Merge remote-tracking branch 'upstream/master' into timeevol-interface
Yue-Zhengyuan Oct 23, 2025
88ced89
Update docstring
Yue-Zhengyuan Oct 23, 2025
dd3d602
Move `force_3site` into `SimpleUpdate`
Yue-Zhengyuan Oct 23, 2025
6e71ed9
Define `Base.iterate` for SimpleUpdate
Yue-Zhengyuan Oct 28, 2025
a519515
Merge remote-tracking branch 'upstream/master' into timeevol-interface
Yue-Zhengyuan Oct 28, 2025
fe4cb7a
Update tests and some examples
Yue-Zhengyuan Oct 28, 2025
b5468ee
Fix test
Yue-Zhengyuan Oct 28, 2025
f4b98a7
Minor fixes [skip ci]
Yue-Zhengyuan Oct 29, 2025
e1b8b58
Merge remote-tracking branch 'upstream/master' into timeevol-interface
Yue-Zhengyuan Nov 4, 2025
8f7dff4
Fix merge regressions
Yue-Zhengyuan Nov 4, 2025
542b58e
Restore accidentally commented tests
Yue-Zhengyuan Nov 4, 2025
6e65759
Undo unnecessary renames
Yue-Zhengyuan Nov 4, 2025
08c7dc8
Separate SU alg, state, iterator
Yue-Zhengyuan Nov 6, 2025
d8c2653
Remove `H` from TimeEvolver
Yue-Zhengyuan Nov 6, 2025
f589d9d
Add test for `timestep`
Yue-Zhengyuan Nov 6, 2025
2b8fa1f
Add docstrings
Yue-Zhengyuan Nov 6, 2025
0844b60
Update SU examples
Yue-Zhengyuan Nov 6, 2025
9e1f825
Update tests
Yue-Zhengyuan Nov 6, 2025
104ef58
Merge remote-tracking branch 'upstream/master' into timeevol-interface
Yue-Zhengyuan Nov 6, 2025
3abd2ce
Minor changes
Yue-Zhengyuan Nov 6, 2025
b5e39da
Add verbosity for TimeEvolver
Yue-Zhengyuan Nov 6, 2025
b125ed0
Store Hamiltonian in TimeEvolver
Yue-Zhengyuan Nov 10, 2025
c6baaed
Move convergence check out of TimeEvolver
Yue-Zhengyuan Nov 11, 2025
e841bf1
Restore docstrings
Yue-Zhengyuan Nov 11, 2025
ef5f353
Fix `timestep`
Yue-Zhengyuan Nov 11, 2025
5ec704e
Fix tests
Yue-Zhengyuan Nov 11, 2025
97dd420
Fix more tests
Yue-Zhengyuan Nov 11, 2025
8207b73
Finer parameters for SUState
Yue-Zhengyuan Nov 12, 2025
1d3e962
Make timestep test look better
Yue-Zhengyuan Nov 12, 2025
c323c79
Allow complex Trotter time step
Yue-Zhengyuan Nov 12, 2025
f78268d
Reorder parameters of SUState
Yue-Zhengyuan Nov 12, 2025
c6dce5c
Docstring updates
Yue-Zhengyuan Nov 13, 2025
0545de0
Change `gate_bothsides` to `purified`
Yue-Zhengyuan Nov 13, 2025
c3de149
Remove `rand` from finite-T SU tests
Yue-Zhengyuan Nov 13, 2025
7e7a60d
Move `InfiniteState`
Yue-Zhengyuan Nov 14, 2025
aeb9ada
Remove functionality to reset `iter` from `timestep`
Yue-Zhengyuan Nov 15, 2025
2e3c6c2
Docstring updates
Yue-Zhengyuan Nov 15, 2025
4553838
Reduce unicode usage
Yue-Zhengyuan Nov 15, 2025
700378f
Fix test
Yue-Zhengyuan Nov 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions examples/heisenberg_su/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,11 @@ fix a truncation error (if that can be reached by remaining below `Dbond`):

dts = [1.0e-2, 1.0e-3, 4.0e-4]
tols = [1.0e-6, 1.0e-8, 1.0e-8]
maxiter = 10000
nstep = 10000
trunc_peps = truncerror(; atol = 1.0e-10) & truncrank(Dbond)

alg = SimpleUpdate(; trunc = trunc_peps, bipartite = true)
for (dt, tol) in zip(dts, tols)
alg = SimpleUpdate(dt, tol, maxiter, trunc_peps)
global peps, wts, = simpleupdate(peps, H, alg, wts; bipartite = true)
global peps, wts, = time_evolve(peps, H, dt, nstep, alg, wts; tol, check_interval = 500)
end

md"""
Expand Down
16 changes: 7 additions & 9 deletions examples/hubbard_su/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,24 @@ maxiter = 20000

for (dt, tol, Dbond) in zip(dts, tols, Ds)
trunc = truncerror(; atol = 1.0e-10) & truncrank(Dbond)
alg = SimpleUpdate(dt, tol, maxiter, trunc)
global peps, wts, = simpleupdate(
peps, H, alg, wts; bipartite = false, check_interval = 2000
)
alg = SimpleUpdate(; trunc, bipartite = false)
global peps, wts, = time_evolve(peps, H, dt, maxiter, alg, wts; tol, check_interval = 2000)
end

md"""
## Computing the ground-state energy

In order to compute the energy expectation value with evolved PEPS, we need to converge a
CTMRG environment on it. We first converge an environment with a small enviroment dimension
and then use that to initialize another run with bigger environment dimension. We'll use
`trunc=truncrank(χ)` for that such that the dimension is increased during the second CTMRG
run:
CTMRG environment on it. We first converge an environment with a small enviroment dimension,
which is initialized using the simple update bond weights. Next we use it to initialize
another run with bigger environment dimension. The dynamic adjustment of environment dimension
is achieved by using `trunc=truncrank(χ)` with different `χ`s in the CTMRG runs:
"""

χenv₀, χenv = 6, 16
env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2)
normalize!.(peps.A, Inf)
env = CTMRGEnv(rand, Float64, peps, env_space)
env = CTMRGEnv(wts, peps)
for χ in [χenv₀, χenv]
global env, = leading_boundary(
env, peps; alg = :sequential, tol = 1.0e-8, maxiter = 50, trunc = truncrank(χ)
Expand Down
12 changes: 6 additions & 6 deletions examples/j1j2_su/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ Therefore, we shall gradually increase $J_2 / J_1$ from 0.1 to 0.5, each time in
on the previously evolved PEPS:
"""

dt, tol, maxiter = 1.0e-2, 1.0e-8, 30000
dt, tol, nstep = 1.0e-2, 1.0e-8, 30000
check_interval = 4000
trunc_peps = truncerror(; atol = 1.0e-10) & truncrank(Dbond)
alg = SimpleUpdate(dt, tol, maxiter, trunc_peps)
alg = SimpleUpdate(; trunc = trunc_peps)
for J2 in 0.1:0.1:0.5
H = real( ## convert Hamiltonian `LocalOperator` to real floats
## convert Hamiltonian `LocalOperator` to real floats
H = real(
j1_j2_model(ComplexF64, symm, InfiniteSquare(Nr, Nc); J1, J2, sublattice = false),
)
global peps, wts, = simpleupdate(peps, H, alg, wts; check_interval)
global peps, wts, = time_evolve(peps, H, dt, nstep, alg, wts; tol, check_interval)
end

md"""
Expand All @@ -69,8 +70,7 @@ tols = [1.0e-9, 1.0e-9]
J2 = 0.5
H = real(j1_j2_model(ComplexF64, symm, InfiniteSquare(Nr, Nc); J1, J2, sublattice = false))
for (dt, tol) in zip(dts, tols)
alg′ = SimpleUpdate(dt, tol, maxiter, trunc_peps)
global peps, wts, = simpleupdate(peps, H, alg′, wts; check_interval)
global peps, wts, = time_evolve(peps, H, dt, nstep, alg, wts; tol)
end

md"""
Expand Down
4 changes: 3 additions & 1 deletion src/PEPSKit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ include("algorithms/truncation/fullenv_truncation.jl")
include("algorithms/truncation/bond_truncation.jl")

include("algorithms/time_evolution/evoltools.jl")
include("algorithms/time_evolution/time_evolve.jl")
include("algorithms/time_evolution/simpleupdate.jl")
include("algorithms/time_evolution/simpleupdate3site.jl")

Expand Down Expand Up @@ -100,7 +101,8 @@ export fixedpoint

export absorb_weight
export ALSTruncation, FullEnvTruncation
export su_iter, su3site_iter, simpleupdate, SimpleUpdate
export SimpleUpdate
export TimeEvolver, timestep, time_evolve

export InfiniteSquareNetwork
export InfinitePartitionFunction
Expand Down
20 changes: 19 additions & 1 deletion src/algorithms/time_evolution/evoltools.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
const InfiniteState = Union{InfinitePEPS, InfinitePEPO}
"""
Process the Trotter time step `dt` according to the intended usage.
"""
function _get_dt(
state::InfiniteState, dt::Number, imaginary_time::Bool
)
# PEPS update: exp(-H dt)|ψ⟩
# PEPO update (purified): exp(-H dt/2)|ρ⟩
# PEPO update (not purified): exp(-H dt/2) ρ exp(-H dt/2)
dt′ = (state isa InfinitePEPS) ? dt : (dt / 2)
if (state isa InfinitePEPO)
@assert size(state)[3] == 1
end
if !imaginary_time
@assert (state isa InfinitePEPS) "Real time evolution of InfinitePEPO (Heisenberg picture) is not implemented."
dt′ = 1.0im * dt′
end
return dt′
end

function MPSKit.infinite_temperature_density_matrix(H::LocalOperator)
T = scalartype(H)
Expand Down
Loading