2
$\begingroup$

What is the cleanest/simplest way to use ItoProcess to solve the equation

$$i \text{d}\boldsymbol{\psi} = H\cdot\boldsymbol{\psi} \text{d}t + \boldsymbol{\psi}^2\text{d}t + \text{d}\mathbf{w},$$

where $H$ is a matrix, $\boldsymbol{\psi}$ is a vector, $\mathbf{w}$ is a vector of random processes, and $\boldsymbol{\psi}^2$ denotes the element-wise square. The initial condition for $\boldsymbol{\psi}$ is known. Here is some initial code (but I'm looking for a general approach that treats any number of simultaneous differential equations)

ClearAll["Global`*"];
H = RandomComplex[{-1 - I, 1 + I}, {4, 4}];
H = H + ConjugateTranspose[H];
psi0 = RandomComplex[{-1 - I, 1 + I}, 4];
process = ItoProcess["???"];
sim = RandomFunction[process, {0, 10, 0.01}]
ListPlot[Re[sim]]
$\endgroup$
3
$\begingroup$

Here's a way I worked out how to do it. It's not pretty though.

ClearAll["Global`*"];
L = 4;
H = RandomComplex[{-1 - I, 1 + I}, {L, L}];
H = H + ConjugateTranspose[H];
psi0 = ConstantArray[0, L];
variables = Table[Unique["x"], {L}];
X[t_] = #[t] & /@ variables;
wVariables = Table[Unique["w"], {L}];
w[t_] = #[t] & /@ wVariables;
wiener = # \[Distributed] WienerProcess[] & /@ (wVariables);
system = I \[DifferentialD]X[
         t][[#]] == ((H.X[
            t])[[#]] \[DifferentialD]t + \[DifferentialD](w[
           t])[[#]]) & /@ Range[L];
process = ItoProcess[system, X[t], {variables, psi0}, t, wiener];
sim = RandomFunction[process, {0, 10, 0.01}];
ListPlot[Abs[sim], Joined -> True]
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.