-
Notifications
You must be signed in to change notification settings - Fork 109
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
Normalization Issue in the semiclassical solvers #414
Comments
Internally, the solver works with just a vector of complex numbers. That's also true for a Schrödinger equation without using semiclassical dynamics. However, there is a slight difference in how data is copied over to that vector of numbers. Essentially, when you're doing I'm not sure what the best way to fix it yet is, but in the meantime your second approach should actually work. But you have to be aware of how the data is structured since you're working with raw data, not quantum optics objects. Essentially a semiclassical state just consists of a You can adapt your normalization callback to only normalize the quantum part. Something like this should work: const n = length(ψsc0.quantum.data) # length of the quantum part of the data
function norm_func(integrator_state, t, integrator)
quantum_part = @view integrator_state[1:n]
normalize!(quantum_part)
end Can you try this and let me know if it works? |
@david-pl Thank you for your helpful advice regarding the normalization issue in our solver. Your explanation was clear and the proposed solution with the normalization callback was effective. |
I am attempting to calculate the ground state of a semiclassical system using imaginary-time evolution within the semiclassical.schroedinger_dynamic function. I am facing difficulties ensuring the normalization of the wavefunction.
I have referenced the examples provided in the QOJulia documentation for vortices (https://docs.qojulia.org/examples/vortex/) and spin-orbit-coupled BEC (https://docs.qojulia.org/examples/spin-orbit-coupled-BEC1D/). Based on these examples, I have attempted two methods to incorporate normalization operations into my function:
1. Direct Normalization in Function Definitions:
2. Using a Renormalization Callback:
Despite these efforts, the wavefunction obtained from both methods does not appear to be normalized.
Could someone please advise on how to properly implement wavefunction normalization within the semiclassical.schroedinger_dynamic function?
Thank you for your assistance.
The text was updated successfully, but these errors were encountered: