ob_solve
- class maxwellbloch.ob_solve.OBSolve(atom: dict | None = None, t_min: float = 0.0, t_max: float = 1.0, t_steps: int = 100, method: str = 'mesolve', opts: dict | None = None, savefile: str | None = None)[source]
Bases:
objectTime-domain master equation solver for a single spatial point.
Wraps
qutip.mesolve()to evolve an atomic density matrix described by anOBAtomover a user-defined time grid. Supports Doppler broadening via velocity classes and can save/load results to avoid recomputation.- Parameters:
atom – Dict (or empty dict for defaults) describing the atomic system; passed to
OBAtom.t_min – Start time of the simulation.
t_max – End time of the simulation.
t_steps – Number of time steps.
method – Solver method —
'mesolve'(Lindblad master equation) is the only supported value.opts – Dict of QuTiP solver options passed to
qutip.Options.savefile – Path prefix for caching solved results (
'.qu'extension appended automatically). PassNoneto disable caching.
- build_opts(opts: dict | None = None) dict[source]
Build the options dict to be passed into the QuTiP solver.
Any option available to the QuTiP solver is available here, we provide defaults for solving the optical Bloch equations. See [0] for details of all the available options.
Notes
- For a stiff problem, it may help to set ‘method’ to
‘bdf’ instead of ‘adams’.
- If the solver times out, try more ‘nsteps’, though
this will take longer.
- To speed up the solver, reduce atol and rtol, though this
will reduce accuracy.
Warning
There is no validation checking here. If you pass in an option which is not known to QuTiP it will throw an exception.
[0]: http://qutip.org/docs/4.2/guide/dynamics/dynamics-options.html
- obsolve(e_ops: list | None = None, opts: dict | None = None, recalc: bool = True, show_pbar: bool = False, save: bool = True) ndarray[source]
- set_field_rabi_freq_t_args(field_idx: int, t_args: dict) None[source]
- Set the Rabi frequency time function arguments. To be used with
set_field_rabi_freq_t_func
- Parameters:
field_idx – The field for which to set the Rabi frequency t_args
t_args – A dict representing the args to go with the t_func.
- set_field_rabi_freq_t_func(field_idx: int, t_func: Any) None[source]
- Set the Rabi frequency time function of a field to a new time
function. This is useful when you want to set a custom function, not one available in t_funcs.py
- Parameters:
field_idx – The field for which to set the Rabi frequency t_func
t_func – Rabi frequency as a function of time, f(t, args)