Hi, Simon. Much appreciated for your response. I figured out the problem with unphysical density matrix part a few days ago.
Regarding the coefficients of CRAB pulses, however, I'm still struggling to understand what are exactly these ".coeffs" related to the guess pulse. Basically, I produced a simple sine pulse as a (fixed) guess pulse for optim.pulse_generator[0] as follows:
crab_pgen = optim.pulse_generator[0]
guess_pgen = pulsegen.PulseGenSine(dyn=dyn)
guess_pgen.freq = 10/(evo_time*2*np.pi)
guess_pgen.start_phase = 0
guess_pgen.scaling = 1.0
guess_pgen.offset = 0
crab_pgen.guess_pulse = guess_pgen.gen_pulse()
crab_pgen.scaling = 1.0
crab_pgen.offset = 0.0
But whenever I print out "optim.pulse_generator[0].coeffs", it gives me different sets of parameters, which means that these parameters are not related to the guess sine pulse at all. Then what exactly do these parameters mean related to the guess pulse?
The main reason I'm confused is because as soon as we set the initial parameters that the optimization begins with (i.e. '.coffes' and 'freqs'), I thought the optimization starts with initial pulses generated by that parameters. However, it seems like that's not the case. As said above, it seems like these parameters are independent with guess pulses, which is very confusing to me.
Thanks.