Phionx/quantumnetworks

Fix kappa dt bug

Closed this issue · 3 comments

For a SingleModeSystem with kappa = 0 and some gamma, we expect to see some exponential decay. However, if we make gamma very small (~0.0001), then we see some spurious exponential growth in the time dynamics. We saw this bug previously when the step size dt was too large.

It seems that the value of gamma or kappa influences the optimal dt by quite a bit. So maybe we need to do some validation to choose the optimal dt based on some bounds on the params?

We can find an optimal dt using SolverOptimizer, as demonstrated in demos/analysis/SolverOptimizer.ipynb.

Does this help @shoumikdc ?

@Phionx actually yes! I guess it's important to run SolverOptimizer every time we try a new set of parameters, since potentially the change of param values could require a new optimal dt...

@Phionx I think this issue has to do with instabilitity due to the ForwardEuler algorithm. So it should be fixed by the trapezoidal/Newton solver method!