Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLiMESolve #2186

Open
wants to merge 88 commits into
base: master
Choose a base branch
from
Open

FLiMESolve #2186

wants to merge 88 commits into from

Conversation

magnamancer
Copy link

Description
Added FLiMESolve. Changed head to master branch after merging QuTiP 5.0.X to master.
Old PR here: #2140

hodgestar and others added 30 commits February 7, 2023 16:44
Reconstructed FLiMESolve and FLiMESolver to play more nicely with other QuTiP functions. Wrote FLiMESolver into the correlation tab, but had to add taulist as an input into the _make_solver function.
Trying to rework the time list stuff in FlimeSolve/er to work better with QuTiP. Namely, autogeneration of the time list to create the rate matrix & trying to avoid time list in solver.run so I don't have to do anything kludgey to get the modes in an expedient way
Rewrote the mode table in solver.run() to be found in a slightly slower, but much more generalized fashion
Figured out how to do Expectation operators with my construction of the solvers, and I added a constraint the to the available frequencies in the relaxed secular approx. based on the Nyquist theorem.
Added flimesolve to dynamics-floquet documentation, and added floquet_ex4 as an example usage (identical to floquet_ex3 with exception of use of  flimesolve instead of fmmesolve)

Added towncrier changelog...I think
Got rid of a few commented lines that were not useful
Deleted folder of scripts I'm using to write a paper about this solver
I fixed linting, extra spacing, and blank line issues. Moved all new functions to flimesolve.py. Replaced scipy functions with Numpy equivalents. Fixed issues in correlation.py by updating to my most current version, which should just introduce flimesolve.py as an additional solver.
Commented out a [0] in line 91 for some reason. I uncommented it now to bring it better in line with correlation.py
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
Used built-in autoformat in Spyder and then pycodestyle afterwards to fix code format to PEP8 guidelines.
Made a few changes caught by CodeClimate on Github
@magnamancer
Copy link
Author

@Ericgig Pushed all the changes, this time.

qutip/solver/flimesolve.py Outdated Show resolved Hide resolved
qutip/solver/flimesolve.py Outdated Show resolved Hide resolved
Copy link
Member

@Ericgig Ericgig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • There are no tests with time_sense not 0.
  • These are no tests with correlation using flimesolve.

Updates test_flimesolve.py to include a test with nonzero time_sense value and to include a test for the correlation function. Also fixed some typos/added a few words in places.
@magnamancer
Copy link
Author

@Ericgig I fixed the typos you mentioned and added a test in for nonzero timesense values and for the correlation functions. I also fixed the typo you mentioned and added a short descriptor for FLiMESolve above the "parameters" in documentation.

qutip/solver/flimesolve.py Outdated Show resolved Hide resolved
Fixed some bad documentation on c_ops. Also added a bit more about which method is used depending on time_sense values.
Updated Correlation test to be much cleaner, more streamlined. Also removed a bunch of unnecessary numpy functions and replaced with QuTiP functions where applicable.
qutip/solver/flimesolve.py Outdated Show resolved Hide resolved
qutip/solver/flimesolve.py Outdated Show resolved Hide resolved
qutip/tests/solver/test_flimesolve.py Outdated Show resolved Hide resolved
qutip/tests/solver/test_flimesolve.py Outdated Show resolved Hide resolved
qutip/tests/solver/test_flimesolve.py Outdated Show resolved Hide resolved
qutip/tests/solver/test_flimesolve.py Outdated Show resolved Hide resolved
qutip/tests/solver/test_flimesolve.py Outdated Show resolved Hide resolved
magnamancer and others added 9 commits May 4, 2024 10:39
Updated Flimesolve with a steady state solver. This uses the rate matrix as an analogue for the Monodromy matrix to find the steady state of the system in the full secular approximation. Not sure if adding in more time-dependence (if possible) would do anything, as I think that would just cause the solution to orbit/rotate around the time independent result.
Attempting to fix the build error.
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
@magnamancer
Copy link
Author

@Ericgig Hey Eric, added your changes to the test, fixed the documentation error as well. I also added a steady state solver, would you want me to make a test for that?

qutip/solver/flimesolve.py Outdated Show resolved Hide resolved
Removed the steady state solver to add it in as a separate PR later.
@magnamancer magnamancer requested a review from Ericgig May 7, 2024 16:05
Fixed some issues in the correlation function test
Copy link
Member

@Ericgig Ericgig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I discussed with @hodgestar and we want citation(s) to paper(s) where the equations are explained added before merging.

Fixed an fftshift causing state decay to move backwards. This was already fixed and made its way back in somehow. I...don't know.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants