You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building the Hamiltonian QobjEvo, the entire list of samples of a Sequence is given to QuTip.
QuTip will then extrapolate (with Cubic spline) the values of the coefficients in between. This leads to artifacts when defining a piecewise constant pulse, at the transitions between plateaus.
One way to correct that would be to split the Sequence into constant and time-dependant parts and tell QuTip about it.
From QuTip documentation :
The times of the tlist do not need to be equidistant, but must be sorted. By default, a cubic spline interpolation will be used for the coefficient at time t. If the coefficients are to be treated as step functions, use the arguments args = {"_step_func_coeff": True}.
One way to edit build_coeffs_ops would be to split qobj_listinto the list of objects to be extrapolated (say qobj_list_spline) and the list to be kept piecewise constant (say qobj_list_pwcst) and replace
Now that I'm thinking about it. Another way to solve this issue would be to discard the sampling times altogether and to build the Hamiltonian QobjEvo by giving the functional dependence of the coefficients. This way Qutip doesn't do any interpolating
Using the _step_func_coeff argument in sesolve only gives a ~20% speedup when the Pulse is completely piecewise constant. Otherwise, it only gives a small increase in accuracy, at the expanse of a large slowing down of the computation.
Here is a short notebook illustrating the effect : pwc.ipynb.zip
When building the Hamiltonian QobjEvo, the entire list of samples of a Sequence is given to QuTip.
QuTip will then extrapolate (with Cubic spline) the values of the coefficients in between. This leads to artifacts when defining a piecewise constant pulse, at the transitions between plateaus.
One way to correct that would be to split the Sequence into constant and time-dependant parts and tell QuTip about it.
From QuTip documentation :
One way to edit
build_coeffs_ops
would be to splitqobj_list
into the list of objects to be extrapolated (sayqobj_list_spline
) and the list to be kept piecewise constant (sayqobj_list_pwcst
) and replaceby
The text was updated successfully, but these errors were encountered: