-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
I am trying to find the first excited state of the Heisenberg model using DMRG on a finite lattice leveraging SU(2) symmetry:
using MPSKit, TensorKit
# Define Heisenberg MPO
SL = -3 / 4 * TensorMap(ones, ComplexF64, SU₂Space(0 => 1) ⊗ SU₂Space(1 / 2 => 1) ← SU₂Space(1 / 2 => 1) ⊗ SU₂Space(1 => 1))
SR = TensorMap(ones, ComplexF64, SU₂Space(1 => 1) ⊗ SU₂Space(1 / 2 => 1) ← SU₂Space(1 / 2 => 1) ⊗ SU₂Space(0 => 1))
A = Array{Any,3}(missing, 1, 3, 3)
A[1, 1, 1] = 1
A[1, 1, 2] = SL
A[1, 2, 3] = SR
A[1, 3, 3] = 1
# On 6 sites
H = MPOHamiltonian(repeat(A, 6, 1, 1))
alg = DMRG2(; trscheme=truncerr(1e-6))
# Ground state
ψ₀ = FiniteMPS(randn, ComplexF64, convert(Vector, H.pspaces), SU2Space([i => 1 for i = 0:1/2:2]...))
ψ, envs, delta = find_groundstate(ψ₀, H, alg);
# Excited state
(ϵs, ψs) = excitations(H, FiniteExcited(gsalg=alg), ψ; init=ψ₀)
This gives the error ERROR: SpaceMismatch("ProductSpace(Rep[SU₂](1/2=>2, 3/2=>1)) ≠ ProductSpace(Rep[SU₂](1/2=>1, 3/2=>1))"). Is my code wrong or is this a bug in ∂∂AC2 for ProjectionOperators?
Metadata
Metadata
Assignees
Labels
No labels