ExpMPOEvolution.run() vs. update()
Posted: 20 Sep 2022, 22:32
Hello,
I am calculating some expectation values for a range of time steps. I have some MPS psi_0 and the following evolution:
Let's say I want to calculate quantities at 100 time steps. What's the most efficient way of doing so? Should I do something like
I assume I can just initialize evol once and then just repeatedly make it run, right?
I browsed through the code though and saw that run() is calling the update() method. Should I call this in each iteration of the loop instead?
Another option, I guess, is to use checkpoints, interrupt the run, do something to the wavefunction and then resume the run?
Thank you very much and best regards!
I am calculating some expectation values for a range of time steps. I have some MPS psi_0 and the following evolution:
Code: Select all
evol_params = {'approximation': 'I', 'dt': 0.1, 'N_steps': 1}
Code: Select all
psi_new = psi_0
for time_step in range(100):
evol = ExpMPOEvolution(psi_new, model, evol_params)
psi_new = evol.run()
do something with psi_new
I assume I can just initialize evol once and then just repeatedly make it run, right?
Code: Select all
evol = ExpMPOEvolution(psi_0, model, evol_params)
for time_step in range(100):
psi_new = evol.run()
do something with psi_new
Another option, I guess, is to use checkpoints, interrupt the run, do something to the wavefunction and then resume the run?
Thank you very much and best regards!