Add solve
and svn
to dispatched function
#2002
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add data layer functions needed to update
steadystate
to use qutip's data layer.Most of
steadystate
's methods solve the systemL(rho_ss) = 0
using different solver from numpy, scipy, mkl.This add the
solve
dispatched function to wraps this operation at the data layer level.For the
CSR
version, it gives access to all methods available inscipy.sparse.linalg
and our mkl version.For the
Dense
version,solve
andlstsq
fromnumpy.linalg
are made available.Options supported by numpy / scipy for each function are pass through:
qutip.data.solve(A, B, method, options)
callscipy.sparse.linalg.method(A, B, **options)
.Other methods of
steadystate
decompose the Liouvillian with eithereigen
orsvd
.svd
was added as a dispatched function, but only with specialization forDense
.I made a sparse version, but
svds
can't readily compute all singular values and does not respond well to splitting the problem into 2 like it was done for sparse eigensolver.This PR only include the new dispatched functions, not updated
steadystate
using them orQobj
interface.