Solvers
Summary
OpenQuantumTools.jl
provides the following solvers:
solve_schrodinger
: Schrödinger equation solver;solve_von_neumann
: von Neumann equation solver;solve_unitary
: unitary solver;solve_lindblad
: Lindblad equation solver;solve_redfield
: Redfield equation solver;solve_cgme
: coarse-grained master equation solver ([1] Completely positive master equation for arbitrary driving and small level spacing);solve_ule
: universal Lindblad equation solver ([2] Universal Lindblad equation for open quantum systems);solve_ame
: adiabatic master equation solver ([3] Quantum adiabatic markovian master equations);build_ensembles
: build EnsembleProblem for stochastic noise or quantum trajectories simulation.
Solver options
Each solver in OpenQuantumTools
has some algorithm-dependent options. Meanwhile, they also share some common options and inherit an even larger set of common arguments from DifferentialEquations universe. We summarize some of these options below:
Common solver options
vectorize::Bool = false
: For equations with a density matrix, this argument denotes whether to vectorize the equation.tspan = (0, tf)
: Denotes the time interval over which to solve the dynamics. This option is not supported for master equations (MEs) which require integrating over the previous dynamics, e.g., the Redfield equation, the CGME, and the ULE.
Redfield/ULE/CGME
unitary
: This is a positional argument. The user needs to provide the precomputed or predefined unitary operator through this argument.Ta
: Forsolve_cgme
, it denotes the coarse-graining time. If set tonothing
, the solver will automatically choose the value. The default value isnothing
. Forsolve_redfield
andsolve_ule
, it denotes the integration region in their corresponding Liouville operator. The default value istf
.int_atol
: The absolute error tolerance for the internal integration algorithm.int_rtol
: The relative error tolerance for the internal integration algorithm.
AME
ω_hint=[]
: Specifies a grid over which to precompute the $S$ function in the Lamb shift term. The precomputation is skipped if it is empty.lambshift::Bool=true
: Denotes whether to include the Lamb shift term in the simulation.lambshift_S=nothing
: The user can provide a custom routine to calculate theS
function in the Lamb shift term via this argument.lvl::Int=size(A.H, 1)
: The argument specifies the number of levels to keep in the simulation. Higher levels will be ignored to speed up the computation.one_sided=false
: It denotes whether to solve the one-sided AME or the Lindblad form.
ODE solver options
Extra keyword arguments kwargs
are directly passed to the ODE solve interface. Every solver option in DifferentialEquations
is supported. Several useful options are:
alg
: This argument specifies the ODE algorithm to use. Users can find a list of the available solver algorithms here. The default option (Tsitouras 5/4 Runge-Kutta method) performs well for most problems. For equations with the density matrix, the implicit methods are only supported whenvectorize
is set to true.save_everystep
: Denotes whether to save the result at every step. Setting it tofalse
can significantly reduce memory consumption when the problem size is large.saveat
: This argument denotes specific times to save the solution at, during the solution phase. It overrides thesave_everystep
argument. Saving only at a small number of points can also significantly reduce memory consumption when the problem size is large.tstops
: Denotes extra times that the time-stepping algorithm must step to. It will increase the accuracy if the algorithm is instructed to step to the known singular points of the problem.abstol=1e-6
: Absolute tolerance in adaptive time-stepping. This is the tolerance on local error estimates, not necessarily the global error (though these quantities are related). In real applications, it is usually chosen by trial and error. It needs to be small when the total evolution time is long.reltol=1e-3
: Relative tolerance in adaptive time-stepping. This is the tolerance on local error estimates, not necessarily the global error (though these quantities are related). In real applications, it is usually chosen by trial and error. It needs to be small when the total evolution time is long.
Examples
All the above solvers have detailed examples in HOQSTTutorial.jl.