<p dir="auto">Hello,</p>
<p dir="auto">I will try to summarize my problem in a simpler one. Suppose an H Hermitian operator that depends on an α parameter<br>
H = H (α), ψ (x) are eigenfunctions of H, ψ = ψ (x, α). Consider the following function<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/33531557/100629992-b9822080-3308-11eb-8e82-14c58e2a0e66.gif"><img src="https://user-images.githubusercontent.com/33531557/100629992-b9822080-3308-11eb-8e82-14c58e2a0e66.gif" alt="CodeCogsEqn" data-animated-image="" style="max-width: 100%;"></a><br>
where f(x) is a continuous function.</p>
<p dir="auto">The LinearAlgebra.eigvecs function provides ψ correctly, except that the ψ signal fluctuates randomly by + and -. Which is physically correct, because if ψ is a eigenfunction of H, then -ψ is also a eigenfunction with the same eigenvalue. So for some values of α, ψ is positive and for others negative, this happens randomly. In the end, the function J(α) is full of discontinuities. Is it possible to keep the ψ sign?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/33531557/100631634-b0924e80-330a-11eb-9acd-6e17dd822e6b.gif"><img src="https://user-images.githubusercontent.com/33531557/100631634-b0924e80-330a-11eb-9acd-6e17dd822e6b.gif" alt="sample" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">Thanks</p>