Skip to content

Commit 526ec8b

Browse files
committed
Merge branch 'master' of github.com:quantumghent/PEPSKit.jl
2 parents 36d2c1b + 31e28f7 commit 526ec8b

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/Tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
group: "${{ matrix.group }}"
4242
julia-version: "${{ matrix.version }}"
4343
os: "${{ matrix.os }}"
44-
timeout-minutes: 75
44+
timeout-minutes: 120
4545
secrets:
4646
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4747

src/algorithms/time_evolution/simpleupdate.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ function su_iter(
7070
if bipartite
7171
@assert Nr == Nc == 2
7272
end
73+
(Nr >= 2 && Nc >= 2) || throw(
74+
ArgumentError(
75+
"iPEPS unit cell size for simple update should be no smaller than (2, 2)."
76+
),
77+
)
7378
# TODO: make algorithm independent on the choice of dual in the network
7479
for (r, c) in Iterators.product(1:Nr, 1:Nc)
7580
@assert [isdual(space(peps.vertices[r, c], ax)) for ax in 1:5] == [0, 1, 1, 0, 0]
@@ -132,10 +137,6 @@ function simpleupdate(
132137
check_interval::Int=500,
133138
)
134139
time_start = time()
135-
Nr, Nc = size(peps)
136-
if bipartite
137-
@assert Nr == Nc == 2
138-
end
139140
# exponentiating the 2-site Hamiltonian gate
140141
gate = get_gate(alg.dt, ham)
141142
wtdiff = 1.0

src/states/infiniteweightpeps.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ function compare_weights(wts1::SUWeight, wts2::SUWeight)
4949
return sum(_singular_value_distance, zip(wts1.data, wts2.data)) / length(wts1)
5050
end
5151

52+
function Base.show(io::IO, ::MIME"text/plain", wts::SUWeight)
53+
println(io, typeof(wts))
54+
for idx in CartesianIndices(wts.data)
55+
println(io, Tuple(idx), ":")
56+
for (k, b) in blocks(wts.data[idx])
57+
println(io, k, " = ", diag(b))
58+
end
59+
end
60+
return nothing
61+
end
62+
5263
"""
5364
struct InfiniteWeightPEPS{T<:PEPSTensor,E<:PEPSWeight}
5465

0 commit comments

Comments
 (0)