Skip to content

Commit

Permalink
Full autopep8
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-mounce committed Dec 5, 2023
1 parent 825c649 commit 2ede7fe
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 13 deletions.
3 changes: 2 additions & 1 deletion qickdawg/nvpulsing/development/lockinodmrtwosources.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def initialize(self):

df_points = (self.cfg.mw1_end_freg - self.cfg.mw1_start_freg) // self.cfg.mw1_delta_freg + 1

self.add_sweep(NVQickSweep(self, self.mw1_frequency_register, self.cfg.mw1_start_freqMHz, self.cfg.mw1_end_freqMHz, df_points, source2=self.mw2_frequency_register))
self.add_sweep(NVQickSweep(self, self.mw1_frequency_register, self.cfg.mw1_start_freqMHz,
self.cfg.mw1_end_freqMHz, df_points, source2=self.mw2_frequency_register))

if self.cfg.pre_init:
self.pulse(ch=self.cfg.mw1_channel)
Expand Down
3 changes: 2 additions & 1 deletion qickdawg/nvpulsing/development/lockinodmrtwosources2.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ def plot_sequence(self):
plt.text(240, 710, "Repeat {} times".format(self.cfg.reps), fontsize=16)
plt.text(170, 465, "readout_integration = {} us".format(int(self.cfg.readout_integration_tus)), fontsize=14)
plt.text(485, 490, "relax_delay \n = {} us".format(str(self.cfg.relax_delay_tus)[:4]), fontsize=14)
plt.text(90, 520, "Sweep linearly from {} MHz to {} MHz in steps of {} MHz".format(int(self.cfg.mw_start_fMHz), int(self.cfg.mw_end_fMHz), str(self.cfg.mw_delta_fMHz)[:4]), fontsize=14)
plt.text(90, 520, "Sweep linearly from {} MHz to {} MHz in steps of {} MHz".format(
int(self.cfg.mw_start_fMHz), int(self.cfg.mw_end_fMHz), str(self.cfg.mw_delta_fMHz)[:4]), fontsize=14)
plt.title(" ODMR Pulse Sequence", fontsize=20)

def time_per_rep(self):
Expand Down
3 changes: 2 additions & 1 deletion qickdawg/nvpulsing/development/nvqicksweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def __init__(self, prog, reg, start, stop, expts, label=None,
self.scaling_factor = scaling_factor

if self.scaling_mode == 'exponential':
assert self.scaling_factor in ['17/16', '9/8', '5/4', '3/2'], 'Currently accepting only scaling values 17/16, 9/8, /5/4, 3/2'
assert self.scaling_factor in ['17/16', '9/8', '5/4',
'3/2'], 'Currently accepting only scaling values 17/16, 9/8, /5/4, 3/2'
self.numerator, self.denominator = self.scaling_factor.split('/')
self.numerator = int(self.numerator)
self.denominator = int(self.denominator)
Expand Down
3 changes: 2 additions & 1 deletion qickdawg/nvpulsing/hahnechodelaysweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ def plot_sequence(cfg=None):
plt.text(310, 395, " pi/2", fontsize=12)
plt.text(240, 465, "laser_readout_offset = {} treg".format(cfg.laser_readout_offset_treg), fontsize=10)
plt.text(390, 337, "readout_integration = {} us".format(str(cfg.readout_integration_tus)[:4]), fontsize=10)
plt.text(650, 357, "readout_integration \n = {} us".format(str(cfg.readout_integration_tus)[:4]), fontsize=10)
plt.text(650, 357, "readout_integration \n = {} us".format(
str(cfg.readout_integration_tus)[:4]), fontsize=10)
plt.text(850, 357, "relax_delay \n = {} us".format(str(cfg.relax_delay_tus)[:4]), fontsize=10)
plt.text(400, 430, "laser_on = {} us".format(cfg.laser_on_tus), fontsize=12)
plt.text(375, 605, " Sweep delay from {} us to {} us \n\
Expand Down
3 changes: 2 additions & 1 deletion qickdawg/nvpulsing/lockinodmr.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,5 +282,6 @@ def plot_sequence(cfg=None):
plt.text(295, 340, "Repeat {} times".format(cfg.reps), fontsize=16)
plt.text(200, 275, "readout_integration = {} us".format(int(cfg.readout_integration_tus)), fontsize=14)
plt.text(520, 290, "relax_delay \n = {} us".format(str(cfg.relax_delay_tus)[:4]), fontsize=14)
plt.text(130, 400, "Sweep linearly from {} MHz to {} MHz in steps of {} MHz".format(int(cfg.mw_start_fMHz), int(cfg.mw_end_fMHz), str(cfg.mw_delta_fMHz)[:4]), fontsize=14)
plt.text(130, 400, "Sweep linearly from {} MHz to {} MHz in steps of {} MHz".format(
int(cfg.mw_start_fMHz), int(cfg.mw_end_fMHz), str(cfg.mw_delta_fMHz)[:4]), fontsize=14)
plt.title(" ODMR Pulse Sequence", fontsize=20)
12 changes: 8 additions & 4 deletions qickdawg/nvpulsing/rabisweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,15 @@ def plot_sequence(cfg=None):
plt.imshow(mpimg.imread('../graphics/RABI.png'))
plt.text(420, 510, "Repeat {} times".format(cfg.reps), fontsize=14)
plt.text(350, 440, "laser_on_tus = {} us".format(str(cfg.laser_on_tus)[:4]), fontsize=14)
plt.text(195, 580, " Sweep pi/2 pulse time linearly from {} time register to {} time register in steps of {} time register".format(int(cfg.mw_start_treg), int(cfg.mw_end_treg), str(cfg.mw_delta_treg)[:4]), fontsize=12)
plt.text(265, 370, "readout_integration \n = {} ns".format(int(cfg.readout_integration_tns)), fontsize=14)
plt.text(527, 370, "readout_integration \n = {} ns".format(int(cfg.readout_integration_tns)), fontsize=14)
plt.text(195, 580, " Sweep pi/2 pulse time linearly from {} time register to {} time register in steps of {} time register".format(
int(cfg.mw_start_treg), int(cfg.mw_end_treg), str(cfg.mw_delta_treg)[:4]), fontsize=12)
plt.text(265, 370, "readout_integration \n = {} ns".format(
int(cfg.readout_integration_tns)), fontsize=14)
plt.text(527, 370, "readout_integration \n = {} ns".format(
int(cfg.readout_integration_tns)), fontsize=14)
plt.text(190, 368, " pi/2\npulse", fontsize=14)
plt.text(735, 370, "relax_delay \n = {} ns".format(int(cfg.relax_delay_tns)), fontsize=14)
plt.text(235, 407, "laser_offset = {} ns".format(int(cfg.laser_readout_offset_tns)), fontsize=14)
plt.text(430, 407, "readout_reference_start = {} us".format(int(cfg.readout_reference_start_tus)), fontsize=14)
plt.text(430, 407, "readout_reference_start = {} us".format(
int(cfg.readout_reference_start_tus)), fontsize=14)
plt.title(" Rabi Oscillation Pulse Sequence", fontsize=20)
6 changes: 4 additions & 2 deletions qickdawg/nvpulsing/ramsey.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,10 @@ def plot_sequence(cfg=None):
plt.text(310, 340, " pi/2", fontsize=12)
plt.text(240, 465, "laser_readout_offset = {} treg".format(cfg.laser_readout_offset_treg), fontsize=10)
plt.text(390, 337, "readout_integration = {} us".format(str(cfg.readout_integration_tus)[:4]), fontsize=10)
plt.text(650, 357, "readout_integration \n = {} us".format(str(cfg.readout_integration_tus)[:4]), fontsize=10)
plt.text(650, 357, "readout_integration \n = {} us".format(
str(cfg.readout_integration_tus)[:4]), fontsize=10)
plt.text(850, 357, "relax_delay \n = {} us".format(str(cfg.relax_delay_tus)[:4]), fontsize=10)
plt.text(400, 430, "laser_on = {} us".format(cfg.laser_on_tus), fontsize=12)
plt.text(375, 605, " Sweep delay linearly from {} to {} \n in {} steps".format(int(cfg.delay_start_tns), int(cfg.delay_end_tns), cfg.nsweep_points), fontsize=12)
plt.text(375, 605, " Sweep delay linearly from {} to {} \n in {} steps".format(
int(cfg.delay_start_tns), int(cfg.delay_end_tns), cfg.nsweep_points), fontsize=12)
plt.title(" Ramsey Pulse Sequence", fontsize=20)
6 changes: 4 additions & 2 deletions qickdawg/nvpulsing/t1delaysweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ def plot_sequence(cfg=None):
plt.text(250, 335, "pi", fontsize=10)
plt.text(240, 465, "laser_readout_offset = {} treg".format(cfg.laser_readout_offset_treg), fontsize=10)
plt.text(390, 337, "readout_integration = {} us".format(str(cfg.readout_integration_tus)[:4]), fontsize=10)
plt.text(650, 357, "readout_integration \n = {} us".format(str(cfg.readout_integration_tus)[:4]), fontsize=10)
plt.text(650, 357, "readout_integration \n = {} us".format(
str(cfg.readout_integration_tus)[:4]), fontsize=10)
plt.text(850, 357, "relax_delay \n = {} us".format(str(cfg.relax_delay_tus)[:4]), fontsize=10)
plt.text(400, 430, "laser_on = {} us".format(cfg.laser_on_tus), fontsize=12)
plt.text(325, 605, " Sweep delay from {} us to {} us \n in {} {} steps".format(int(cfg.delay_start_tns), int(cfg.delay_end_tns), cfg.nsweep_points, cfg.scaling_mode), fontsize=12)
plt.text(325, 605, " Sweep delay from {} us to {} us \n in {} {} steps".format(
int(cfg.delay_start_tns), int(cfg.delay_end_tns), cfg.nsweep_points, cfg.scaling_mode), fontsize=12)
plt.title(" T1 Pulse Sequence", fontsize=20)

0 comments on commit 2ede7fe

Please sign in to comment.