Fortran implementation of the 2nd Order Weak Stochastic Runge-Kutta algorithm for simulating stochastic differential equations in Ito form,
f2py.
-
In the Fortran code, create functions (subroutines) for the drift and diffusion terms.
-
Edit the existing subroutines
driftanddiffusso that they call upon these subroutines. -
Create python .so module by running command:
f2py -c -m modulename filename.f90 -
The package may then used in python with
from modulename import *.
The examples show the application of the code to noisy dynamical systems and open quantum systems. These examples should clarify how parameters such as the initial condition, length of simulation and model parameters are passed from the Python code to Fortran.
-
Breuer and Petruccione - The Theory of Open Quantum Systems pg 362 eq (7.47) - eq. (7.49).
-
Kloeden and Platen - Numerical solutions of stochastic differential equations pg 486 eq. (1.1).
-
Milstein and Tretyakov - Stochastic Numerics for Mathematical Physics pg 104 eq. 2.20 .
