Git Product home page Git Product logo

variational_principle's People

Contributors

tiernan8r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

gharib85

variational_principle's Issues

Normalise Orthogonal States:

Orthogonal States are generated using scipy.linalg.null_space(), these orthogonal states need to be individually normalised to meet the orthonormal condition.

Incorrect Mathematical implementation:

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.

New issues with infinite values fixes:

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.

Incorrect integration:

The integration calculated is incorrect, this is particularly noticeable in the normalisation, where psi is incorrectly normalised.

Incorrect level numbering

n generated for each state is off by a multiple of 2n +1, either come up a new way of inferring it, or reverse formula above ^ ?

Inifinite Loop

The boolean controlling the while loop for the psi solver is never changed from True, so that the loop is infinite.

Calculation of <E>

The function energy_expectation(psi) returns an incorrect value for when compared against analytically solved for cases??

State ordering is wrong!

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.

Psi calculator

Loop function to calculate psi to a given accuracy for a given potential V.

Optimisation of Sampling

Entry sampling could possibly be weighted depending on the rate of change of the potential function,
controlling sampling weighting rather than pure random.

Removal of repeat calculations

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.

Loop quits after one full unchanged loop

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 .

Incorrect psi calculation:

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 ?.

Ground state achieved twice.

When converging to the lowest energy state, the ground state is achieved for n = 2, even with the correct orthonormal basis.

Integration improvement:

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.

Memory Leak

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.

Deviation in energies calculation.

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.

Repeat calculation errors

Repeat calculations of the same state vary slight, most likely due to rounding errors in the normalisation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.