From 161589b7925a37468fb5744e754cb1cf799bc098 Mon Sep 17 00:00:00 2001 From: maarten Date: Tue, 8 Sep 2020 12:59:32 +0200 Subject: [PATCH] tensorkit v0.7.0 transition --- Project.toml | 10 ++--- docs/src/man/intro.md | 2 +- docs/src/tut/haldane.md | 14 +++---- docs/src/tut/xxz_groundstate.md | 8 ++-- src/algorithms/propagator/corvector.jl | 4 +- src/models/grossneveu.jl | 58 +++++++++++--------------- src/models/xxz.jl | 10 ++--- src/states/comoving.jl | 4 +- src/states/finitemps.jl | 4 +- src/states/quasiparticle_state.jl | 11 ++--- test/runtests.jl | 14 +++---- 11 files changed, 66 insertions(+), 73 deletions(-) diff --git a/Project.toml b/Project.toml index 53f612c3..2a87ad8f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MPSKit" uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" -authors = ["Maarten Van Damme","Jutho Haegeman","Gertian Roose","Markus Hauru"] -version = "0.2.0" +authors = ["Maarten Van Damme", "Jutho Haegeman", "Gertian Roose", "Markus Hauru"] +version = "0.3.0" [deps] KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" @@ -14,8 +14,8 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] KrylovKit = "0.4 - 1" +OptimKit = "0.1 - 1" Parameters = "0.12 - 1" -julia = "1.4" -TensorKit = "0.5 - 1" +TensorKit = "0.7 - 1" TensorKitManifolds = "0.3 - 1" -OptimKit = "0.1 - 1" +julia = "1.4" diff --git a/docs/src/man/intro.md b/docs/src/man/intro.md index dcc597fc..0a8512e0 100644 --- a/docs/src/man/intro.md +++ b/docs/src/man/intro.md @@ -19,7 +19,7 @@ dat = rand(ComplexF64,10,10); TensorMap(dat,ℂ^10,ℂ^10); ``` Similarly, the following creates a symmetric tensor ```julia -TensorMap(rand,ComplexF64,ℂ[U₁](0=>1)*ℂ[U₁](1//2=>3),ℂ[U₁](1//2=>1,-1//2=>2)) +TensorMap(rand,ComplexF64,Rep[U₁](0=>1)*Rep[U₁](1//2=>3),Rep[U₁](1//2=>1,-1//2=>2)) ``` TensorKit defines a number of operations on TensorMap objects diff --git a/docs/src/tut/haldane.md b/docs/src/tut/haldane.md index c51ddc1d..ac2edbdb 100644 --- a/docs/src/tut/haldane.md +++ b/docs/src/tut/haldane.md @@ -17,8 +17,8 @@ ham = su2_xxx_ham(spin=1); The first step is always the same, we want to find the groundstate of our system. ```julia len = 10; -physical_space = ℂ[SU₂](1=>1); -virtual_space = ℂ[SU₂](0=>20,1=>20,2=>10,3=>10,4=>5); +physical_space = Rep[SU₂](1=>1); +virtual_space = Rep[SU₂](0=>20,1=>20,2=>10,3=>10,4=>5); initial_state = FiniteMPS(rand,ComplexF64,len,physical_space,virtual_space); (gs,pars,delta) = find_groundstate(initial_state,ham,Dmrg()); @@ -29,8 +29,8 @@ The typical way to find excited states is to minmize the energy while adding an In steven white's original DMRG paper it was remarked that the S=1 excitations correspond to edge states, and that one should define the haldane gap as the difference in energy between the S=2 and S=1 states. This can be done as follows. ```julia -(En_1,st_1) = quasiparticle_excitation(ham,gs,pars,excitation_space = ℂ[SU₂](1=>1)) -(En_2,st_2) = quasiparticle_excitation(ham,gs,pars,excitation_space = ℂ[SU₂](2=>1)) +(En_1,st_1) = quasiparticle_excitation(ham,gs,pars,excitation_space = Rep[SU₂](1=>1)) +(En_2,st_2) = quasiparticle_excitation(ham,gs,pars,excitation_space = Rep[SU₂](2=>1)) finite_haldane_gap = En_2[1]-En_1[1] ``` @@ -51,7 +51,7 @@ Extrapolating for different len gives an approximate haldane gap. A much nicer way of obtaining the haldane gap is by working directly in the thermodynamic limit. We must be careful in selecting the symmetry sectors, the only correct choice is to work with half-integer charges (this is an SPT phase). ```julia -virtual_space = ℂ[SU₂](1//2=>20,3//2=>20,5//2=>10,7//2=>10,9//2=>5); # this is bond dimension 300! +virtual_space = Rep[SU₂](1//2=>20,3//2=>20,5//2=>10,7//2=>10,9//2=>5); # this is bond dimension 300! initial_state = InfiniteMPS([physical_space],[virtual_space]); (gs,pars,delta) = find_groundstate(initial_state,ham,Vumps()); ``` @@ -60,13 +60,13 @@ One difference with the finite size case is that we not only can - but also have ```julia kspace = 0:0.1:pi -(Energies,_) = quasiparticle_excitation(ham,kspace,gs,pars,excitation_space=ℂ[SU₂](1=>1)); +(Energies,_) = quasiparticle_excitation(ham,kspace,gs,pars,excitation_space=Rep[SU₂](1=>1)); ``` ![](haldane_dispersion.png) The minimima sits at k = pi, with corresponding value ```julia -(En,_) = quasiparticle_excitation(ham,Float64(pi),gs,pars,excitation_space=ℂ[SU₂](1=>1)); +(En,_) = quasiparticle_excitation(ham,Float64(pi),gs,pars,excitation_space=Rep[SU₂](1=>1)); @assert En[1] ≈ 0.41047925 atol=1e-4 ``` diff --git a/docs/src/tut/xxz_groundstate.md b/docs/src/tut/xxz_groundstate.md index debb757e..2b441676 100644 --- a/docs/src/tut/xxz_groundstate.md +++ b/docs/src/tut/xxz_groundstate.md @@ -87,15 +87,15 @@ The xxz hamiltonian is su(2) symmetric and we can exploit this to greatly speed It is cumbersome to construct symmetric hamiltonians, but luckily su(2) symmetric xxz is already implemented: ```julia ham = repeat(su2_xxx_ham(spin=1//2),2); -@assert ham.pspaces[1] == ℂ[SU₂](1//2 => 1) +@assert ham.pspaces[1] == Rep[SU₂](1//2 => 1) ``` Our initial state should also be su(2) symmetric. It now becomes apparant why we have to use a 2 site periodic state. The physical space carries a half-integer charge and the first tensor maps the first virtual space ⊗ the physical space to the second virtual space. Half integer virtual charges will therefore map only to integer charges, and vice versa. The staggering happens on the virtual level! An alternative constructor for the initial state is ```julia -D1 = ℂ[SU₂](1//2 => 10,3//2=>5,5//2=>2); -D2 = ℂ[SU₂](0=>15,1=>10,2=>5); -state = InfiniteMPS([ℂ[SU₂](1//2 => 1),ℂ[SU₂](1//2 => 1)],[D1,D2]) +D1 = Rep[SU₂](1//2 => 10,3//2=>5,5//2=>2); +D2 = Rep[SU₂](0=>15,1=>10,2=>5); +state = InfiniteMPS([Rep[SU₂](1//2 => 1),Rep[SU₂](1//2 => 1)],[D1,D2]) ``` Even though the bond dimension is higher then in the non symmetric example: diff --git a/src/algorithms/propagator/corvector.jl b/src/algorithms/propagator/corvector.jl index 6223a719..a2cee739 100644 --- a/src/algorithms/propagator/corvector.jl +++ b/src/algorithms/propagator/corvector.jl @@ -74,10 +74,10 @@ function squaredenvs(state::Union{MPSComoving,FiniteMPS},ham::MPOHamiltonian,par for i in 1:ham.odim for j in 1:ham.odim @tensor temp[-1 -2 -3;-4]:=leftenv(pars,1,state)[j][1,-3,-4]*conj(leftenv(pars,1,state)[i][1,-2,-1]) - copyto!(nleft[indmap(i,j)].data,temp.data) + copy!(nleft[indmap(i,j)].data,temp.data) @tensor temp[-1 -2 -3;-4]:=rightenv(pars,length(state),state)[j][-1,-2,1]*conj(rightenv(pars,length(state),state)[i][-4,-3,1]) - copyto!(nright[indmap(i,j)].data,temp.data) + copy!(nright[indmap(i,j)].data,temp.data) end end diff --git a/src/models/grossneveu.jl b/src/models/grossneveu.jl index daa2006d..38c3ca17 100644 --- a/src/models/grossneveu.jl +++ b/src/models/grossneveu.jl @@ -1,35 +1,35 @@ function su2u1_grossneveu(;g2SPT=0,g2AFM=0) - ph = ℂ[SU₂×U₁]( (1//2,0)=>1, (0,-1)=>1, (0,1)=>1 ) - bigonleg = ℂ[SU₂×U₁]( (0,0)=>1, (1//2,-1)=>1, (1//2,1)=>1 ) + ph = Rep[SU₂×U₁]( (1//2,0)=>1, (0,-1)=>1, (0,1)=>1 ) + bigonleg = Rep[SU₂×U₁]( (0,0)=>1, (1//2,-1)=>1, (1//2,1)=>1 ) unit = oneunit(ph) LK = TensorMap(ones, ComplexF64, unit*ph, bigonleg*ph) - blocks(LK)[SU₂(0)×U₁(-1)] = [im*2/sqrt(2) 1] - blocks(LK)[SU₂(1//2)×U₁(0)] = [1. im -im] - blocks(LK)[SU₂(0)×U₁(1)] = [im*2/sqrt(2) 1] + blocks(LK)[Irrep[SU₂](0)⊠Irrep[U₁](-1)] = [im*2/sqrt(2) 1] + blocks(LK)[Irrep[SU₂](1//2)⊠Irrep[U₁](0)] = [1. im -im] + blocks(LK)[Irrep[SU₂](0)⊠Irrep[U₁](1)] = [im*2/sqrt(2) 1] RK = TensorMap(ones, ComplexF64, bigonleg*ph, unit*ph) - blocks(RK)[SU₂(0)×U₁(-1)][:] = [2/sqrt(2) 1][:] - blocks(RK)[SU₂(1//2)×U₁(0)][:] = [1 -1 1][:] - blocks(RK)[SU₂(0)×U₁(1)][:] = [2/sqrt(2) 1][:] + blocks(RK)[Irrep[SU₂](0)⊠Irrep[U₁](-1)][:] = [2/sqrt(2) 1][:] + blocks(RK)[Irrep[SU₂](1//2)⊠Irrep[U₁](0)][:] = [1 -1 1][:] + blocks(RK)[Irrep[SU₂](0)⊠Irrep[U₁](1)][:] = [2/sqrt(2) 1][:] Cplus = TensorMap(ones, ComplexF64, bigonleg*ph, bigonleg*ph) - blocks(Cplus)[SU₂(1//2)×U₁(0)] = [0 im*0.5 -im*0.5; -0.5 0 0; 0.5 0 0] - blocks(Cplus)[SU₂(0)×U₁(-1)] = [0 0.5*sqrt(2); im*0.5*sqrt(2) 0] - blocks(Cplus)[SU₂(1)×U₁(-1)] = zeros(1,1) - blocks(Cplus)[SU₂(0)×U₁(1)] = [0 0.5*sqrt(2); im*0.5*sqrt(2) 0] - blocks(Cplus)[SU₂(1)×U₁(1)] = zeros(1,1) - blocks(Cplus)[SU₂(1//2)×U₁(-2)] = zeros(1,1) - blocks(Cplus)[SU₂(1//2)×U₁(2)] = zeros(1,1) + blocks(Cplus)[Irrep[SU₂](1//2)⊠Irrep[U₁](0)] = [0 im*0.5 -im*0.5; -0.5 0 0; 0.5 0 0] + blocks(Cplus)[Irrep[SU₂](0)⊠Irrep[U₁](-1)] = [0 0.5*sqrt(2); im*0.5*sqrt(2) 0] + blocks(Cplus)[Irrep[SU₂](1)⊠Irrep[U₁](-1)] = zeros(1,1) + blocks(Cplus)[Irrep[SU₂](0)⊠Irrep[U₁](1)] = [0 0.5*sqrt(2); im*0.5*sqrt(2) 0] + blocks(Cplus)[Irrep[SU₂](1)⊠Irrep[U₁](1)] = zeros(1,1) + blocks(Cplus)[Irrep[SU₂](1//2)⊠Irrep[U₁](-2)] = zeros(1,1) + blocks(Cplus)[Irrep[SU₂](1//2)⊠Irrep[U₁](2)] = zeros(1,1) Cmin = TensorMap(ones, ComplexF64, bigonleg*ph, bigonleg*ph) - blocks(Cmin)[SU₂(1//2)×U₁(0)] = conj([0 im*0.5 -im*0.5; -0.5 0 0; 0.5 0 0]) - blocks(Cmin)[SU₂(0)×U₁(-1)] = conj([0 0.5*sqrt(2); im*0.5*sqrt(2) 0]) - blocks(Cmin)[SU₂(1)×U₁(-1)] = zeros(1,1) - blocks(Cmin)[SU₂(0)×U₁(1)] = conj([0 0.5*sqrt(2); im*0.5*sqrt(2) 0]) - blocks(Cmin)[SU₂(1)×U₁(1)] = zeros(1,1) - blocks(Cmin)[SU₂(1//2)×U₁(-2)] = zeros(1,1) - blocks(Cmin)[SU₂(1//2)×U₁(2)] = zeros(1,1) + blocks(Cmin)[Irrep[SU₂](1//2)⊠Irrep[U₁](0)] = conj([0 im*0.5 -im*0.5; -0.5 0 0; 0.5 0 0]) + blocks(Cmin)[Irrep[SU₂](0)⊠Irrep[U₁](-1)] = conj([0 0.5*sqrt(2); im*0.5*sqrt(2) 0]) + blocks(Cmin)[Irrep[SU₂](1)⊠Irrep[U₁](-1)] = zeros(1,1) + blocks(Cmin)[Irrep[SU₂](0)⊠Irrep[U₁](1)] = conj([0 0.5*sqrt(2); im*0.5*sqrt(2) 0]) + blocks(Cmin)[Irrep[SU₂](1)⊠Irrep[U₁](1)] = zeros(1,1) + blocks(Cmin)[Irrep[SU₂](1//2)⊠Irrep[U₁](-2)] = zeros(1,1) + blocks(Cmin)[Irrep[SU₂](1//2)⊠Irrep[U₁](2)] = zeros(1,1) f1 = isomorphism(fuse(unit, unit), unit*unit) f2 = isomorphism(bigonleg*bigonleg, fuse(bigonleg, bigonleg)) @@ -42,17 +42,9 @@ function su2u1_grossneveu(;g2SPT=0,g2AFM=0) #and now with the extra O(4) breaking part ie the O operator O_op = TensorMap(zeros, ComplexF64, unit*ph, unit*ph) - blocks(O_op)[SU₂(1//2)×U₁(0)] = -zeros(1,1) - blocks(O_op)[SU₂(0)×U₁(-1)] = -1*ones(1,1) - blocks(O_op)[SU₂(0)×U₁(1)] = 1*ones(1,1) - - - #= - BlockHamiltonian([ SimpleLocalMPO([LK , Cplus, RK]) , - SimpleLocalMPO([-0.25*g2SPT^2*Ldiffsq, Cdiffsq, Rdiffsq]) , - SimpleLocalMPO([-0.5*g2AFM^2*O_op^2]), - SimpleLocalMPO([+0.5*g2AFM^2*O_op, O_op]) ]) - =# + blocks(O_op)[Irrep[SU₂](1//2)⊠Irrep[U₁](0)] = -zeros(1,1) + blocks(O_op)[Irrep[SU₂](0)⊠Irrep[U₁](-1)] = -1*ones(1,1) + blocks(O_op)[Irrep[SU₂](0)⊠Irrep[U₁](1)] = 1*ones(1,1) MPOHamiltonian([LK, Cplus, RK]) + MPOHamiltonian([-0.25*g2SPT^2*Ldiffsq, Cdiffsq, Rdiffsq]) + diff --git a/src/models/xxz.jl b/src/models/xxz.jl index 850d3a02..9fda315c 100644 --- a/src/models/xxz.jl +++ b/src/models/xxz.jl @@ -13,10 +13,10 @@ end function su2_xxx_ham(;spin = 1//2) #only checked for spin = 1 and spin = 2... - ph = ℂ[SU₂](spin=>1) + ph = Rep[SU₂](spin=>1) - Sl1 = TensorMap(ones, Defaults.eltype, ℂ[SU₂](0=>1)*ph , ℂ[SU₂](1=>1)*ph)*sqrt(spin^2+spin) - Sr1 = TensorMap(ones, Defaults.eltype, ℂ[SU₂](1=>1)*ph , ℂ[SU₂](0=>1)*ph)*sqrt(spin^2+spin) + Sl1 = TensorMap(ones, Defaults.eltype, Rep[SU₂](0=>1)*ph , Rep[SU₂](1=>1)*ph)*sqrt(spin^2+spin) + Sr1 = TensorMap(ones, Defaults.eltype, Rep[SU₂](1=>1)*ph , Rep[SU₂](0=>1)*ph)*sqrt(spin^2+spin) return MPOHamiltonian([Sl1,Sr1]); end @@ -25,14 +25,14 @@ function u1_xxz_ham(;spin = 1,delta = 1,zfield = 0.0) (sxd,syd,szd,idd) = spinmatrices(spin); @tensor ham[-1 -2;-3 -4]:=sxd[-1,-3]*sxd[-2,-4]+syd[-1,-3]*syd[-2,-4]+(delta*szd)[-1,-3]*szd[-2,-4]+zfield*0.5*szd[-1,-3]*idd[-2,-4]+zfield*0.5*idd[-1,-3]*szd[-2,-4] - indu1map = [U₁(v) for v in -spin:1:spin]; + indu1map = [Irrep[U₁](v) for v in -spin:1:spin]; pspace = U1Space((v=>1 for v in indu1map)); symham = TensorMap(zeros,eltype(ham),pspace*pspace,pspace*pspace) for (i,j,k,l) in Iterators.product(1:size(ham,1),1:size(ham,1),1:size(ham,1),1:size(ham,1)) if ham[i,j,k,l]!=0 - copyto!(symham[(indu1map[i],indu1map[j],indu1map[k],indu1map[l])],ham[i,j,k,l]) + copy!(symham[(indu1map[i],indu1map[j],indu1map[end-k+1],indu1map[end-l+1])],ham[i:i,j:j,k:k,l:l]) end end diff --git a/src/states/comoving.jl b/src/states/comoving.jl index a1c10e10..44f578ac 100644 --- a/src/states/comoving.jl +++ b/src/states/comoving.jl @@ -66,11 +66,11 @@ function MPSComoving(f, elt, physspaces::Vector{<:Union{S,CompositeSpace{S}}}, m virtspaces = Vector{S}(undef, N+1) virtspaces[1] = left for k = 2:N - virtspaces[k] = infinum(fuse(virtspaces[k-1], fuse(physspaces[k])), maxvirtspace) + virtspaces[k] = infimum(fuse(virtspaces[k-1], fuse(physspaces[k])), maxvirtspace) end virtspaces[N+1] = right for k = N:-1:2 - virtspaces[k] = infinum(virtspaces[k], fuse(virtspaces[k+1], flip(fuse(physspaces[k])))) + virtspaces[k] = infimum(virtspaces[k], fuse(virtspaces[k+1], flip(fuse(physspaces[k])))) end return MPSComoving(f, elt,physspaces, virtspaces,leftgs,rightgs) end diff --git a/src/states/finitemps.jl b/src/states/finitemps.jl index d434502c..a89a6eed 100644 --- a/src/states/finitemps.jl +++ b/src/states/finitemps.jl @@ -76,11 +76,11 @@ function FiniteMPS(f, elt, physspaces::Vector{<:Union{S,CompositeSpace{S}}}, max virtspaces = Vector{S}(undef, N+1) virtspaces[1] = left for k = 2:N - virtspaces[k] = infinum(fuse(virtspaces[k-1], fuse(physspaces[k])), maxvirtspace) + virtspaces[k] = infimum(fuse(virtspaces[k-1], fuse(physspaces[k])), maxvirtspace) end virtspaces[N+1] = right for k = N:-1:2 - virtspaces[k] = infinum(virtspaces[k], fuse(virtspaces[k+1], flip(fuse(physspaces[k])))) + virtspaces[k] = infimum(virtspaces[k], fuse(virtspaces[k+1], flip(fuse(physspaces[k])))) end return FiniteMPS(f, elt,physspaces, virtspaces) end diff --git a/src/states/quasiparticle_state.jl b/src/states/quasiparticle_state.jl index 8106bf11..db9ecd38 100644 --- a/src/states/quasiparticle_state.jl +++ b/src/states/quasiparticle_state.jl @@ -4,7 +4,7 @@ I think it makes sense to see these things as an actual state instead of return This will allow us to plot energy density (finite qp) and measure observeables. =# -struct FiniteQP{S<:FiniteMPS,T1,T2} +struct FiniteQP{S<:Union{MPSComoving,FiniteMPS},T1,T2} # !(left_gs === right_gs) => domain wall excitation left_gs::S right_gs::S @@ -14,7 +14,7 @@ struct FiniteQP{S<:FiniteMPS,T1,T2} end -function rand_quasiparticle(left_gs::FiniteMPS,right_gs=left_gs;excitation_space=oneunit(virtualspace(left_gs,1))) +function rand_quasiparticle(left_gs::Union{MPSComoving,FiniteMPS},right_gs=left_gs;excitation_space=oneunit(virtualspace(left_gs,1))) #find the left null spaces for the TNS VLs = [adjoint(rightnull(adjoint(v))) for v in left_gs.AL] Xs = [TensorMap(rand,eltype(left_gs.AL[1]),space(VLs[loc],3)',excitation_space'*space(right_gs.AR[ loc],3)') for loc in 1:length(left_gs)] @@ -44,10 +44,11 @@ end const QP = Union{InfiniteQP,FiniteQP}; utilleg(v::QP) = space(v.Xs[1],2) -Base.copy(a::QP) = copyto!(similar(a),a) -function Base.copyto!(a::QP,b::QP) +Base.copy(a::QP) = copy!(similar(a),a) +Base.copyto!(a::QP,b::QP) = copy!(a,b); +function Base.copy!(a::QP,b::QP) for (i,j) in zip(a.Xs,b.Xs) - copyto!(i,j) + copy!(i,j) end a end diff --git a/test/runtests.jl b/test/runtests.jl index c60df2da..a47fc89f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,7 +5,7 @@ println("| States |") println("------------------------------------") @testset "FiniteMPS ($D,$d,$elt)" for (D,d,elt) in [ (ComplexSpace(10),ComplexSpace(2),ComplexF64), - (ℂ[SU₂](1=>1,0=>3),ℂ[SU₂](0=>1)*ℂ[SU₂](0=>1),ComplexF32) + (Rep[SU₂](1=>1,0=>3),Rep[SU₂](0=>1)*Rep[SU₂](0=>1),ComplexF32) ] ts = FiniteMPS(rand,elt,rand(3:20),d,D); @@ -28,7 +28,7 @@ end @testset "InfiniteMPS ($D,$d,$elt)" for (D,d,elt) in [ (ComplexSpace(10),ComplexSpace(2),ComplexF64), - (ℂ[U₁](1=>3),ℂ[U₁](0=>1),ComplexF64) + (Rep[U₁](1=>3),Rep[U₁](0=>1),ComplexF64) ] tol = Float64(eps(real(elt))*100); @@ -52,7 +52,7 @@ end @testset "MPSMultiline ($D,$d,$elt)" for (D,d,elt) in [ (ComplexSpace(10),ComplexSpace(2),ComplexF64), - (ℂ[U₁](1=>3),ℂ[U₁](0=>1),ComplexF32) + (Rep[U₁](1=>3),Rep[U₁](0=>1),ComplexF32) ] tol = Float64(eps(real(elt))*100); @@ -123,7 +123,7 @@ end @testset "Quasiparticle state" begin @testset "Finite" for (th,D,d) in [ (nonsym_ising_ham(),ComplexSpace(10),ComplexSpace(2)), - (su2_xxx_ham(spin=1),ℂ[SU₂](1=>1,0=>3),ℂ[SU₂](1=>1)) + (su2_xxx_ham(spin=1),Rep[SU₂](1=>1,0=>3),Rep[SU₂](1=>1)) ] @@ -149,7 +149,7 @@ end @testset "Infinite" for (th,D,d) in [ (nonsym_ising_ham(),ComplexSpace(10),ComplexSpace(2)), - (su2_xxx_ham(spin=1),ℂ[SU₂](1=>1,0=>3),ℂ[SU₂](1=>1)) + (su2_xxx_ham(spin=1),Rep[SU₂](1=>1,0=>3),Rep[SU₂](1=>1)) ] period = rand(1:4); @@ -170,8 +170,8 @@ println("| Operators |") println("------------------------------------") @testset "mpoham $(i)" for (i,(th,Dspaces)) in enumerate([ (nonsym_ising_ham(),[ℂ^1]), - (u1_xxz_ham(),[ℂ[U₁](1//2=>1)]), - (repeat(su2_xxx_ham(),2),[ℂ[SU₂](0=>1),ℂ[SU₂](1//2=>1)]) + (u1_xxz_ham(),[Rep[U₁](1//2=>1)]), + (repeat(su2_xxx_ham(),2),[Rep[SU₂](0=>1),Rep[SU₂](1//2=>1)]) ]) ts = InfiniteMPS(th.pspaces,Dspaces); # generate a product state