quantcore_circuits.sim_tools.runner

Run simulation jobs locally or through a filesystem queue (lab server).

Local run: executes the job’s launcher — Ansys: ansysedt -ng … -RunScriptAndExit scripts/qcc_solve.py in a new batch AEDT (aedt_scripts; never attaches to an open AEDT); Elmer: KQC simulation.bat/.sh; Palace: run_palace.sh — then collects results into results/results.json. On a timeout only the process tree the runner started is killed.

Queue (qcc runner serve QUEUE): QUEUE/pending/<job> → running/ → done/ | failed/. Submitting copies the job directory into pending/. SLURM can replace run_job() later without changing the layout.

Ansys (verified with AEDT 2024 R1 on Windows, 2026-11-03): ansysedt -ng -features=SF6694_NON_GRAPHICAL_COMMAND_EXECUTION -RunScriptAndExit scripts/qcc_solve.py -ScriptArgs <sim>.json with ANSYSEM_FEATURE_SF6694_NON_GRAPHICAL_COMMAND_EXECUTION_ENABLE=1 (the way pyaedt launches non-graphical AEDT). TODO(verify on the Linux server): the same under AEDT 2024 R2.

Attributes

Functions

job_summary(job_dir) → str

launcher_command(job_dir) → list[str]

queue_status(queue) → dict[str, list[str]]

run_job(job_dir[, timeout, dry_run, aedt, progress]) → dict

Run the job synchronously; returns the updated job.json. Raises nothing for solver failures (see status).

serve(queue[, poll, once, log]) → None

Process queued jobs one at a time (oldest first).

submit(job_dir, queue) → pathlib.Path

Module Contents

quantcore_circuits.sim_tools.runner.job_summary(job_dir: str | pathlib.Path) → str
quantcore_circuits.sim_tools.runner.launcher_command(job_dir: pathlib.Path) → list[str]
quantcore_circuits.sim_tools.runner.queue_status(queue: str | pathlib.Path) → dict[str, list[str]]
quantcore_circuits.sim_tools.runner.run_job(job_dir: str | pathlib.Path, timeout: float | None = None, dry_run: bool = False, aedt: str | None = None, progress: float | None = None) → dict

Run the job synchronously; returns the updated job.json. Raises nothing for solver failures (see status).

Ansys jobs with aedt="gui" / "attach" (or QCC_AEDT_MODE) run through quantcore_circuits.sim_tools.hfss.solve_job() (a new AEDT window / the open one); batch Ansys jobs print a progress line every progress s (30; aedt_progress).

quantcore_circuits.sim_tools.runner.serve(queue: str | pathlib.Path, poll: float = 5.0, once: bool = False, log=print) → None

Process queued jobs one at a time (oldest first).

quantcore_circuits.sim_tools.runner.submit(job_dir: str | pathlib.Path, queue: str | pathlib.Path) → pathlib.Path
quantcore_circuits.sim_tools.runner.QUEUE_DIRS = ('pending', 'running', 'done', 'failed')