Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renormalization of wave function during MCWF evolution #269

Closed
dehond opened this issue May 21, 2020 · 5 comments
Closed

Renormalization of wave function during MCWF evolution #269

dehond opened this issue May 21, 2020 · 5 comments

Comments

@dehond
Copy link

dehond commented May 21, 2020

I noticed that when I do a Monte Carlo Wave Function evolution with classical variables (using semiclassical.mcwf_dynamic(T, psi0, fquantum, fclassical, fjump_classical)) the wave function that gets passed into the classical DE's as specified by fclassical(t, psi, u, du) is not normalized. This influences the expectation values I calculate to update du; namely, they're too small. I imagine this happens because of the non-Hermitian nature of the problem.

My workaround is to divide every expectation value I calculate within the code by dagger(psi) * psi, so as to enforce normalization. This gives me the right result when I for instance compare my calculation of Doppler cooling to those one can find in the literature.

For me, this is fine, but I imagine it might affect some examples that are included in the documentation (this one, for instance).

@david-pl
Copy link
Member

Thanks for the report! This is actually a mistake in the example of Doppler cooling. I will fix that! During a time evolution with the MCWF method, the state is never normalized since the decreasing norm is a criterion for when a jump occurs. So you always need to normalize when computing expectation values in dynamic functions. I'm not sure if there would be a better way to do this. I also noticed that the documentation does a poor job in pointing this out, so I will improve this as well.

@dehond
Copy link
Author

dehond commented May 21, 2020

I see, thanks for acknowledging this! I think it would indeed be a good idea to make this more explicit in the documentation and in the examples.

@david-pl
Copy link
Member

On second thought, it might be a better idea to internally compute a normalized version of psi at each time step, which then gets passed to any dynamical function. This could then be turned off with a kwarg, but the default should be true.
Otherwise this can be quite an annoying trap for most users...

@dehond
Copy link
Author

dehond commented May 22, 2020

Indeed I think that would be helpful, but perhaps that's more invasive than simply updating the documentation and some of the examples.

@david-pl
Copy link
Member

I haven't found a good way to do this. It's not possible to know when (or if) the user needs a normalized state. Normalizing regardless of this hurts performance. So documenting it will have to do. Thanks again for pointing it out, though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants