qcheff.utils.system¶
Module Contents¶
Classes¶
Basic system description. |
API¶
- class QuTiPSystem¶
Basic system description.
Attributes
drift_ham : qt.Qobj or None Drift Hamiltonian. Qobj for the static part of the Hamiltonian. control_sigs : list of ControlPulse Control signals given as a list of ControlPulse objects. These encode the time-dependent part of the Hamiltonian. control_hams : list of qt.Qobj Time independent Qobj for the control Hamiltonians. These, when multiplied by the control signals, give the time-dependent part of the Hamiltonian.
- drift_ham: qutip.Qobj | None¶
None
- control_sigs: collections.abc.Sequence[qcheff.utils.pulses.ControlPulse]¶
None
- control_hams: collections.abc.Sequence[qutip.Qobj]¶
None
- get_qutip_tdham(tlist)¶
Returns a dict that works with qutip.mesolve. Only written for compatibility with QuTiP. This will not be used in Magnus.
Parameters
tlist : array_like List of time points.
Returns
list List of Hamiltonians and their corresponding time-dependent coefficients.
- get_magnus_system(tlist, *, device='cpu', sparse: bool = False)¶
Returns a MagnusTimeEvol object, using the correct backend for CPU/GPU. The backend is chosen based on the device argument. This is used to set up the Magnus time-evolution object. Not meant for optimization.
Parameters
tlist : array_like List of time points. device : str, optional Device to use, either ‘cpu’ or ‘gpu’. Default is ‘cpu’. sparse : bool, optional Whether to use sparse matrices. Default is False.
Returns
magnus.MagnusTimeEvol Magnus time-evolution object.
Raises
ValueError If sparse is not True or False. If device is not ‘cpu’ or ‘gpu’.
- plot_control_signals(tlist, axis=None, **kwargs)¶
Plotting pulses and such.
Parameters
tlist : array_like List of time points. axis : matplotlib.axes.Axes, optional Matplotlib axis object. If None, a new figure and axis will be created.
Returns
None