Skip to content
Blake Johnson edited this page Mar 26, 2015 · 33 revisions

Welcome to the Qlab wiki!

Usage Topics

General Structure

The ExpManager class provides the base interface for running experiments. It offers instrument management (connections, initialization), sweeps, measurement filters, and asynchronous data taking and processing. It is easier to understand this class by looking at an example use (cribbed from ExpScripter.example.m):

exp = ExpManager();
exp.dataFileHandler = HDF5DataHandler('myfilename.h5');

expSettings = json.read('mysettings.json'));
instrSettings = expSettings.instruments;
sweepSettings = expSettings.sweeps;
measSettings = expSettings.measurements;

for instrument = fieldnames(instrSettings)'
    instrName = instrument{1};
    instr = InstrumentFactory(instrName);
    add_instrument(exp, instrName, instr, instrSettings.(instrName));
end

sweepct = 1
for sweep = fieldnames(sweepSettings)'
    add_sweep(exp, sweepct, SweepFactory(sweepSettings.(sweep{1}), exp.instruments));
    sweepct = sweepct + 1;
end

% data source for M1
ch1raw = MeasFilters.RawStream('Ch1Raw', measSettings.Ch1Raw);
add_measurement(exp, 'Ch1Raw', ch1raw);

dh1 = MeasFilters.KernelIntegration('M1', measSettings.M1);
add_measurement(exp, 'M1', dh1);

exp.init();
exp.run();

Explanation

After creating an ExpManager object, we add a data file handler that will accept write commands as we take data. The HDF5DataHandler will store the data in an HDF5 file.

Next, we add instruments to the experiment with the add_instrument method. We take advantage of the InstrumentFactory method to lookup the instrument type and address from an instruments JSON file.

Then we add sweeps with the add_sweeps method. A SweepFactory method constructs a sweep object from a settings structure. The sweepct controls the order of sweeps, with sweepct=1 being the outer-most sweep.

The last step adds a measurement filter with the add_measurement method. The RawStream filter simply selects one of the physical channels from the digitizer, while the KernelIntegration filter allows one to filter the raw stream with an arbitrary linear filter (e.g. a boxcar filter or a matched filter).

Finally, you initialize and run the experiment.

Measurement Filters

Measurement filters work on a producer-consumer model. Each MeasFilter identifies a dataSource and listens to the DataReady events fired by the source. The sources can be either other MeasFilters or scopes/digitizers. The minimal chain of MeasFilters depends on the choice of digitizer. For a standard ADC card that does little or no additional processing of the input data, one needs a RawStream -> KernelIntegration chain, or a RawStream -> DigitalDemod -> KernelIntegration chain to reduce the input data to a single complex value per segment. Our custom firmware for the II X6 does this data reduction on the card, and one can choose an already reduced data stream with the StreamSelector filter.

Release Notes

Version 1.2

  • Fixed BBNAPS waveform mode bug that cut off the last 8 points of the waveform
  • Re-wrote Tek5014 driver (simpler and API consistency with APS)
  • StateComparator measurement filter for thresholding
  • Data variance fixes
  • Uses QGL for calibration experiments
  • Renamed preference 'ChannelParams' to 'ChannelParamsFile' for consistency with other preferences
  • load_data() can take a filename argument
  • Drivers for Kepco power supply, SRS lock-in, and Picosecond Pulse Labs pulse generator
  • mex function dotFirstDim for faster kernel application in DigitalHomodyne
  • Adds trace preservation constraint to QPT SDP
  • Fixes scope plotter on non-segment sweeps

Version 1.1

  • 64-bit Labbrick driver
  • Tracked spectroscopy example
  • Logistic regression filter in SingleShot experiment
  • Bug fix for compiling APS files with padded waveforms (varients)
  • Allow full SSB modulation on the APS
  • Use human-readable parameters in digitizer settings (Acqiris and Alazar drivers)
  • Allow amp/phase, real/imag, or amp/phase/real/imag (quad) plotting
  • Test for APS phase lock on APS.init()
  • Much faster Alazar data processing via processBuffer and processBufferAvg mex files (at least 8x speed increase in digitizer mode). Now fast enough to continuously stream at 500 MS/s.
  • Faster channelization with a polyphase resampling FIR filter for decimation (implemented with a mex file).

Version 1.0

This version represents a large departure from the previous API.

  • New, more easily scriptable ExpManager class
  • GUIs to create settings files now in PyQLab repo
  • Asynchronous data acquisition and plotting/looping, for nearly continuous streaming of single-shot data
  • Easily extend to an arbitrary number of measurement channels, including correlation channels.
  • Driver: Holzworth HS9000

Version 0.10

  • RB tomography sequences and analysis
  • FFTScope utility
  • APS streaming fixes
  • Fixes APS hot-plug crash bug

Version 0.9

New features:

  • Berkeley Nucleonics driver
  • PhaseMatrix driver
  • compact PatternGen itializers (e.g. pg = PatternGen("q1") where "q1" is a valid qubit label)
  • Re-organized pattern generation to use new Pulse class. Adds pretty-printing of pulse sequences with pg.print()
  • Fancy Python-based sequence plotter
  • Expanded APS memory to 32k waveform points and 8k LL entries
  • Robust tomography sequences and analysis

Fixes:

  • Found and fixed various edge cases in APS data streaming
  • Trigger pulses now work on the APS, even for trigger delays greater than the length of the current entry

Version 0.8

  • Completely re-written APS firmware. New features include: 2x waveform memory, 4x link list memory, faster data transfers, internal trigger intervals, smaller minimum LL entry size (8 samples), and pulsing idle LED.
  • Microwave source driver updates to work with GPIB or ethernet connections
  • Alazar card now works with muWaveSweep and TimeDomain
  • AWG settings now updated whenever TimeDomain.json is updated

Version 0.7.1

  • bug fix - APS driver now correctly handles sequence files with only a single bank of data per channel

Version 0.7

  • Multi-channel pulse compiler
  • Completely re-written libaps driver. Data transfers are roughly 10x faster (down to 11ms per channel of link list data). Supports a basic streaming mode to continuously send banks of link list data to the device. Pushed much more of the model into the C/C++ layer, so that MATLAB and python drivers are now just thin wrappers around the same base code.
  • Automated APE and SPAM calibration
  • All cfg data is now in JSON format.

Version 0.6

  • Now uses an HDF5 data storage format. Data loading is now self-contained -- we no longer need to generate experiment loop structures just to plot and manipulate data
  • APS sequence data is now also stored in an HDF5 format. Gone are the days of looking for waveforms or link lists at "#ref/g"...
  • Improved USB interface to APS.
  • KT frequency estimation used to seed Ramsey/Rabi fits

Version 0.5

  • Fixes simultaneous write commands to all 4 channels in an APS unit -> run() commands now work with all 4 channels enabled
  • Fixes glitches in APS channel output
  • New - specify marker/trigger outputs on APS link lists
  • New - fast error checking of waveform and link list data on APSes
  • Writing link list data to APS is now 3x faster
  • New - full arbitrary-axis pulse generation in PatternGen. Currently implemented for Tektronix target, only.
  • New - single-shot measurement fidelity sweeper
  • New - digital low-pass filtering in digital homodyne (5th order Bessel filter)
  • New - Pauli twirl and interleaved RB overlap tomography routines
  • Improvements to Python APS GUI
  • Qlab experiment GUIs now use a flexible layout manager, so that controls will re-size with the GUI window
  • Fast plot updates, and plotting no longer steals focus from the active window
  • New - QPC initialization routine
  • New - Anritsu spectrum analyzer driver

Version 0.4

  • Dramatic speed improvements in PatternGen. pg.bufferPulse() and pg.pulseFunction() are now at least 10x faster.
  • Qubit->channel mapping now stored in human-readable JSON files
  • Firmware improvements to the BBN APS
  • Semi-definite programming code for maximum likelihood estimation of process tomography data
  • Experiment quick-picker for TimeDomain

Version 0.3.1

  • Adds README information

Version 0.3

  • New GUI for managing qubit and channel parameters. This data is also now stored in the human-readable JSON file format.
  • Fixed convergence issues with mixer amplitude and phase calibration search.
  • New APS link list preprocessor, to ensure that only used waveforms and varients are stored in waveform memory.