Hello ITensors team,

I'm trying to construct an QN custom Hilbert space with spins 3/2 and higher. I follow the tutorial, which points about "overload" the function. I wrote an QN code for higher spins( as before mentioned) but i don't know exactly how to call the function. I try use Include using the external fine in the same folder, but i'm getting an error because the code didn't recognize the flag "S=3/2".

My external file example for S=3/2 :

using ITensors

function ITensors.space(::SiteType"S=3/2"; conserve_qns=false)

if conserve_qns

return [QN("Sz",3)=>1, QN("Sz",1)=>1,

QN("Sz",-1)=>1,QN("Sz",-3)=>1]

end

return 4

end

function ITensors.op!(Op::ITensor,

::OpName"Sz",

::SiteType"S=3/2",

s::Index)

Op[s'=>1,s=>1] = +3/2

Op[s'=>2,s=>2] = +1/2

Op[s'=>3,s=>3] = -1/2

Op[s'=>4,s=>4] = -3/2

end

function ITensors.op!(Op::ITensor,

::OpName"S+",

::SiteType"S=3/2",

s::Index)

Op[s'=>1,s=>2] = sqrt(3)

Op[s'=>2,s=>3] = 2

Op[s'=>3,s=>4] = sqrt(3)

end

function ITensors.op!(Op::ITensor,

::OpName"S-",

::SiteType"S=3/2",

s::Index)

Op[s'=>2,s=>1] = sqrt(3)

Op[s'=>3,s=>2] = 2

Op[s'=>4,s=>3] = sqrt(3)

end

Thank you !