qecx.model.operations.OperationSet

class qecx.model.operations.OperationSet(*args, **kwargs)

Bases: Protocol

Structural protocol shared by the per-type operation-set containers.

Every operation set holds the variants of one operation type, presents them as a mapping, carries the key it registers under in a document’s operations mapping, and serializes itself.

Variables:

operations_key (ClassVar[str]) – The key this set occupies in a document’s operations mapping.

to_dict()

Return the operation set as its serialized container.

Returns:

The set’s operation container, ready to embed under its operations_key in a document dict.

Return type:

dict[str, Any]