I have posted the final -- workable and tested - versions
of two modules:
http://www.numeric-quest.com/haskell/Evolution.html
http://www.numeric-quest.com/haskell/Evolution_examples.html
Module Evolution handles time evolution of classical
and quantum linear systems. It basically has four functions:
The first two are the analytical solvers that assemble
the solutions from the eigenstates and time-dependent
coefficients. The third is a numerical integration
algorithm, and the last one specializes that algorithm
to quantum specific problems.
-----------
Function "homogeneous_solver" is for solving autonomous
homogeneous equations:
|x'(t)> = A |x(t)>
Function "nohomogeneous_solver" is for solving autonomous
nonhomogeneous equations:
|x'(t)> = A |x(t)> + |b(t)>
Function "sod_integrator" is a numerical integrator
of homogeneous but nonautonomous equations:
|x'(t)> = A(t)|x(t)>
such as the Schrodinger equation.
This integrator uses Second Order Differencing scheme (sod)
to guarantee stability of the solutions. Important for
paraboloic equations!
Function "amplitudes_via_sod" transforms Schrodinger
equation to a computable form and then calls the above
iterator.
------------
Module Evolution_examples tests all that functions
from module Evolution. The examples chosen are
as simple as possible - all are the well known problems
from the classical and quantum mechanics and the results
are easily verifiable by other means.
The results are plotted and discussed. There is
also a lot of rambling about spins, magnetic
resonance, etc.
Jan