Skip to content

Commit

Permalink
Update flimesolve.py
Browse files Browse the repository at this point in the history
Fixed FFTshift issue third time. Needed to flip the FFT'd collapse operators to get decay moving in the proper direction. Now FLiMESolve relaxes to MESolve for both pulsed and CW systems, and it even decays to zero like it should.
  • Loading branch information
magnamancer committed May 23, 2024
1 parent 80cd2fa commit 20f17ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qutip/solver/flimesolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ def _floquet_rate_matrix(floquet_basis, Nt, c_ops, time_sense=0):
c_op.full(),
modes_table,
)
c_op_Fourier_amplitudes_list = np.fft.fftshift(
np.fft.fft(c_op_Floquet_basis, axis=0)
) / len(tlist)
c_op_Fourier_amplitudes_list = np.flip(
np.fft.fftshift(np.fft.fft(c_op_Floquet_basis, axis=0))
/ len(tlist)
)

# Building the Rate matrix
delta_m = np.add.outer(-floquet_basis.e_quasi, floquet_basis.e_quasi)
Expand Down

0 comments on commit 20f17ab

Please sign in to comment.