auspex package

Subpackages

auspex.config module

auspex.config.isnotebook()
auspex.config.load_db()

auspex.data_format module

class auspex.data_format.AuspexDataContainer(base_path, mode='a', open_all=True)

A container for Auspex data. Data is stored as datasets which may be of any dimension. These are in turn organized by groups which can be used to store related information. Data is stored as a binary file plus a json metafile which describes the dimension and type of data stored.

Example organization

DataContainer:
- QubitOneGroup
| - DemodulatedData
| - ThresholdedData
- QubitTwoGroup | - RawData | - DemodulatedData
close()

Close the data container.

new_dataset(groupname, datasetname, descriptor)

Add a dataset to a specific group.

Parameters:
  • groupname – Name of the group to which to add the dataset.

  • datasetname – Name of the dataset to be added.

  • descriptorDataStreamDescriptor that describes the dataset that is to be added.

new_group(groupname)

Add a group to the data container.

Parameters:

groupname – Name of the data group to be added to the data container.

open_all()

Open all of the datasets contained in this DataContainer. This also populates the list of groups.

Returns:

A dictionary of all of the datasets, which each item as an (array, descriptor) tuple.

open_dataset(groupname, datasetname)

Open a particular dataset stored in this DataContainer.

Parameters:
  • groupname – The group name of the data that is to be opened.

  • datasetname – The name of the dataset that is to be opened.

Returns:

A numpy array of the data stored. desc: DataStreamDescriptor for the data stored.

Return type:

data

auspex.experiment module

class auspex.experiment.Experiment

The measurement loop to be run for each set of sweep parameters.

add_axis(axis, position=0)
add_direct_plotter(plotter)

A plotter that lives outside the filter pipeline, intended for advanced use cases when plotting data during refinement.

add_manual_plotter(plotter, callback=None)
add_sweep(parameters, sweep_list, refine_func=None, callback_func=None, metadata=None)
clear_sweeps()

Delete all sweeps present in this experiment.

connect_instruments()
connect_to_plot_server()
declare_done()
disconnect_instruments()
final_init()
get_final_plots(quad_funcs=[<ufunc 'absolute'>, <function angle>])
init_dashboard()
init_instruments()

Gets run before a sweep starts

init_progress_bars()

initialize the progress bars.

init_streams()

Establish the base descriptors for any internal data streams and connectors.

pop_sweep(name)

Remove sweep that has a given name.

push_to_plot(plotter, data)

Push data to a direct plotter.

reset()
run()

This is the inner measurement loop, which is the smallest unit that is repeated across various sweep variables. For more complicated run control than can be provided by the automatic sweeping, the full experimental operation should be defined here

run_sweeps()
set_graph(edges)
set_stream_compression(compression='zlib')
shutdown()
shutdown_instruments()

Gets run after a sweep ends, or when the program is terminated.

start_manual_plotters()
stop_manual_plotters()
sweep()
update_descriptors()
class auspex.experiment.ExperimentGraph(edges)
create_graph(edges)
dfs_edges()
class auspex.experiment.MetaExperiment(name, bases, dct)

Meta class to bake the instrument objects into a class description

auspex.experiment.auspex_plot_server()
auspex.experiment.update_filename(filename, add_date=True)

Update the file number and date.

auspex.log module

auspex.log.in_jupyter()

auspex.parameter module

class auspex.parameter.BoolParameter(name=None, unit=None, default=None, value_range=None, allowed_values=None, increment=None, snap=None)
property value
class auspex.parameter.FilenameParameter(*args, **kwargs)
class auspex.parameter.FloatParameter(name=None, unit=None, default=None, value_range=None, allowed_values=None, increment=None, snap=None)
property value
class auspex.parameter.IntParameter(name=None, unit=None, default=None, value_range=None, allowed_values=None, increment=None, snap=None)
property value
class auspex.parameter.Parameter(name=None, unit=None, default=None, value_range=None, allowed_values=None, increment=None, snap=None)

Encapsulates the information for an experiment parameter

add_post_push_hook(hook)
add_pre_push_hook(hook)
assign_method(method)
dict_repr()

Return a dictionary representation. Intended for Quince interop.

push()
property value
class auspex.parameter.ParameterGroup(params, name=None)

An array of Parameters

assign_method(methods)
push()
property value

auspex.stream module

class auspex.stream.DataAxis(name, points=[], unit=None, metadata=None, dtype=<class 'numpy.float32'>)

An axis in a data stream

add_points(points)
data_type(with_metadata=False)
num_points()
points_with_metadata()
reset()
tuple_width()
class auspex.stream.DataStream(name=None, unit=None)

A stream of data

done()
final_init()
num_points()
percent_complete()
pop()
push(data)
push_event(event_type, data=None)
reset()
set_descriptor(descriptor)
class auspex.stream.DataStreamDescriptor(dtype=<class 'numpy.float32'>)

Axes information

add_axis(axis, position=0)
add_param(key, value)
axes_done()
axis(axis_name)
axis_data_type(with_metadata=False, excluding_axis=None)
axis_names(with_metadata=False)

Returns all axis names included those from unstructured axes

axis_num(axis_name)
copy()
data_axis_values()

Returns a list of point lists for each data axis, ignoring sweep axes.

data_dims()
dims()
done()
expected_num_points()
expected_tuples(with_metadata=False, as_structured_array=True)

Returns a list of tuples representing the cartesian product of the axis values. Should only be used with non-adaptive sweeps.

extent(flip=False)

Convenience function for matplotlib.imshow, which expects extent=(left, right, bottom, top).

is_adaptive()
last_data_axis()
num_data_axis_points()
num_dims()
num_new_points_through_axis(axis_name)
num_points()
num_points_through_axis(axis_name)
pop_axis(axis_name)
reset()
tuple_width()
tuples(as_structured_array=True)

Returns a list of all tuples visited by the sweeper. Should only be used with adaptive sweeps.

class auspex.stream.InputConnector(name='', parent=None, datatype=None, max_input_streams=1)
add_input_stream(stream)
done()
num_points()
update_descriptors()
class auspex.stream.OutputConnector(name='', data_name=None, unit=None, parent=None, dtype=<class 'numpy.float32'>)
add_output_stream(stream)
done()
num_points()
push(data)
push_event(event_type, data=None)
set_descriptor(descriptor)
update_descriptors()
class auspex.stream.SweepAxis(parameter, points=[], metadata=None, refine_func=None, callback_func=None)

Structure for sweep axis, separate from DataAxis. Can be an unstructured axis, in which case ‘parameter’ is actually a list of parameters.

check_for_refinement(output_connectors_dict)

Check to see if we need to perform any refinements. If there is a refine_func and it returns a list of points, then we need to extend the axes. Otherwise, if the refine_func returns None or false, then we reset the axis to its original set of points. If there is no refine_func then we don’t do anything at all.

push()

Push parameter value(s)

update()

Update value after each run.

auspex.stream.cartesian(arrays, out=None, dtype='f')

http://stackoverflow.com/questions/28684492/numpy-equivalent-of-itertools-product

auspex.sweep module

class auspex.sweep.Sweeper

Control center of sweep axes

add_sweep(axis)
check_for_refinement(output_connectors_dict)
done()
is_adaptive()
swept_parameters()
update()

Update the levels