pygsti.io.readers.read_multidataset

pygsti.io.readers.read_multidataset#

read_multidataset(filename, cache=False, collision_action='aggregate', record_zero_counts=True, verbosity=1)#

Load a MultiDataSet from a file.

This function first tries to load file as a saved MultiDataSet object, then as a standard text-formatted MultiDataSet.

Parameters:
  • filename (string) – The name of the file

  • cache (bool, optional) – When set to True, a pickle file with the name filename + “.cache” is searched for and loaded instead of filename if it exists and is newer than filename. If no cache file exists or one exists but it is older than filename, a cache file will be written after loading from filename.

  • collision_action ({"aggregate", "keepseparate"}) – Specifies how duplicate circuits should be handled. “aggregate” adds duplicate-circuit counts, whereas “keepseparate” tags duplicate circuits by setting their .occurrence IDs to sequential positive integers.

  • record_zero_counts (bool, optional) – Whether zero-counts are actually recorded (stored) in the returned MultiDataSet. If False, then zero counts are ignored, except for potentially registering new outcome labels. When reading from a cache file (using cache==True) this argument is ignored: the presence of zero-counts is dictated by the value of record_zero_counts when the cache file was created.

  • verbosity (int, optional) – If zero, no output is shown. If greater than zero, loading progress is shown.

Return type:

MultiDataSet