pygsti.data.datasetconstruction.trim_to_constant_numtimesteps

pygsti.data.datasetconstruction.trim_to_constant_numtimesteps#

trim_to_constant_numtimesteps(ds)#

Trims a DataSet so that each circuit’s data comprises the same number of timesteps.

Returns a new dataset that has data for the same number of time steps for every circuit. This is achieved by discarding all time-series data for every circuit with a time step index beyond ‘min-time-step-index’, where ‘min-time-step-index’ is the minimum number of time steps over circuits.

Parameters:

ds (DataSet) – The dataset to trim.

Returns:

The trimmed dataset, obtained by potentially discarding some of the data.

Return type:

DataSet