Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
49eb37f
Add option to use pseudo-inverse to solve linear equations in `ALSTru…
Yue-Zhengyuan Jun 8, 2025
8e89e87
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Jun 11, 2025
431be7a
Fix 3-site SU `dt` and reduce artificial C4v breaking
Yue-Zhengyuan Jun 13, 2025
11e8633
Fix formatting
Yue-Zhengyuan Jun 13, 2025
71897ce
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Jun 13, 2025
28d0a4c
Add full update and example test with TF Ising
Yue-Zhengyuan Jun 13, 2025
4dd9107
Merge branch 'master' into fix-su-dt
lkdvos Jun 13, 2025
f22f5d0
Fix size of `dt`again in 3-site SU
Yue-Zhengyuan Jun 14, 2025
1227efb
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Jun 14, 2025
3519e82
Minor fix
Yue-Zhengyuan Jun 14, 2025
d8cffce
Update localoperator.jl
Yue-Zhengyuan Jun 14, 2025
97bd5ae
Change argument order in `get_expham`
Yue-Zhengyuan Jun 16, 2025
d370b26
Merge remote-tracking branch 'origin/fix-su-dt' into fullupdate
Yue-Zhengyuan Jun 16, 2025
ee1cdeb
Change argument order in `get_expham`
Yue-Zhengyuan Jun 16, 2025
9e3cdde
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Jun 17, 2025
bcd1848
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Jun 18, 2025
06a929e
Revert unintended changes
Yue-Zhengyuan Jun 18, 2025
1444ad9
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Jun 25, 2025
6bb1653
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Sep 23, 2025
82aa584
Fix formatting and change function signature
Yue-Zhengyuan Sep 23, 2025
3f916ca
Fix bond_truncate test
Yue-Zhengyuan Sep 23, 2025
8a2d71b
Merge branch 'master' into fullupdate
Yue-Zhengyuan Sep 23, 2025
ebdb668
Merge branch 'master' into fullupdate
Yue-Zhengyuan Sep 24, 2025
0c387ce
Add full update for PEPO (experimental)
Yue-Zhengyuan Sep 26, 2025
ddb077c
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Sep 26, 2025
33d1223
Fix formatting
Yue-Zhengyuan Sep 26, 2025
ba60c56
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Oct 3, 2025
9fcf0e2
Restore signature of `ctmrg_leftmove`
Yue-Zhengyuan Oct 3, 2025
5682e1c
Update construction of colmove_alg
Yue-Zhengyuan Oct 3, 2025
40aca5d
Fix FU test on tfising
Yue-Zhengyuan Oct 3, 2025
96e2fab
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Oct 8, 2025
c3b06d3
Simplify construction of colmove_alg
Yue-Zhengyuan Oct 12, 2025
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
e0fd6de
Merge remote-tracking branch 'origin/timeevol-interface' into fullupdate
Yue-Zhengyuan Nov 9, 2025
b125ed0
Store Hamiltonian in TimeEvolver
Yue-Zhengyuan Nov 10, 2025
9c0bab2
Merge remote-tracking branch 'origin/timeevol-interface' into fullupdate
Yue-Zhengyuan Nov 10, 2025
71b23f3
Adapt _pinv to new TensorKit
Yue-Zhengyuan Nov 10, 2025
3e99aac
Update real time FU test
Yue-Zhengyuan Nov 10, 2025
87893ae
Attempt to fix real time FU test
Yue-Zhengyuan Nov 11, 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
96f181b
Merge remote-tracking branch 'origin/timeevol-interface' into fullupdate
Yue-Zhengyuan Nov 12, 2025
a131181
Simplify FullUpdate algorithm struct
Yue-Zhengyuan Nov 12, 2025
8207b73
Finer parameters for SUState
Yue-Zhengyuan Nov 12, 2025
59ca240
Adapt full update to TimeEvolver interface
Yue-Zhengyuan Nov 12, 2025
f83accf
Update real time FU test
Yue-Zhengyuan Nov 12, 2025
8c769a4
Fix test
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
a4c4ec8
Remove `rand` from real time FU test
Yue-Zhengyuan Nov 14, 2025
79ae4ff
Separate convergence checking enabled FU, add finer_env_update
Yue-Zhengyuan Nov 14, 2025
60b9150
Merge remote-tracking branch 'origin/timeevol-interface' into fullupdate
Yue-Zhengyuan Nov 14, 2025
5592889
Merge remote-tracking branch 'upstream/master' into fullupdate
Yue-Zhengyuan Nov 17, 2025
9649c47
Reduce unicode usage
Yue-Zhengyuan Nov 17, 2025
9fbcdae
Fix merge regressions
Yue-Zhengyuan Nov 17, 2025
d16301a
Change definition of tol in ALS/FET
Yue-Zhengyuan Nov 17, 2025
6fe76e2
Reduce runtime of real time FU test
Yue-Zhengyuan Nov 17, 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
3 changes: 2 additions & 1 deletion src/PEPSKit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ 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")
include("algorithms/time_evolution/fullupdate.jl")

include("algorithms/transfermatrix.jl")
include("algorithms/toolbox.jl")
Expand Down Expand Up @@ -105,7 +106,7 @@ export fixedpoint

export absorb_weight
export ALSTruncation, FullEnvTruncation
export SimpleUpdate
export SimpleUpdate, FullUpdate
export TimeEvolver, timestep, time_evolve

export InfiniteSquareNetwork
Expand Down
10 changes: 10 additions & 0 deletions src/algorithms/contractions/bondenv/als_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,13 @@ function _solve_ab(
x1, info = linsolve(f, Sx, x0, 0, 1)
return x1, info
end

function _solve_ab_pinv!(
Rx::AbstractTensorMap{T, S, 2, 2}, Sx::AbstractTensorMap{T, S, 2, 1}; kwargs...
) where {T <: Number, S <: ElementarySpace}
Rx_inv, ϵ = _pinv!(copy(Rx); kwargs...)
is = filter(i -> isdual(codomain(Rx_inv, i)), 1:numout(Rx_inv))
x = Rx_inv * Sx
twist!(x, is)
return x, ϵ
end
30 changes: 22 additions & 8 deletions src/algorithms/contractions/bondenv/benv_ctm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Construct the environment (norm) tensor
C4---T3---------T3---C3 r+1
c-1 c c+1 c+2
```
where `XX = X' X` and `YY = Y' Y` (stacked together).
where `X, Y` are unitary tensors produced when finding the reduced site tensors
with `_qr_bond`; and `XX = X' X` and `YY = Y' Y` (stacked together).

Axis order: `[DX1 DY1; DX0 DY0]`, as in
```
Expand All @@ -21,7 +22,9 @@ Axis order: `[DX1 DY1; DX0 DY0]`, as in
└---------------------┘
```
"""
function bondenv_fu(row::Int, col::Int, X::PEPSOrth, Y::PEPSOrth, env::CTMRGEnv)
function bondenv_fu(
row::Int, col::Int, X::PO, Y::PO, env::CTMRGEnv
) where {PO <: Union{PEPSOrth, PEPOOrth}}
Nr, Nc = size(env.corners)[[2, 3]]
cm1 = _prev(col, Nc)
cp1 = _next(col, Nc)
Expand Down Expand Up @@ -49,12 +52,23 @@ function bondenv_fu(row::Int, col::Int, X::PEPSOrth, Y::PEPSOrth, env::CTMRGEnv)
C4--χ3--T3X---------χ5---------T3Y--χ7---C3 r+1
c-1 c c+1 c+2
=#
@autoopt @tensor benv[DX1 DY1; DX0 DY0] :=
c4[χ3 χ1] * t4[χ1 DWX0 DWX1 χ2] * c1[χ2 χ4] * t3X[χ5 DSX0 DSX1 χ3] *
X[DNX0 DX0 DSX0 DWX0] * conj(X[DNX1 DX1 DSX1 DWX1]) * t1X[χ4 DNX0 DNX1 χ6] *
c3[χ9 χ7] * t2[χ10 DEY0 DEY1 χ9] * c2[χ8 χ10] * t3Y[χ7 DSY0 DSY1 χ5] *
Y[DNY0 DEY0 DSY0 DY0] * conj(Y[DNY1 DEY1 DSY1 DY1]) * t1Y[χ6 DNY0 DNY1 χ8]

benv = nothing
if PO <: PEPSOrth
@autoopt @tensor benv[DX1 DY1; DX0 DY0] :=
c4[χ3 χ1] * t4[χ1 DWX0 DWX1 χ2] * c1[χ2 χ4] * t3X[χ5 DSX0 DSX1 χ3] *
X[DNX0 DX0 DSX0 DWX0] * conj(X[DNX1 DX1 DSX1 DWX1]) * t1X[χ4 DNX0 DNX1 χ6] *
c3[χ9 χ7] * t2[χ10 DEY0 DEY1 χ9] * c2[χ8 χ10] * t3Y[χ7 DSY0 DSY1 χ5] *
Y[DNY0 DEY0 DSY0 DY0] * conj(Y[DNY1 DEY1 DSY1 DY1]) * t1Y[χ6 DNY0 DNY1 χ8]
else
# eliminate fermion sign when contracting the remaining physical axis in X, Y
X2 = isdual(space(X, 1)) ? twist(X, 1) : X
Y2 = isdual(space(Y, 1)) ? twist(Y, 1) : Y
@autoopt @tensor benv[DX1 DY1; DX0 DY0] :=
c4[χ3 χ1] * t4[χ1 DWX0 DWX1 χ2] * c1[χ2 χ4] * t3X[χ5 DSX0 DSX1 χ3] *
X2[pX DNX0 DX0 DSX0 DWX0] * conj(X[pX DNX1 DX1 DSX1 DWX1]) * t1X[χ4 DNX0 DNX1 χ6] *
c3[χ9 χ7] * t2[χ10 DEY0 DEY1 χ9] * c2[χ8 χ10] * t3Y[χ7 DSY0 DSY1 χ5] *
Y2[pY DNY0 DEY0 DSY0 DY0] * conj(Y[pY DNY1 DEY1 DSY1 DY1]) * t1Y[χ6 DNY0 DNY1 χ8]
end
normalize!(benv, Inf)
return benv
end
31 changes: 21 additions & 10 deletions src/algorithms/contractions/bondenv/gaugefix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,13 @@ function fixgauge_benv(
end

"""
When the (half) bond environment `Z` consists of two `PEPSOrth` tensors `X`, `Y` as
When the (half) bond environment `Z` consists of
two `PEPSOrth` or `PEPOOrth` tensors `X`, `Y` as
```
┌---------------┐ ┌-------------------┐
| | = | | ,
└---Z-- --┘ └--Z0---X-- --Y--┘
┌-----------------------┐
| |
└---Z---(X)-- --(Y)---┘
```
apply the gauge transformation `Linv`, `Rinv` for `Z` to `X`, `Y`:
```
Expand All @@ -106,15 +107,25 @@ apply the gauge transformation `Linv`, `Rinv` for `Z` to `X`, `Y`:
-4 - X - 1 - Rinv - -2 -4 - Linv - 1 - Y - -2
| |
-3 -3

-2 -2
| |
-5 - X - 1 - Rinv - -3 -5 - Linv - 1 - Y - -3
| ╲ | ╲
-4 -1 -4 -1
```
"""
function _fixgauge_benvXY(
X::PEPSOrth{T, S},
Y::PEPSOrth{T, S},
Linv::AbstractTensorMap{T, S, 1, 1},
Rinv::AbstractTensorMap{T, S, 1, 1},
) where {T <: Number, S <: ElementarySpace}
X::PEPSOrth, Y::PEPSOrth, Linv::MPSBondTensor, Rinv::MPSBondTensor,
)
@plansor X[-1 -2 -3 -4] := X[-1 1 -3 -4] * Rinv[1; -2]
@plansor Y[-1 -2 -3 -4] := Y[-1 -2 -3 1] * Linv[1; -4]
return X, Y
end
function _fixgauge_benvXY(
X::PEPOOrth, Y::PEPOOrth, Linv::MPSBondTensor, Rinv::MPSBondTensor,
)
@plansor X[-1 -2 -3 -4 -5] := X[-1 -2 1 -4 -5] * Rinv[1; -3]
@plansor Y[-1 -2 -3 -4 -5] := Y[-1 -2 -3 -4 1] * Linv[1; -5]
return X, Y
end
59 changes: 59 additions & 0 deletions src/algorithms/ctmrg/sequential.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,65 @@ function ctmrg_leftmove(col::Int, network, env::CTMRGEnv, alg::SequentialCTMRG)
return env, info
end

"""
ctmrg_rightmove(col::Int, network, env::CTMRGEnv, alg::SequentialCTMRG)

Perform sequential CTMRG right move on the `col`-th column.
"""
function ctmrg_rightmove(col::Int, network, env::CTMRGEnv, alg::SequentialCTMRG)
#=
right move <---
←-- T1 ← C2 r-1
‖ ↑
=== M' = T2 r
‖ ↑
--→ T3 → C3 r+1
c c+1
=#
Nc = size(network)[2]
@assert 1 <= col <= Nc
env, info = ctmrg_leftmove(Nc + 1 - col, rot180(network), rot180(env), alg)
return rot180(env), info
end

"""
ctmrg_upmove(col::Int, network, env::CTMRGEnv, alg::SequentialCTMRG)

Perform sequential CTMRG up move on the `row`-th row.
"""
function ctmrg_upmove(row::Int, network, env::CTMRGEnv, alg::SequentialCTMRG)
#=
c-1 c c+1
r-1 C1 ← T1 ← C2
↓ ‖ ↑ | up
r T4 = M == T2 ↓ move
↓ ‖ ↑
=#
Nr = size(network)[1]
@assert 1 <= row <= Nr
env, info = ctmrg_leftmove(Nr + 1 - row, rotl90(network), rotl90(env), alg)
return rotr90(env), info
end

"""
ctmrg_downmove(col::Int, network, env::CTMRGEnv, alg::SequentialCTMRG)

Perform sequential CTMRG down move on the `row`-th row.
"""
function ctmrg_downmove(row::Int, network, env::CTMRGEnv, alg::SequentialCTMRG)
#=
↓ ‖ ↑
r T4 = M == T2 ↑ down
↓ ‖ ↑ | move
r+1 C4 → T3 → C3
c-1 c c+1
=#
Nr = size(network)[1]
@assert 1 <= row <= Nr
env, info = ctmrg_leftmove(row, rotr90(network), rotr90(env), alg)
return rotl90(env), info
end

function ctmrg_iteration(network, env::CTMRGEnv, alg::SequentialCTMRG)
truncation_error = zero(real(scalartype(network)))
condition_number = zero(real(scalartype(network)))
Expand Down
Loading
Loading