Skip to content

Commit

Permalink
Added argument for disabling metadata storage for spectroscopy methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniSean committed Feb 27, 2024
1 parent d9ea548 commit 3aa73e0
Showing 1 changed file with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3310,7 +3310,8 @@ def measure_qubit_frequency_dac_scan(self, freqs, dac_values,

def measure_spectroscopy(self, freqs, mode='pulsed_marked', MC=None,
analyze=True, close_fig=True, label='',
prepare_for_continuous_wave=True):
prepare_for_continuous_wave=True,
disable_metadata=False):
"""
Performs a two-tone spectroscopy experiment where one tone is kept
fixed at the resonator readout frequency and another frequency is swept.
Expand All @@ -3337,26 +3338,30 @@ def measure_spectroscopy(self, freqs, mode='pulsed_marked', MC=None,
self.measure_spectroscopy_CW(freqs=freqs, MC=MC,
analyze=analyze, close_fig=close_fig,
label=label,
prepare_for_continuous_wave=prepare_for_continuous_wave)
prepare_for_continuous_wave=prepare_for_continuous_wave,
disable_metadata=disable_metadata)
elif mode == 'pulsed_marked':
self.measure_spectroscopy_pulsed_marked(
freqs=freqs, MC=MC,
analyze=analyze, close_fig=close_fig,
label=label,
prepare_for_continuous_wave=prepare_for_continuous_wave)
prepare_for_continuous_wave=prepare_for_continuous_wave,
disable_metadata=disable_metadata)
elif mode == 'pulsed_mixer':
self.measure_spectroscopy_pulsed_mixer(
freqs=freqs, MC=MC,
analyze=analyze, close_fig=close_fig,
label=label,
prepare_for_timedomain=prepare_for_continuous_wave)
prepare_for_timedomain=prepare_for_continuous_wave,
disable_metadata=disable_metadata)
else:
log.error('Mode {} not recognized. Available modes: "CW", \
"pulsed_marked", "pulsed_mixer"'.format(mode))

def measure_spectroscopy_CW(self, freqs, MC=None,
analyze=True, close_fig=True, label='',
prepare_for_continuous_wave=True):
prepare_for_continuous_wave=True,
disable_metadata=False):
"""
Does a CW spectroscopy experiment by sweeping the frequency of a
microwave source.
Expand Down Expand Up @@ -3405,7 +3410,7 @@ def measure_spectroscopy_CW(self, freqs, MC=None,
else:
self.int_avg_det_single._set_real_imag(False)
MC.set_detector_function(self.int_avg_det_single)
MC.run(name='CW_spectroscopy'+self.msmt_suffix+label)
MC.run(name='CW_spectroscopy'+self.msmt_suffix+label, disable_snapshot_metadata=disable_metadata)
# Stopping specmode
if self.cfg_spec_mode():
UHFQC.spec_mode_off()
Expand All @@ -3417,7 +3422,8 @@ def measure_spectroscopy_pulsed_marked(self, freqs, MC=None,
analyze=True, close_fig=True,
label='',
prepare_for_continuous_wave=True,
trigger_idx = None):
trigger_idx = None,
disable_metadata=False):
"""
Performs a spectroscopy experiment by triggering the spectroscopy source
with a CCLight trigger.
Expand Down Expand Up @@ -3465,7 +3471,7 @@ def measure_spectroscopy_pulsed_marked(self, freqs, MC=None,
else:
self.int_avg_det_single._set_real_imag(False)
MC.set_detector_function(self.int_avg_det_single)
MC.run(name='pulsed_marker_spectroscopy'+self.msmt_suffix+label)
MC.run(name='pulsed_marker_spectroscopy'+self.msmt_suffix+label, disable_snapshot_metadata=disable_metadata)
# Stopping specmode
if self.cfg_spec_mode():
UHFQC.spec_mode_off()
Expand All @@ -3478,7 +3484,8 @@ def measure_spectroscopy_pulsed_marked(self, freqs, MC=None,
def measure_spectroscopy_pulsed_mixer(self, freqs, MC=None,
analyze=True, close_fig=True,
label='',
prepare_for_timedomain=True):
prepare_for_timedomain=True,
disable_metadata=False):
"""
Performs pulsed spectroscopy by modulating a cw pulse with a square
which is generated by an AWG. Uses the self.mw_LO as spec source, as
Expand Down Expand Up @@ -3541,7 +3548,7 @@ def measure_spectroscopy_pulsed_mixer(self, freqs, MC=None,

# d = self.int_avg_det
# MC.set_detector_function(d)
MC.run(name='pulsed_mixer_spectroscopy'+self.msmt_suffix+label)
MC.run(name='pulsed_mixer_spectroscopy'+self.msmt_suffix+label, disable_snapshot_metadata=disable_metadata)

self.mw_channel_amp(old_channel_amp)
# Stopping specmode
Expand Down

0 comments on commit 3aa73e0

Please sign in to comment.