# New sitetype with julia

+1 vote

Hi All,

I read all the official docs about the construction of new site types with the julia version of ITensor but there is nothing on how to overload the state() function. I just followed standard overload procedure as with the op! functions but the system cannot find my definition of state().

Could you please point me to the source of the erro in the code below? (the code returns an error)

using ITensors
ITensors.space(::SiteType"Xev") = 8
ITensors.state(::StateName"0", ::SiteType"Xev") = [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
N = 10
sites = siteinds("Xev",N)
ψ = MPS(sites,"0")


Thanks,
lello

commented by (70.1k points)
Thanks for the question - it is a bug in ITensors.jl! So I am working on fixing it tonight and will let you know when the fix is ready.

Thanks,
Miles