pygsti.io.readers.read_resultsdir_from_mongodb

pygsti.io.readers.read_resultsdir_from_mongodb#

read_resultsdir_from_mongodb(mongodb, doc_id, preloaded_data=None, quick_load=False, read_all_results_for_data=False, comm=None)#

Load a ProtocolsResultsDir from a MongoDB database.

Parameters:
  • mongodb (pymongo.database.Database) – The MongoDB instance to load data from.

  • doc_id (str) – The user-defined identifier of the results directory to load.

  • preloaded_data (ProtocolData, optional) – The data object belonging to the to-be-loaded results, in cases when this has been loaded already (only use this if you know what you’re doing).

  • quick_load (bool, optional) – Setting this to True skips the loading of data and experiment-design components that may take a long time to load. This can be useful all the information of interest lies only within the results objects.

  • read_all_results_for_data (bool, optional) – If True, the loaded result directory and sub-directories will read in all the results objects stored in the database associated with their ProtocolData object. Duplicate keys will be renamed to avoid collisions with warning messages are printed. If False (the default), then only the specific results associated with the directory when it was last saved are loaded. This can sometimes be useful for loading old results that have been overwritten but still exist in the database.

  • comm (mpi4py.MPI.Comm, optional) – When not None, an MPI communicator used to synchronize database access.

Return type:

ProtocolResultsDir