Orthogonal States are generated using scipy.linalg.null_space(), these orthogonal states need to be individually normalised to meet the orthonormal condition.
Hamiltonian is defined using the laplacian operator on the wavefunction psi. Current implementation takes the grad(grad(psi)) which is not equivalent to the laplacian, instead a laplacian function should be implemented, or the div(grad(psi)) will suffice.
The artifact fixes introduced by #41, also introduce changes that impact how the infinite values are handled, thus requiring a revamp of how to account for their introduced error.
The orthonormal states generated are in the wrong order:
The 0th ground state is fine.
The 2nd state is then generated,
Then the 1th
2 ...?
This is most likely due to orthogonal basis functions generated, where the referenced functions are wrong so that the incorrect ordering is achieved.
Entry sampling could possibly be weighted depending on the rate of change of the potential function,
controlling sampling weighting rather than pure random.
In the ground_state() method the energy expectation is calculated each iteration for an unchanged psi wavefunction so that the calculation can be saved to reduce computation time.
This happens because the loop condition compares the current to the previous . When the loop iterates across the entire range and never changes $\psi$, then the condition to reduce the tweak is met, however it also causes the loop to quit as now the previous is the exact same as the current .
Based off of the initial psi value calculated, the finalised ground state psi value can be very wrong.
If the initial psi is very small, then the final answer tends to a diraac delta function.
Solution could be to set some sort of convergence limit on ?.
Currently rectangular method is used for integration in normalise() & energy(). This could possibly be changed to Simpson's/Trapezoidal rule for a reduction in error.
Randomisation loop implementation relies on the method tweak_psi that creates copies of long array repeatedly, sucking up memory in the computer that isn't relinquished once the calculation is complete. One calculation of the ground state can take up to 2GB in RAM using this method.
When performing the same energy calculation for the same wavefunction state, the energies produce can occasionally vary by a magnitude of 10^-15eV , which is a tiny difference and likely due to a rounding error, but is still a difference non the less.
When comparing the calculated value against known answers, there is a certain error introduced, most likely due to the approximation in the Taylor expansion used.