Boulder-Cryogenic-Quantum-Testbed / scresonators

Data analysis code for cryogenic resonator measurement
MIT License
30 stars 24 forks source link

Two more resonator fitting packages for consideration #49

Closed FaustinCarter closed 1 year ago

FaustinCarter commented 5 years ago

I really like the idea of bringing the superconducting resonator community together in an effort to standardize on how to actually fit and interpret data. There are two additional (cited in the literature) fitting packages available in python that focus on superconducting resonators that ought to be folded into this effort if possible.

https://github.com/sebastianprobst/resonator_tools https://github.com/FaustinCarter/scraps

It would be great to have a discussion on trade-offs between fitting methods. The code here uses differential evolution, my code defaults to levenberg marquardt for fitting and MCMC for uncertainty analysis, @sebastianprobst's mostly uses a least-squares method.

MartinWeides commented 5 years ago

The Probst code is outdated, please use the qkit code (also on github) instead.

Thanks, Martin

On Thu, 3 Oct 2019, 19:41 Faustin Carter, notifications@github.com wrote:

I really like the idea of bringing the superconducting resonator community together in an effort to standardize on how to actually fit and interpret data. There are two additional (cited in the literature) fitting packages available in python that focus on superconducting resonators that ought to be folded into this effort if possible.

https://github.com/sebastianprobst/resonator_tools https://github.com/FaustinCarter/scraps

It would be great to have a discussion on trade-offs between fitting methods. The code here uses differential evolution, my code defaults to levenberg marquardt for fitting and MCMC for uncertainty analysis, @sebastianprobst https://github.com/sebastianprobst's mostly uses a least-squares method.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Boulder-Cryogenic-Quantum-Testbed/measurement/issues/49?email_source=notifications&email_token=AAROB4MJWVHORGWLUTI2BM3QMY4F3A5CNFSM4I5GYTE2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPPOKPQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAROB4LRWJH4GQB2LO4QQZ3QMY4F3ANCNFSM4I5GYTEQ .

sebastianprobst commented 5 years ago

Hi Martin,

can you elaborate on why the code should be outdated? Did you write some improvements? Then, it would make sense to synchronize the repositories as many people use the "resonator_tools" directly.

The circlefit method at its core uses an algebraic fitting method for the resonance circle. For the rest, least squares are used. The algebraic fit ensures a relatively reliable fitting without the need for putting starting values, and it can correct for electric delay if one was too lazy to correct for it at the vna before performing the measurement.

In general, I wouldn't advise that the community uses a single tool. Instead, it would be beneficial to establish a standard that resonator data should be analyzed by at least two or more methods. This way we can ensure a high quality of the results and are somewhat robust to errors produced by the fitting methods.

The thing that would make sense is to define a standard data format for resonator data that can easily be exchanged and that resonator data can easily be provided along with our papers. Along these lines, we could set up an interactive web page that allows the user to fit his data with the methods described below. Let's discuss.

Best regards

Sebastian

Am 03.10.2019 um 21:00 schrieb MartinWeides:

The Probst code is outdated, please use the qkit code (also on github) instead.

Thanks, Martin

On Thu, 3 Oct 2019, 19:41 Faustin Carter, notifications@github.com wrote:

I really like the idea of bringing the superconducting resonator community together in an effort to standardize on how to actually fit and interpret data. There are two additional (cited in the literature) fitting packages available in python that focus on superconducting resonators that ought to be folded into this effort if possible.

https://github.com/sebastianprobst/resonator_tools https://github.com/FaustinCarter/scraps

It would be great to have a discussion on trade-offs between fitting methods. The code here uses differential evolution, my code defaults to levenberg marquardt for fitting and MCMC for uncertainty analysis, @sebastianprobst https://github.com/sebastianprobst's mostly uses a least-squares method.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub

https://github.com/Boulder-Cryogenic-Quantum-Testbed/measurement/issues/49?email_source=notifications&email_token=AAROB4MJWVHORGWLUTI2BM3QMY4F3A5CNFSM4I5GYTE2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPPOKPQ, or mute the thread

https://github.com/notifications/unsubscribe-auth/AAROB4LRWJH4GQB2LO4QQZ3QMY4F3ANCNFSM4I5GYTEQ .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Boulder-Cryogenic-Quantum-Testbed/measurement/issues/49?email_source=notifications&email_token=ADM2EP7OD2SFEGCWACOBPWTQMY6OBA5CNFSM4I5GYTE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAJHJ5A#issuecomment-538080500, or mute the thread https://github.com/notifications/unsubscribe-auth/ADM2EP7WKEOWHC5MA7PZHOTQMY6OBANCNFSM4I5GYTEQ.

joshmutus commented 5 years ago

Hi Faustin! Thanks for the links and comments!

For the fitting method we can do some refactoring to inject or otherwise the fitting method to the code and we can start doing some comparison to what methods are best. We had the levenberg marquardt and MCMC, but I removed that in some aggressive refactoring to streamline the code.

I think the next step is to add back a module that implements these methods so that we can compare apples to apples.

I think the obvious hook is here.

mullinska commented 5 years ago

Hi Faustin, I may be repeating Josh a little here, but thanks again for the links.

My name is Keegan, and I'm the one who has been writing most of the code on this repository with guidance from Corey Rae and some great code refactoring by Josh.

I've heard from Corey Rae that you have some very interesting code in the scraps repository. I'm delighted to have the chance to look through it to see all that we might be able to do. Specifically, the way you preprocess your data is very interesting to us as we are currently just subtracting a linear fit from the endpoints to "normalize" our code.

As for Probst's comment regarding a standard data format, we already have one which can be found here https://github.com/Boulder-Cryogenic-Quantum-Testbed/measurement/issues/19 although the concept of an interactive web page could prove rather difficult considering the user loses the versatility of being able to integrate their own python code and/or change certain aspects of the code to fit their specific needs.

I'm looking forward to seeing where we can go with all this.