Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ When releasing a new version, move the "Unreleased" changes to a new version sec
and the right virtual leg of `mpo[end]` and contracted the two — which at length 1 is the *same*
tensor, so it returned `O * O` on twice the physical space instead of `O`.
([#484](https://github.com/QuantumKitHub/MPSKit.jl/pull/484))
- `leading_boundary` with `IDMRG2` didn't update the left edge of the AC tensor, which could result in space mismatches depending on the truncation scheme. This is corrected for in ([#516](https://github.com/QuantumKitHub/MPSKit.jl/pull/516)).

### Performance

Expand Down
1 change: 1 addition & 0 deletions src/algorithms/statmech/idmrg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ function leading_boundary(

# update the edge
ψ.AC[:, end] .= _mul_front.(ψ.C[:, end - 1], ψ.AR[:, end])
ψ.AC[:, 1] .= _mul_tail.(ψ.AL[:, 1], ψ.C[:, 1])
ψ.AR[:, 1] .= _transpose_front.(ψ.C[:, end] .\ _transpose_tail.(ψ.AC[:, 1]))
ac2 = AC2(ψ, 0; kind = :ACAR)
h = AC2_hamiltonian(0, ψ, operator, ψ, envs; alg.backend, allocator)
Expand Down
11 changes: 11 additions & 0 deletions test/algorithms/groundstate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,15 @@ end
@test expectation_value(ψ, mpo, envs) ≈ 2.5337 atol = 1.0e-3
end
end

@testset "IDMRG2 growing bond dimension" begin
Random.seed!(1234)
V = Vect[Z2Irrep](0 => 1, 1 => 1)
O = randn(ComplexF64, V ⊗ V, V ⊗ V)
mpo = InfiniteMPO([O, O])
P = physicalspace(O)
ψ₀ = InfiniteMPS([P, P], [V, V])
ψ, envs = leading_boundary(ψ₀, mpo, IDMRG2(; verbosity = 0, maxiter = 1, trunc = truncrank(8)))
@test ψ isa InfiniteMPS
end
end
Loading