qcheff.magnus¶
Submodules¶
Package Contents¶
Functions¶
Dispatch Magnus to the appropriate backend based on device of the given array. |
API¶
- magnus(tlist: qcheff.operators.operator_base.qcheff_array, drift_ham: qcheff.operators.qcheffOperatorMatrix, control_sigs: qcheff.operators.operator_base.qcheff_array, control_hams: collections.abc.Sequence[qcheff.operators.qcheffOperatorMatrix])¶
Dispatch Magnus to the appropriate backend based on device of the given array.
Parameters
tlist : np.ndarray Time list. drift_ham : np.ndarray or cp.ndarray Drift Hamiltonian. control_sigs : np.ndarray Control signals. control_hams : np.ndarray or cp.ndarray Control Hamiltonians.
Returns
magnus_class : MagnusTimeEvolDense or MagnusTimeEvolSparseLazy An instance of the appropriate Magnus class based on the sparsity of the drift Hamiltonian.