Preparing a system in finite temperature

Hey all,
Is there any efficient way to prepare a system in finite temperature T after starting in some pure product state using ITensor functions ?

Are you looking for state purification ? I am not aware of any specific predefined function. You can build the initial state as product of bell pairs (which represent an infinite temperature state) & then do an imaginary time evolution to get the finite temperature state you desire. This might be useful - https://github.com/ITensor/ITensors.jl/tree/main/examples/finite_temperature

Alternatively,you can start with an identity matrix as density matrix.

1 Like

This is the right answer :point_up_2: and if you click on the codes in the link provided above, the comments at the top of the example codes include paper references so you can read more about each method.

The other method in that folder, besides the method you mentioned @sandipanmanna, is the METTS algorithm which does a Monte Carlo sampling over pure states instead of preparing a single density matrix.

1 Like

Hey,
thank you for your reply, and sorry for the late comment.

The purification method you linked above is for a DMRG calculation ?

Maybe I should explain better what my goal is:
I want to make an MPS at finite temperature, but as far as I know using imaginary time development is most accurate only for the ground state, and what I am trying to achieve is not the ground state, but some thermal state (a Boltzmann distribution).

Hi!
The purification code in the link can get you the thermal state. Imaginary time evolution will get you the exp(-\beta E) \psi_0 state where \psi_0 corresponds to the purification of infinite temperature density matrix (which is an identity matrix). Think of this as twisting the outer legs of the density matrix such that the new object is an MPS with number of legs double the system sites. You can learn more about this approach from the paper mentioned in the code.
\beta in the above expressions is the inverse temperature for your thermal ensemble. If you want ground state from imaginary time evolution, you can take a sequence of large beta values and check for energy convergence. For finite \beta , imaginary time evolution will get you the corrresponding thermal state.
ITensor allows you to directly work with density matrix too if you prefer that. Same tools go through there.

1 Like

Thank you for your reply!

About what you mentioned about the imaginary time evolution compared to purification (the link you linked above), those two methods aren’t equivalent as far as I know because there is no guarantee that imaginary time evolution will get you to some finite temperature state (the thermal state), am I correct ?
But from what I understand the method you suggested (the purification) will get me to the thermal state and that is according to the eigenstate thermalization hypothesis, and in order to achieve the thermal state as an MPS, all I need to do is to trace out all the prime legs of the MPO and normalize ?

Hi @tsegev , based on your questions, I would suggest you read more of the original literature on finite-temperature tensor network algorithms, such as these papers:

The main things to know are:

  1. the purification or ancilla method prepares an MPO, sometimes viewed as an “purified” MPS on 2N sites, which is equal to the density matrix e^{-\beta H} (actually in practice one often forms the square root of this by just evolving half the time, then using two copies to compute expected values)
  2. one can prepare pure states of the form e^{-\beta/2 H} |i \rangle which are called METTS if the state |i \rangle is a product or unentangled state. These are not individually “thermal” but only on average, see below.
  3. in principle one can also prepare pure states of the form e^{-\beta/2 H} |r \rangle where |r \rangle is a totally random (fully entangled) state. Each of these individually has thermal properties but are not efficient to capture by tensor networks.

Technically the finite temperature state e^{-\beta H} is a density matrix, not a pure state, so one needs to clarify what one means by talking about imaginary time evolving pure states and saying they are “at” a finite temperature. This is only meaningful if the state is actually a purified density matrix, i.e. has twice the number of sites which is really just a way of writing an MPO.

On the other hand, one can efficiently prepare an ensemble of pure states (the METTS) whose average properties are thermal. But it’s not that each METTS by itself is thermal i.e. its properties would be different from the thermal ensemble properties and one has to average over all of the METTS to get the right thermal result.

Hope that helps.

2 Likes

Hey miles,
Thank you very much for your reply!
I think I understood the methods you suggested above, but I have a question about the purification method.

In the paper it is said that you create an Ancilla site, but the you do not apply your H on them, and so they are only evolve through the entanglement with their real site pair, but in the code in purification I didn’t saw any comment for the that fact, so how does it implemented in the code ?

Also, after you create that MPO, is it correct to just transform it to an MPS by tracing out all the Ancilla states? or to create some random pure state and to apply the density matrix on it ?

Your understanding about the usual way of doing the ancilla method (using a pure state picture with ancilla sites) is correct. In the MPO way of doing it, the sites on one side of the MPO are the physical ones and on the other side are the ancillas. One acts the time evolution operator only on the physical side.

Then to measure operators, one does the trace of this operator with an observable in the same way one would for a density matrix.

Technically in practice one usually computes the square root of the thermal density matrix e^{-\beta H /2} and uses two copies of it in the trace.

I encourage you to draw tensor diagrams for all of the above methods which can help to understand them better, as well as looking through the original literature.

Hey miles,

Just to make sure that I understand : after you create that MPO, is it correct to just transform it to an MPS by tracing out all the Ancilla states? or to create some random pure state and to apply the density matrix on it ?

Maybe I can clarify your question. Are you asking, if one uses the purification approach to compute thermal properties by making an MPO, what’s the most efficient way to obtain these properties from the MPO after making it?

I think my question is different,
the solution to your question is just \langle A \rangle=Tr(A\rho) no ?
My question is different:
After I get my thermal MPO I want to use the tdvp function, but unfortounatly there is no way to use this function om MPO, so somehow I need to remove the Ancilla sites and remain with only a thermal MPS.
So I thought that a good way of doing so is to trace out the Ancilla by delta function, or something like contracting the density operator with some state.
What is a good way to get the MPS of the real site from the MPO?

I somewhat see, but I don’t have enough context of what you are trying to do and why. Could you please post a new question outlining what your goal is? Why do you want to use TDVP? What are you trying to compute and what algorithm or combination of algorithms do you want to use to compute it and why? Thanks –

1 Like

No problem

Hi, Miles.
Thank you for your detailed response. I learn much from your post.
I have several trivial questions about purification method for finite temeperature state.
Aa far as I know, before doing a imaginary time-evovlution to finite teperature state, one must define a initial state which is constructed by Bell states of every two sites.
So, I want to ask does purification method work for Bosonic systems?
And if it does, how can one define a Bell state of two sites based on Bosonic site basis?
Is a superposition of occupation states like 1/\sqrt{2}(\ket{01}-\ket{10}) an efficient Bell state?
Also, if I want to conserve particle numbers to be half filling, how can I construct the infitnite temperature inital state?
Looking forward to your reply !

Hi Wang, instead of posting a new question at the end of a thread from a previous month, could you please post it as a new topic (new post)? Thank you – I’d be happy to answer there.

Hi Miles!
Sorry about my lagging response.
I have posted a new topic about my question over here Using purification method to prepare a finite temperature state of Bose-Hubbard model. - ITensor Julia Questions - ITensor Discourse