supergrad.time_evolution._parse_hamiltonian

supergrad.time_evolution._parse_hamiltonian#

supergrad.time_evolution._parse_hamiltonian(q_object, tlist: Array, args: dict, diag_ops: bool)[source]#

Prepare the time dependent Hamiltonian for the solver.

Parameters:
  • q_object (list, array) – The time-dependent description of the quantum object. This is of the same format as the first parameter to the general ODE solvers; in general, it is a list of [ndarray, time_dependence] pairs that are summed to make the whole object. The time_dependence can be any of the formats discussed in the previous section.

  • args (dict, optional) – Mapping of {str: object}, discussed in greater detail above. The strings can be any valid Python identifier, and the objects are of the consumable types. See the previous section for details on the “magic” names used to access solver internals.

  • tlist (list, array) – List of the times any numpy-array coefficients describe. This is used only in at least one of the time dependence in H is given in Numpy-array format. The times must be sorted, but need not be equidistant. Values inbetween will be interpolated.

Returns:

Return a single ndarray at the given time t.

Return type:

func(Callable)