pygsti.io.mongodb.read_dict_from_mongodb

pygsti.io.mongodb.read_dict_from_mongodb#

read_dict_from_mongodb(mongodb, collection_name, identifying_metadata)#

Read a dictionary serialized via write_dict_to_mongodb() into a dictionary.

The elements of the constructed dictionary are stored as a separate documents in a the specified MongoDB collection.

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

  • collection_name (str) – the MongoDB collection within mongodb to read from.

  • identifying_metadata (dict) – JSON-able metadata that identifies the dictionary being retrieved.

Return type:

dict