-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
lkdvos/BlockTensorKit.jl
#30Description
I met an error when I'm running this code following the example in docs but change the Hamiltonian :
using TensorKit
using MPSKit
using MPSKitModels:FiniteChain, hubbard_model
H_u1_su2 = hubbard_model(ComplexF64, U1Irrep, SU2Irrep, FiniteChain(4); U=8.0, mu=4.0, t=1.0);
charges = fill(FermionParity(1) ⊠ U1Irrep(1) ⊠ SU2Irrep(0), 4);
H = MPSKit.add_physical_charge(H_u1_su2, charges);
ρ₀ = MPSKit.infinite_temperature_density_matrix(H)
ρ_mps = convert(FiniteMPS, ρ₀)
βs = 0.0:0.2:8.0
for i in 2:length(βs)
global ρ_mps
@info "Computing β = $(βs[i])"
ρ_mps, = timestep(ρ_mps, H, βs[i - 1] / 2, -im * (βs[i] - βs[i - 1]) / 2,
TDVP2(; trscheme=truncdim(64)))
end[ Info: Computing β = 0.2
ERROR: MethodError: no method matching BraidingTensor(::GradedSpace{…}, ::BlockTensorKit.SumSpace{…})
The type `BraidingTensor` exists, but no method is defined for this combination of argument types when trying to construct it.
Closest candidates are:
BraidingTensor(::BlockTensorKit.SumSpace{S}, ::BlockTensorKit.SumSpace{S}) where S
@ BlockTensorKit ~/.julia/packages/BlockTensorKit/1tWZQ/src/tensors/tensoroperations.jl:208
BraidingTensor(::S, ::S) where S<:ElementarySpace
@ TensorKit ~/.julia/packages/TensorKit/hkxhv/src/tensors/braidingtensor.jl:34
BraidingTensor(::S, ::S, ::Bool) where S<:ElementarySpace
@ TensorKit ~/.julia/packages/TensorKit/hkxhv/src/tensors/braidingtensor.jl:34
...I found the error occurs when running * in rightenv in this line:
ca.GRs[j] = TransferMatrix(above, ca.operator[j], state.AR[j]) * ca.GRs[j + 1]Metadata
Metadata
Assignees
Labels
No labels