Modified time evolution of $U|\psi\rangle$ with TDVP #2094
-
|
Hi, I’m trying to figure out how to run a modified version of TDVP. I need to evolve a MCState ( I see that I also thought about adding U to the hamiltonian during state preparation but since I'll need to change where U is acting on at every step, finding the state would become quite time consuming. Any guidance on how to approach this correctly would be greatly appreciated. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The most straightforward thing you can do is to simply define the new variational state A way to do it is the following: ...
nn_model = nk.model.RBM()
vs = nk.vqs.MCState(sampler, nn_model)
U = nk.operator.spin.sigmax(hi, 1).to_jax_operator()
Unn_fun, Unn_variables = make_logpsi_U_afun(vs._apply_fun, vs.variables, U)
Uvs = nk.vqs.MCState(sampler, apply_fun=Unn_fun, variables=Unn_variables)the relevant function can be found in here Then everything will work out of th box. Uvs.sampler_state = Uvs.sampler_state.replace(σ= vs.sampler_state.σ)(or possibly something more sophisticated). Notice that this approach will increase the cost of your calculations by a factor of There are other schemes to do sort of what you want, but at a lower cost, for example by importance sampling the forces, but nothing that has been carefully ironed out. In a different setting, we discuss them in https://arxiv.org/pdf/2410.10720 (look for importance sampling) |
Beta Was this translation helpful? Give feedback.
The most straightforward thing you can do is to simply define the new variational state$$\ket{U\psi}$$ and use it.
A way to do it is the following:
the relevant function can be found in here
https://gist.github.com/PhilipVinc/5fcc9fbba0e5d6ed6d56f0a4325e2808
Then everything will work out of th box.
Be careful that when you create a new MCState, the sampler chains will be initialised completely at random, so if you do th…