-
Notifications
You must be signed in to change notification settings - Fork 653
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
Adding extra fitting methods for quantum environments #2594
base: master
Are you sure you want to change the base?
Conversation
…_gsoc_app into bath_pr_refactor2
qutip/core/environment.py
Outdated
@@ -767,6 +768,133 @@ def approx_by_sd_fit( | |||
ckAR, vkAR, ckAI, vkAI, combine=combine, T=self.T, tag=tag) | |||
return approx_env, fit_info | |||
|
|||
def approx_by_aaa( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we might have an every growing number of such methods so perhaps we should have one method named approximate
that accepts a method name and dispatches the rest of the arguments to the implementing functions. For example, in a simple implementation .approximate("aaa", ...)
might end up calling _approx_by_aaa(...)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Simon,
I wasn´t expecting any comment so soon, thanks a lot!
Indeed, there seems to be a growing number of methods appearing in the literature. I added the ones in this review article (sorry to attach a paper behind a paywall sadly no arxiv 😢 ). If @pmenczel agrees then I think that's probably the best solution, I guess the main issue would be that some methods don´t take in the same parameters so it might be confusing for a user but I think that's fine 😄
To be honest for my purposes only Prony and AAA are of importance, but since the other ones are similar I included them as well, but not 100% sure all should be included in the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle I would like an implementation like .approximate("aaa", ...)
. That is actually how I implemented it at first. However, I found it very annoying to use since all the methods require different parameters, and the IDE then didn't show a tooltip listing the required parameters. That is why I went with having different functions.
Perhaps that could be fixed using @overload
, though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I played around with overload in the last week, and I could get the hinting working for simple cases, but when doing it similarly in the code we already have for some reason it no longer works, at least not in vscode, I'm still looking into it though!
Sorry for not replying before 😢
…ed, probably more representative ones
Description
This PR aims to add other methods used to generate decaying exponential decompositions of environments. The methods added in this PR have been applied to fermionic environments in the literature, while the current draft PR only implements these methods for bosonic environments, hopefully they can be used in fermionic environments soon. The key issue there is how to create the interface for the creation of arbitrary fermionic environments.
The methods this PR aims to add are :
Checklist
Related issues or PRs
#2580