the Loschmidt echo is calculated by default for the time evolution, i.e., of the initial state |psi(t=0)> with the current state of the time evolution |psi(t)>. The fidelity can be written in terms of the Loschmidt echo for pure states.
Using this implementation, you can specify additional states for distance measures, which works in statics and dynamics. The measurement requires that the states are given when starting the simulation.
If you want to measure the distance between ground states of your static simulations, I can see two solutions. (a) Running simulations in serial, you could specify the distance measure to the previous simulation(s) knowing they must be there. But this approach does not work using MPI as one cannot tell which simulation will finish first. (b) For large projects I would first calculate all ground states with MPI and in a second run calculate the fidelities. You calculate the ground states again but feed in the previous results as initial guess and simulations should converge quickly / instantaneously. Moreover, you now specify the distance measure to other ground states from the first run and can be sure they are all present.
Let us know if you run into problems settings this up.
You can set an initial guess for the statics with the key 'initial_statics' in the simulation dictionary. You have access to the hashes after calling MPSWriteFiles in the simulation dictionary, which constructs the filename for the statics together with an index for ground/excited states as well as the convergence parameter.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Is it possible to calculate fidelity using OSMPS? By fidelity, I mean the overlap of two wavefunctions.
with best regards,
Arya
Hello Arya,
the Loschmidt echo is calculated by default for the time evolution, i.e., of the initial state |psi(t=0)> with the current state of the time evolution |psi(t)>. The fidelity can be written in terms of the Loschmidt echo for pure states.
Using this implementation, you can specify additional states for distance measures, which works in statics and dynamics. The measurement requires that the states are given when starting the simulation.
If you want to measure the distance between ground states of your static simulations, I can see two solutions. (a) Running simulations in serial, you could specify the distance measure to the previous simulation(s) knowing they must be there. But this approach does not work using MPI as one cannot tell which simulation will finish first. (b) For large projects I would first calculate all ground states with MPI and in a second run calculate the fidelities. You calculate the ground states again but feed in the previous results as initial guess and simulations should converge quickly / instantaneously. Moreover, you now specify the distance measure to other ground states from the first run and can be sure they are all present.
Let us know if you run into problems settings this up.
Best regards,
Daniel
P.S.
The observable for distance measures
You can set an initial guess for the statics with the key 'initial_statics' in the simulation dictionary. You have access to the hashes after calling MPSWriteFiles in the simulation dictionary, which constructs the filename for the statics together with an index for ground/excited states as well as the convergence parameter.