+1 vote
asked by (270 points)

How do you manage exponential tenor?

Of course, one could do it, but what is the best way?

Consider this example:


I want to combine indices i by m and j by n, then put it into a matrix form and take exponential,

Matrix M=T_{im;Jn} ; M=exp(M);

then put M back into original T


It should have the same indices as original T.


Is it any function to put Itensor into a matrix and vice versa?

The same is the case for eigval decomposition (for general matrices) and....

1 Answer

0 votes
answered by (52.6k points)

Hi, so we have the expHermitian function:

For non-Hermitian matrices we don't have a function set up to automatically exponentiate tensors for you.

About putting an ITensor into the form of a matrix, we have combiners, which are special tensors (still of type ITensor or IQTensor, so actually a special type of tensor storage) that combine multiple indices into a single index:

If those don't cover your use case, please tell me more specifically about your case and I can see if ITensor has the tools you will need.


commented by (270 points)

I want to make transfer matrix of an iPEPS tensor and obtain its eigenvalues. It's not necessary Hermitian.

I have another question:
How could I calculate A+A^{T}?
Do I have to use delta function?
commented by (52.6k points)
Hi, so you're in luck on this one: when adding two ITensors (or IQTensors) the library automatically permutes the indices for you. So if you have two tensors A and B, as long as they have the same indices (in whatever order) you can just do:
auto C = A + B;
commented by (270 points)
You are right. I understand what you mean. But, I want to make C hermitian, not simply adding them.

What about transfer matrix and obtaining its eigenvalues? what is your advise?
commented by (52.6k points)
Ok yes, then to make C Hermitian you have to think a bit differently about ITensors vs matrices. With ITensor we don't have the notion of a transpose. Instead we have primed indices. So a tensor that has indices like T_{i i'} is like a square matrix. Then to "transpose" it you do auto TT = swapPrime(T,0,1); which swaps the prime and unprimed indices.

So if you did: auto TS = 0.5*(T + swapPrime(T,0,1)); you will get a symmetrized version of T.

To get a Hermitian version, do: auto TH = 0.5*(T+dag(swapPrime(T,0,1)); where the "dag" also takes the conjugate of the indices and the tensor elements.

About the transfer matrix, I studied it once by writing an Arnoldi routine for iteratively getting the leading eigenvalues of a non-Hermitian matrix. You could use the ITensor davidson routine as an example of how to write a sparse iterative code using ITensor. I should have my old Arnoldi code lying around also. Maybe I should update it for ITensor v2 but it's not something I could do very soon.
commented by (270 points)
Excellent! Thanks.
Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.