As I know we can do custom state definition in julia like:
ITensors.state(::StateName"+", ::SiteType"Electron") = [0, 1/sqrt(2), 1/sqrt(2), 0]
But I haven’t get similar method in ITensor c++. In the source code I only find this:
IndexVal
state(std::string const& state)
{
if(state == "0" || state == "Emp")
{
return s(1);
}
else
if(state == "+" || state == "Up")
{
return s(2);
}
else
if(state == "-" || state == "Dn")
{
return s(3);
}
else
if(state == "S" || state == "UpDn")
{
return s(4);
}
else
{
throw ITError("State " + state + " not recognized");
}
return IndexVal{};
}
So is it possible to define custom states in c++ version?