-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResonatorFinder.py
68 lines (51 loc) · 1.68 KB
/
ResonatorFinder.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# -*- coding: utf-8 -*-
"""
=========================================================
Program : Quantum_Device_Profiler/ResonatorFinder.py
=========================================================
To Do:
- implement methods
"""
__author__ = "Sadman Ahmed Shanto"
__date__ = "02/13/2023"
__email__ = "shanto@usc.edu"
#libraries used
from utilities import *
import numpy as np
import os, sys
import Labber
class ResonatorVNA:
"""Docstring for ResonatorVNA:. """
def __init__(self, vna_obj, user_inputs):
"""TODO: to be defined. """
self.vna = vna_obj
self.config = parse_json(user_inputs)
self.resonances_exp = self.config["expected_resonances"]
self.num_resonances = len(self.resonances_exp)
self.res_types = self.config["res_type"]
self.resonances_found = None
def set_VNA_state(self,averages=10,if_bandwidth=1000,e_delay=102):
raise NotImplementedError()
def adjust_e_delay(self):
"""
algorithm:
- span long freq
- phase grad test -> make it flat or sloping down
"""
raise NotImplementedError()
def find_resonators(self):
resonances_found = []
for i, res_f in enumerate(self.resonances_exp):
res_found = self.find_resonator(res_f, self.res_types[i])
resonances_found.append(res_found)
def find_resonator(self, res_f, res_type):
"""
algorithm:
- go to res_f + big boundary
-
returns: found_resonant_freq (float) #GHz
TO DO:
- handle finding resonator by resonator type
- changing VNA mode and etc
"""
raise NotImplementedError()