pygsti.objects.DataSet.truncate

DataSet.truncate(listOfGateStringsToKeep, bThrowErrorIfStringIsMissing=True)

Create a truncated dataset comprised of a subset of the counts in this dataset.

Parameters:
  • listOfGateStringsToKeep (list of (tuples or GateStrings)) – A list of the gate strings for the new returned dataset. If a gate string is given in this list that isn’t in the original data set, bThrowErrorIfStringIsMissing determines the behavior.
  • bThrowErrorIfStringIsMissing (bool, optional) – When true, a ValueError exception is raised when a string in listOfGateStringsToKeep is not in the data set.
Returns:

The truncated data set.

Return type:

DataSet