qutip-qip
qutip-qip copied to clipboard
Let the pulse coeff handle complex coefficients
This fixes issue #148
Hi @Wikstahl, thanks a lot for the PR!
It is probably better to set the dtype
of the new coefficient array to be the same as the old one, instead of always using a complex array.
Could you also add a new test for the complex coefficients?
Sure I can fix this! :)
I just pushed a patch with dtype=old_coeffs.dtype
This should make the test pass. However, it does not mean that the complex coefficient is fully supported. The Processor.plot_pulse
will still get a warning because of the complex numbers. But this at least lets the computation run without an error.
In fact, one can always rewrite complex coefficients by real ones with two sx
and sy
control terms. So real coefficient also has no loss of generality.