Hello,
I have a time dependent hamiltionian with a simple polynomial function, whose gradient I find using Numpy's gradient function. I also specify the step size that the gradient function should use.
However, when passing the function and its gradient to Qutips mesolve function, i get the error:
ValueError: Shape of array too small to calculate a numerical gradient, at least (edge_order + 1) elements are required.
I think this is because usually you would pass the whole array of time which Numpy would calculate the gradient of, but in the case of mesolve in qutip, we are passing a float instead of an array, i.e. calculating 1 time point which numpy cannot use.
Does anyone know how i can get around this?
Kind Regards
Sahra