qdk_chemistry.remote.cache package

Cache backends for QDK/Chemistry job results.

Built-in backends:
  • folder: Plain-file content-addressed cache

  • tiered: Layered cache that combines multiple backends

Custom backends can be registered with @register_cache or via the qdk_chemistry.cache_backends entry-point group.

qdk_chemistry.remote.cache.available_caches()[source]

Return list of registered cache backend names.

Return type:

list[str]

qdk_chemistry.remote.cache.get_cache(name, **config)[source]

Create a cache backend by name.

Return type:

CacheBackend

Parameters:
  • name (str) – Backend name (e.g. "folder").

  • config (Any) – Backend-specific configuration.

Raises:

ValueError – If no cache is registered with that name.

qdk_chemistry.remote.cache.register_cache(name)[source]

Decorator to register a cache backend class.

Parameters:

name (str) – The cache backend name (e.g. "folder").

qdk_chemistry.remote.cache.resolve_cache(cache, **kwargs)[source]

Normalise a user-supplied cache argument.

Accepts any of the following:

  • None returns None

  • A CacheBackend instance → returned as-is

  • A Path or path-like string → FolderCache(path=...)

  • A registered name string → looked up in the registry; extra kwargs are forwarded to the backend constructor.

Return type:

CacheBackend | None

Parameters:

Submodules