pygsti.io.mongodb

pygsti.io.mongodb#

Serialization routines to/from a MongoDB database

Functions

add_auxtree_write_ops_and_update_doc(doc, ...)

Similar to write_auxtree_to_mongodb, but just collect write operations and update a main-doc dictionary.

add_dict_to_mongodb_write_ops(d, write_ops, ...)

Similar to write_dict_to_mongodb, but just collect write operations and update a main-doc dictionary.

add_obj_auxtree_write_ops_and_update_doc(...)

Similar to write_obj_to_mongodb_auxtree, but just collect write operations and update a main-doc dictionary.

create_mongodb_indices_for_pygsti_collections(mongodb)

Create, if not existing already, indices useful for speeding up pyGSTi MongoDB operations.

read_auxtree_from_mongodb(mongodb, ...[, ...])

Read a document containing links to auxiliary documents from a MongoDB database.

read_auxtree_from_mongodb_doc(mongodb, doc)

Load the contents of a MongoDB document into a dict.

read_dict_from_mongodb(mongodb, ...)

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

remove_auxtree_from_mongodb(mongodb, ...[, ...])

Remove some or all of the MongoDB documents written by write_auxtree_to_mongodb

remove_dict_from_mongodb(mongodb, ...[, session])

Remove elements of (separate documents) of a dictionary stored in a MongoDB collection

write_auxtree_to_mongodb(mongodb, ...[, ...])

Write a dictionary of quantities to a MongoDB database, potentially as multiple documents.

write_dict_to_mongodb(d, mongodb, ...[, ...])

Write each element of d as a separate document in a MongoDB collection

write_obj_to_mongodb_auxtree(obj, mongodb, ...)

Write the attributes of an object to a MongoDB database, potentially as multiple documents.