qdk_chemistry.plugins.base module
Unified plugin registration API for QDK/Chemistry extensions.
- qdk_chemistry.plugins.base.ChemistryPlugin
alias of
QdkChemistryPlugin
- class qdk_chemistry.plugins.base.PluginRegistrar[source]
Bases:
objectRegister plugin capabilities through the existing public registries.
- register_algorithm_factory(factory)[source]
Register a factory that introduces an algorithm type.
- Parameters:
factory (
AlgorithmFactory) – Factory that defines and creates the algorithm type.- Raises:
DuplicateRegistrationError – If the algorithm type is already registered.
- Return type:
- register_algorithm(factory, *, data_classes=())[source]
Register an algorithm factory and its DataClass input or output types.
- Parameters:
- Raises:
DuplicateRegistrationError – If the algorithm name or a DataClass wire type is already registered.
TypeError – If a DataClass loader is invalid.
- Return type:
- register_dataclass(dataclass_type)[source]
Register a DataClass loader used in algorithm inputs or outputs.
- Parameters:
dataclass_type (
Type[Any]) – Canonical DataClass loader to register.- Raises:
DuplicateRegistrationError – If the DataClass wire type is already registered.
- Return type:
- register_remote_backend(name, backend_type)[source]
Register a remote execution backend.
Backends may expose selected constructor parameters to untrusted MCP clients by declaring
mcp_safe_config_optionsas a frozenset on the concrete class. The declaration is validated during registration; an omitted declaration exposes no parameters.- Parameters:
- Raises:
DuplicateRegistrationError – If the backend name or class is already registered.
- Return type:
- register_cache_backend(name, backend_type)[source]
Register a cache backend.
- Parameters:
- Raises:
DuplicateRegistrationError – If the cache name or class is already registered.
- Return type:
- class qdk_chemistry.plugins.base.QdkChemistryPlugin[source]
Bases:
ABCBase class for plugins discovered through
qdk_chemistry.plugins.- api_version = 1
- abstractmethod register(registrar)[source]
Register the capabilities provided by this plugin.
- Return type:
- Parameters:
registrar (PluginRegistrar)