Zero Temperature magnetization can be found by mgn=(inner(psi,Mz,psi))
Where Mz is uniform magnetization operator. Now my question is how can I find the finite temperature magnetization or other T dependent properties.
So as you likely know, the reason inner(psi,Mz,psi) gives the zero-temperature result is because psi is the ground state. In order to compute finite-temperature properties, you must compute the finite temperature state, either as a mixed state or as an average over a collection of pure states. There is an algorithm called the "ancilla algorithm" or "purification algorithm" for doing the first thing (mixed state), or an algorithm called minimally entangled typical thermal states (METTS) for the second thing (average over pure states).
Fortunately, I just added sample codes of how to do each to our examples folder! Here is the link:
Here are references for these two algorithms below also:
Purification or ancilla algorithm: