I’m new in using Julia version of the Itensors, but I’m not able to recover the result from the documentation
using ITensors
Index([QN("Sz", -1) => 1, QN("Sz", 1) => 1], "i"; dir = In)
gives me an error: In is not defined; Instead, I’m using dir = ITensors.Arrow(1) or dir = ITensors.Arrow(-1);
I’m I doing something wrong, or it is a bug?
to get the In variable from the ITensors module. Alternatively you can put:
import ITensors: In
at the top of your code if it doesn’t cause any problems.
The reason it’s not imported by default is that other packages also define the variable In, so it can cause problems sometimes if we imported it by default also.
Thanks for the reminder. I don’t think we should be encouraging users to use the dir keyword argument anyway, it is a bit “low level” and it is better to create an Index and then call dag on it. In practice, I can’t think of a time when dag wasn’t sufficient (except in a few places internally in the library). I’ll update the docs accordingly.