Learn to Use ITensor
Single Element ITensor
A single element ITensor is an ITensor constructed using the
It has exactly one non-zero element, which can be any element.
(Currently this type of ITensor uses dense storage but this is subject to change in the future.)
setElt is defined in "itensor/itensor_interface.h" and "itensor/itensor_interface_impl.h".
auto i = Index(4); auto j = Index(3); auto T = randomITensor(i,j); auto S = setElt(i=2); //Multiplying by S in this case will "quench" //the i Index of T to its second value: T *= S;
setElt(IndexVal iv1, IndexVal iv2, ...) -> ITensor
auto s = Index(3); auto l = Index(10); auto T = setElt(s=2,l=4); Print(elt(T,s=1,l=1)); //prints: 0.0 Print(elt(T,s=2,l=1)); //prints: 0.0 //... Print(elt(T,s=2,l=4)); //prints: 1.0
This page current as of version 3.0.0
Back to Classes
Back to Main