[docs]defrun_quantum_suite(*,base_path:str|Path|None=None,script_timeout_seconds:float=_QUANTUM_SCRIPT_TIMEOUT_SECONDS,)->dict[str,object]:"""Execute the staged Quantum Lab workflow scripts in sequence. Parameters ---------- base_path Optional explicit path to the Quantum Lab directory. If omitted, the default repository-local path is used. script_timeout_seconds Per-script timeout in seconds. Must be finite and strictly positive. Returns ------- dict[str, object] Execution report with success flag, resolved base path, and script names. Raises ------ FileNotFoundError If the Quantum Lab directory or required scripts are missing. RuntimeError If any script fails or times out. ValueError If the timeout value is invalid. """print("--- SCPN QUANTUM FUSION BRIDGE ---")print("Leveraging Quantum Hardware for Plasma Physics")timeout_seconds=_normalize_script_timeout_seconds(script_timeout_seconds)lab_path=_resolve_quantum_lab_path(base_path)ifnotlab_path.is_dir():raiseFileNotFoundError(f"Quantum Lab not found at {lab_path}")script_paths=[lab_path/namefornamein_QUANTUM_SCRIPT_NAMES]missing=[pforpinscript_pathsifnotp.is_file()]ifmissing:missing_text=", ".join(p.nameforpinmissing)raiseFileNotFoundError(f"Quantum Lab missing required scripts: {missing_text}")forstep_label,script_pathinzip(_QUANTUM_STEP_LABELS,script_paths):print(f"\n{step_label}")try:subprocess.run([sys.executable,str(script_path)],check=True,timeout=timeout_seconds,)exceptsubprocess.TimeoutExpiredasexc:raiseRuntimeError(f"Quantum script timed out: {script_path.name} (timeout={timeout_seconds:.1f}s)")fromexcexceptsubprocess.CalledProcessErrorasexc:raiseRuntimeError(f"Quantum script failed: {script_path.name} (exit={exc.returncode})")fromexcprint("\n--- QUANTUM INTEGRATION COMPLETE ---")return{"ok":True,"base_path":str(lab_path),"scripts":[p.nameforpinscript_paths],}