I was trying to use the Julia version of ITensor to construct an MPO of the form \exp (\mu \mathcal{O}), where \mathcal{O} \equiv \sum_{i} S_{i-1}.(S_i \times S_{i+1}). I can certainly create the operator \mathcal{O} as an MPO using AutoMPO and OpSum, but is there any way to represent its exponential as an MPO as well?
I was thinking of something along the lines of expHermitian in the C++ version but I cannot find any documentation for the corresponding function in the Julia version.
Hi Peter,
No we don’t have that feature in the Julia version. The main reason is that while it is very convenient, at the level of approximation we were using the errors could be quite large and scaling of MPS bond dimension rather poor when doing time evolution.
Is time evolution the reason you are wanting to use it? If so, I would recommend another approach such as TEBD (Trotter gates) or TDVP. Our TDVP code is kind of in flux right now but we are working hard on getting it ready - if you need to use that we could help you out.
Regarding this question, another reason one might want the MPO of the exponential of an operator is to get the thermal state rho = e^(-H/T)/Z and sample from it using the sample! function which only accepts MPO and MPS. The sampling can then give thermal expectation values of observables. Further, having this as an MPO may allow for larger systems to be used compared to using the standard exp functions of linear algebra libraries even with sparse matrices, depending on whether the autoMPO of the exp of the operator will be able to give good scaling between number of sites and MPO bond dimension.
I guess one can do imaginary TEBD and be careful with the normalization at the end since it won’t be unitary time evolution. Then the imaginary time would be 1/T = beta in this case.
Takis, While it would be great if the method Peter was referring to could be used to get the thermal state, the method is actually only reliable for making e^{-\tau H} for small values of \tau, and even then it is often much less accurate than other methods for making this operator as an MPO.
The most reliable and accurate method for obtaining the operator e^{-\tau H} as an MPO is to start with the identity operator and then time evolve it in imaginary time using either Trotter gates or TDVP until the total time evolved is equal to \tau (this is known as the “purification method” or “ancilla method”)… This is the method used in the finite-temperature example code at this link.
We don’t have such an example code at the moment. One way you could do it, though, would be to make an MPS on 2N sites and interpret it as an MPO afterward by multiplying the tensors on pairs of sites (1,2), (3,4), (5,6), as MPO tensors. This procedure is very common in the literature and is known as “purification”.
Here would be the basic steps:
make an MPS on 2N sites
define the MPS tensors so that neighboring pairs are in a “Bell pair” i.e. a state like \ket{\uparrow} \ket{\uparrow} + \ket{\downarrow} \ket{\downarrow}. (You can normalize it if you want.) Note that this state is equivalent to an identity operator “folded” over into a state acting between two sites.
define your Hamiltonian to be the one you want but acting only on odd-numbered sites. So just treat the even sites as extra “ancilla” sites which are not acted on by the Hamiltonian.
now time evolve to \beta/2 in imaginary time using TDVP
After this procedure finishes, finite-temperature observables can be obtained by computing expected values on the odd-numbered (“physical”) sites. Or one can map to an MPO as I mentioned above.
The above would exactly be that i.e. real-time evolution of a mixed state. If you’re asking whether it could be used to do evolution of more general mixed states than the infinite-temperature one, then I would also say yes. (If you want to ask a further question about it, feel welcome, but please begin a new Topic since this discussion is becoming out-of-scope of the original topic above.)