pygsti.data.freedataset
Defines the FreeformDataSet class and supporting classes and functions
Module Contents
Classes
An association between Circuits and arbitrary data. |
- class pygsti.data.freedataset.FreeformDataSet(circuits=None, circuit_indices=None)
Bases:
object
An association between Circuits and arbitrary data.
Parameters
- circuitslist of (tuples or Circuits), optional
Each element is a tuple of operation labels or a Circuit object. Indices for these strings are assumed to ascend from 0. These indices must correspond to the time series of spam-label indices (above). Only specify this argument OR circuit_indices, not both.
- circuit_indicesordered dictionary, optional
An OrderedDict with keys equal to circuits (tuples of operation labels) and values equal to integer indices associating a row/element of counts with the circuit. Only specify this argument OR circuits, not both.
- uuid = 'None'
- to_dataframe(pivot_valuename=None, pivot_value='Value', drop_columns=False)
Create a Pandas dataframe with the data from this free-form dataset.
Parameters
- pivot_valuenamestr, optional
If not None, the resulting dataframe is pivoted using pivot_valuename as the column whose values name the pivoted table’s column names. If None and pivot_value is not None,`”ValueName”` is used.
- pivot_valuestr, optional
If not None, the resulting dataframe is pivoted such that values of the pivot_value column are rearranged into new columns whose names are given by the values of the pivot_valuename column. If None and pivot_valuename is not None,`”Value”` is used.
- drop_columnsbool or list, optional
A list of column names to drop (prior to performing any pivot). If True appears in this list or is given directly, then all constant-valued columns are dropped as well. No columns are dropped when drop_columns == False.
Returns
pandas.DataFrame