qdk_chemistry.data.registry module
Registry for serializable QDK/Chemistry data classes.
- qdk_chemistry.data.registry.available_dataclasses()[source]
Return all currently registered and discoverable DataClass types.
- qdk_chemistry.data.registry.get_dataclass_type(type_name)[source]
Return the registered DataClass for a wire type name, if available.
- qdk_chemistry.data.registry.register_dataclass(dataclass_type)[source]
Register a DataClass subclass for file deserialization.
The loader must declare its own static
data_type_name()method rather than inheriting another loader’s wire-format identifier.- Parameters:
dataclass_type (
Type[Any]) – DataClass subclass to register.- Return type:
type[DataClass]- Returns:
The registered class, allowing this function to be used as a decorator.
- Raises:
TypeError – If the value is not a DataClass subclass or has no declared type name.
DuplicateRegistrationError – If another class already owns the declared type name.