Skip to content

Commit f9d029a

Browse files
committed
Remove unneeded bipartite restrictions
1 parent 24145b1 commit f9d029a

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

src/algorithms/time_evolution/ntupdate.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@ function ntu_iter(
9191
info′ = (; fid = 1.0)
9292
elseif length(sites) == 2
9393
(d, r, c), = _nn_bondrev(sites..., (Nr, Nc))
94-
if alg.bipartite
95-
length(sites) > 2 && error("Multi-site MPO gates are not compatible with bipartite states.")
96-
r > 1 && continue
97-
end
94+
alg.bipartite && r > 1 && continue
9895
state2, wts, info′ = _ntu_iter(state2, gate, wts, sites, alg)
9996
(!alg.bipartite) && continue
10097
if d == 1

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

0 commit comments

Comments
 (0)