# qutip.sesolve and qutip.optimize_pulse_unitary produce different results

I'm currently trying out some things with qutip in the field of optimal control (state-to-state transfer) and have some trouble to reproduce my results from the optimization process with sesolve.

My code for the optimization is:

# define the main hamiltonian of our system
H_0 = Qobj(w[0:dimension]*np.identity(dimension))
# define the drive-hamiltonian
H_d = Qobj(matrix)
# define the control-list for later optimization
H_c = [H_d]

# define the initial state of our system
psi_0 = basis(dimension,0)
# define the target state of our system
psi_target = basis(dimension,1)

# define the projector onto the inital state (|psi_0><psi_0|)
proj0 = ket2dm(psi_0)
# define the projector onto the target state (|psi_target><psi_target|)
proj1 = ket2dm(psi_target)
.
.
.
result = cpo.optimize_pulse_unitary(H_0, H_c, psi_0, psi_target, n_ts, evo_time,
max_iter=max_iter, max_wall_time=max_wall_time,
init_pulse_type=p_type,
log_level=log_level, gen_stats=True)


Where I get a final fidelity error of 2.0313561943652303e-10.

I wanted to verify this result by taking the optimized pulse and plugging it into the qutip.sesolve function but doing so gives me fidelity errors which are not compatible with the result from the optimization.

My code for the sesolve function is:

# define an evenly spaced list with the number of intervals being equal to the the time steps of our control pulse
tlist = np.linspace(0, evo_time, n_ts)
# define the optimized pulse
optim_pulse = result.final_amps[:, 0]
# define our "Hamiltonian"
H = [H_0, [H_d, optim_pulse]]
# define the e_ops list
e_ops = [proj0, proj1]
# define the intial state
init_state = psi_0

options = Options()
options.store_states = True

# compute the time-evolution of the given Hamiltonian (including the drive term) from an inital state to a final state
evolved_State = qutip.sesolve(
H=H,
psi0=init_state,
tlist=tlist,
e_ops=e_ops,
options=options)


Which produces a fidelity error of 0.0011998990068043947.

I wondered if I'm doing something wrong with the application of the sesolve function or if its something else which produces this difference?

Using other inital pulses I even sometimes get final populations of the target state lower then the inital state while the optimization result says it converged in the fidelity error.

Would be awesome if anyone could share some input on this idea, thank you!