qick.averager_program
Several helper classes for writing qubit experiments.
Classes
|
AveragerProgram class is an abstract base class for programs which do loop over experiments in hardware. |
|
RAveragerProgram class, for qubit experiments that sweep over a variable (whose value is stored in expt_pts). |
- class qick.averager_program.AveragerProgram(cfg)[source]
Bases:
qick.qick_asm.QickProgram
AveragerProgram class is an abstract base class for programs which do loop over experiments in hardware. It consists of a template program which takes care of the loop and acquire methods that talk to the processor to stream single shot data in real-time and then reshape and average it appropriately.
- Parameters
cfg (dict) – Configuration dictionary
- initialize()[source]
Abstract method for initializing the program and can include any instructions that are executed once at the beginning of the program.
- make_program()[source]
A template program which repeats the instructions defined in the body() method the number of times specified in self.cfg[“reps”].
- acquire_round(soc, threshold=None, angle=[0, 0], readouts_per_experiment=1, save_experiments=[0], load_pulses=True, progress=True, debug=False)[source]
This method optionally loads pulses on to the SoC, configures the ADC readouts, loads the machine code representation of the AveragerProgram onto the SoC, starts the program and streams the data into the Python, returning it as a set of numpy arrays.
config requirements: “reps” = number of repetitions; “adc_freqs” = [freq1, freq2] the downconverting frequencies (in MHz) to be used in the adc_ddc; “adc_lengths” = how many samples to accumulate over for each trigger;
- Parameters
soc (Qick object) – Qick object
threshold (int) – threshold
angle (list) – rotation angle
readouts_per_experiment (int) – readouts per experiment
save_experiments (list) – saved experiments
load_pulses (bool) – If true, loads pulses into the tProc
progress (bool) – If true, displays progress bar
debug (bool) – If true, displays assembly code for tProc program
- Returns
- acquire(soc, threshold=None, angle=[0, 0], readouts_per_experiment=1, save_experiments=[0], load_pulses=True, progress=True, debug=False)[source]
This method optionally loads pulses on to the SoC, configures the ADC readouts, loads the machine code representation of the AveragerProgram onto the SoC, starts the program and streams the data into the Python, returning it as a set of numpy arrays. config requirements: “reps” = number of repetitions; “adc_freqs” = [freq1, freq2] the downconverting frequencies (in MHz) to be used in the adc_ddc; “adc_lengths” = how many samples to accumulate over for each trigger;
- Parameters
soc (Qick object) – Qick object
threshold (int) – threshold
angle (list) – rotation angle
readouts_per_experiment (int) – readouts per experiment
save_experiments (list) – saved experiments
load_pulses (bool) – If true, loads pulses into the tProc
progress (bool) – If true, displays progress bar
debug (bool) – If true, displays assembly code for tProc program
- Returns
- get_single_shots(di, dq, threshold, angle=[0, 0])[source]
This method converts the raw I/Q data to single shots according to the threshold and rotation angle
- acquire_decimated(soc, load_pulses=True, progress=True, debug=False)[source]
This method acquires the raw (downconverted and decimated) data sampled by the ADC. This method is slow and mostly useful for lining up pulses or doing loopback tests.
config requirements: “reps” = number of repetitions; “adc_freqs” = [freq1, freq2] the downconverting frequencies (in MHz) to be used in the adc_ddc; “adc_lengths” = how many samples to accumulate over for each trigger;
- Parameters
- Returns
- class qick.averager_program.RAveragerProgram(cfg)[source]
Bases:
qick.qick_asm.QickProgram
RAveragerProgram class, for qubit experiments that sweep over a variable (whose value is stored in expt_pts). It is an abstract base class similar to the AveragerProgram, except has an outer loop which allows one to sweep a parameter in the real-time program rather than looping over it in software. This can be more efficient for short duty cycles. Acquire gathers data from both ADCs 0 and 1.
- Parameters
cfg (dict) – Configuration dictionary
- initialize()[source]
Abstract method for initializing the program and can include any instructions that are executed once at the beginning of the program.
- make_program()[source]
A template program which repeats the instructions defined in the body() method the number of times specified in self.cfg[“reps”].
- get_expt_pts()[source]
Method for calculating experiment points (for x-axis of plots) based on the config.
- Returns
Numpy array of experiment points
- Return type
array
- acquire_round(soc, threshold=None, angle=[0, 0], readouts_per_experiment=1, save_experiments=[0], load_pulses=True, progress=True, debug=False)[source]
This method optionally loads pulses on to the SoC, configures the ADC readouts, loads the machine code representation of the AveragerProgram onto the SoC, starts the program and streams the data into the Python, returning it as a set of numpy arrays.
config requirements: “reps” = number of repetitions; “adc_freqs” = [freq1, freq2] the downconverting frequencies (in MHz) to be used in the adc_ddc; “adc_lengths” = how many samples to accumulate over for each trigger;
- Parameters
soc (Qick object) – Qick object
threshold (int) – threshold
angle (list) – rotation angle
readouts_per_experiment (int) – readouts per experiment
save_experiments (list) – saved experiments
load_pulses (bool) – If true, loads pulses into the tProc
progress (bool) – If true, displays progress bar
debug (bool) – If true, displays assembly code for tProc program
- Returns
- get_single_shots(di, dq, threshold, angle=[0, 0])[source]
This method converts the raw I/Q data to single shots according to the threshold and rotation angle
- acquire(soc, threshold=None, angle=[0, 0], load_pulses=True, readouts_per_experiment=1, save_experiments=[0], progress=True, debug=False)[source]
This method optionally loads pulses on to the SoC, configures the ADC readouts, loads the machine code representation of the AveragerProgram onto the SoC, starts the program and streams the data into the Python, returning it as a set of numpy arrays. config requirements: “reps” = number of repetitions; “adc_freqs” = [freq1, freq2] the downconverting frequencies (in MHz) to be used in the adc_ddc; “adc_lengths” = how many samples to accumulate over for each trigger;
- Parameters
soc (Qick object) – Qick object
threshold (int) – threshold
angle (list) – rotation angle
readouts_per_experiment (int) – readouts per experiment
save_experiments (list) – saved experiments
load_pulses (bool) – If true, loads pulses into the tProc
progress (bool) – If true, displays progress bar
debug (bool) – If true, displays assembly code for tProc program
- Returns