qdk_chemistry.remote.backends.local module
Local backend for testing remote execution of QDK/Chemistry algorithms.
This backend simulates remote execution by running in a subprocess on the local machine. Useful for testing and development.
- class qdk_chemistry.remote.backends.local.LocalBackend(*, poll_interval=DEFAULT_POLL_INTERVAL, timeout=DEFAULT_TIMEOUT, python_path=sys.executable)[source]
Bases:
RemoteBackendBackend for local execution (useful for testing remote workflows).
This backend simulates the remote execution workflow locally:
“Upload” copies files to a temporary directory
“Execute” runs the script in a subprocess
“Download” copies files back from the temporary directory
This is useful for:
Testing remote execution workflows without a remote system
Debugging serialization and script generation
Running algorithms in isolated subprocesses
- Config options:
timeout (int): Execution timeout in seconds (default: 3600).
Example
>>> from qdk_chemistry.algorithms import create >>> >>> scf = create("scf_solver") >>> energy, wfn = scf.run(structure, 0, 1, "cc-pvdz", ... cache="./cache", remote="local")
- Parameters:
poll_interval (float)
timeout (float)
python_path (str | pathlib.Path)
- mcp_safe_config_options: ClassVar[frozenset[str]] = frozenset({'poll_interval', 'timeout'})
Constructor options that MCP clients may control.
Concrete backends must declare this attribute directly on the class to expose any options through MCP. The default is deny-all.
- __init__(*, poll_interval=DEFAULT_POLL_INTERVAL, timeout=DEFAULT_TIMEOUT, python_path=sys.executable)[source]
Initialize the local backend.