Skip to content

Commit

Permalink
Update flimesolve.py
Browse files Browse the repository at this point in the history
  • Loading branch information
magnamancer committed May 14, 2024
1 parent 4854091 commit 9f48428
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions qutip/solver/flimesolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ def flimesolve(
time_sense : float
Value of the secular approximation to use when constructing the rate
matrix R(t). Default value of zero uses the fully time-independent/most
strict secular approximation, values greater than zero have time
dependence. The default integration method change depending
on this value, "diag" for `0`, "adams" otherwise.
matrix R(t).Default value of zero uses the fully time-independent/most
strict secular approximation, and will utilize the "diag" solver method.
Values greater than zero have time dependence, and will subsequently
use the "Adams" method for the ODE solver.
options : None / dict
Dictionary of options for the solver.
Expand Down Expand Up @@ -661,6 +661,27 @@ def run(
stats["run time"] = time() - _time_start
return results

def steadystate(self):
"""
Uses the time-independent part of the Rate matrix to find the
steady state of the system. Note: This only uses the full secular
approximation.
"""
monomat = self.RateDic[0].full()
val, vec = np.linalg.eig(monomat)

idx = np.where(np.amin(abs(val)))
state = Qobj(
np.square(
np.reshape(
np.flip(vec[:, *idx]), (self.Hdim, self.Hdim), order="F"
)
)
)

test = self.floquet_basis.from_floquet_basis(state, 0)
return test

def _argument(self, args):
if args:
raise ValueError("FLiMESolver cannot update arguments")

0 comments on commit 9f48428

Please sign in to comment.