quantcore_circuits.sim_tools.export

Export a SimSetup to a self-contained job directory using KQC’s exporters.

Job directory = KQC export (scripts/, <sim>.gds, <sim>.json) + job.json (qcc metadata: design hash, group, analysis, solver settings, port → net labels) + simulation.oas. Ansys jobs also get scripts/qcc_render.py / qcc_solve.py (aedt_scripts) and simulation.bat / simulation.sh that run qcc_solve.py in a new non-graphical AEDT and collect results/results.json.

Analyses:

q3d_cmatrix

Ansys Q3D Maxwell capacitance matrix (KQC AnsysQ3dSolution)

hfss_eigenmode

Ansys HFSS eigenmode with Lj/Cj lumped RLC on junctions (AnsysEigenmodeSolution)

eigenmode_epr

as above + KQC pyepr flag (junction lines); qcc_solve.py evaluates pyEPR’s field integrals in its own AEDT, analysis.epr turns them into p_mj, χ, α (not KQC’s run_pyepr_t1_estimate.py: it attaches to a running AEDT over COM and quits it)

elmer_cap

Elmer electrostatics capacitance matrix (ElmerCapacitanceSolution)

palace_cap

Palace electrostatic C-matrix (KQC gmsh mesh → Palace config, see palace)

palace_eig

Palace eigenmode with junction LumpedPort L=Lj (see palace)

hfss_driven

Ansys HFSS driven modal S-parameters (AnsysHfssSolution): wave ports where lines leave the box, junctions as lumped L/C; e.g. a hanger’s S21 → κ to calibrate the LOM coupling

Attributes

Functions

default_executable_linux([version]) → str

export_job(setup, job_dir[, overwrite, fast]) → pathlib.Path

Write the job directory for setup (_export_job()); marks the dashboard's Render step running → done /

fast_settings(analysis, settings[, islands]) → dict

settings for a fast whole-chip test run of analysis (see FAST_SETTINGS): each convergence

fem_fast([fast]) → bool

Whether jobs are exported with FAST_SETTINGS: fast if given, else set_fem_fast()'s value,

group_settings(setup, defaults) → dict

Solver settings from the sim group's settings: keys of the analysis defaults (plus mesh_size,

read_job(job_dir) → dict

set_fem_fast(flag) → None

Process-wide default for export_job(fast=None) (None: QCC_FEM_FAST, else off).

sim_faces(setup) → list[str]

The KQC faces the job simulates (its face_stack, flattened; empty entries left out).

solver_of(analysis) → str

tighter_or_equal(old, new) → bool

Whether solver settings old are at least as tight as new: the same keys and values except that each

update_job(job_dir, **fields) → dict

write_job_json(setup, job_dir, settings) → pathlib.Path

Module Contents

quantcore_circuits.sim_tools.export.default_executable_linux(version: int | None = None) → str
quantcore_circuits.sim_tools.export.export_job(setup: quantcore_circuits.sim_tools.builder.SimSetup, job_dir: str | pathlib.Path, overwrite: bool = False, fast: bool | None = None, **settings) → pathlib.Path

Write the job directory for setup (_export_job()); marks the dashboard’s Render step running → done / failed with the job name (nested inside hfss.render(), only the outer render marks it).

quantcore_circuits.sim_tools.export.fast_settings(analysis: str, settings: dict, islands: list[int] | tuple = ()) → dict

settings for a fast whole-chip test run of analysis (see FAST_SETTINGS): each convergence criterion at least the fast value, each pass count at most the fast value, mesh_size seeds × FAST_MESH_FACTOR (no seed given: FAST_MESH_SEED for eigenmode / driven), sweep_count ≤ FAST_SWEEP_POINTS. Other keys (frequencies, modes, sweep band) are kept. Analyses without fast values (Elmer, Palace, plugins) are returned unchanged. islands: KQC excitation numbers of the junction islands; eigenmode / driven runs seed each with FAST_ISLAND_SEED.

quantcore_circuits.sim_tools.export.fem_fast(fast: bool | None = None) → bool

Whether jobs are exported with FAST_SETTINGS: fast if given, else set_fem_fast()’s value, else QCC_FEM_FAST (1 / true).

quantcore_circuits.sim_tools.export.group_settings(setup: quantcore_circuits.sim_tools.builder.SimSetup, defaults: dict) → dict

Solver settings from the sim group’s settings: keys of the analysis defaults (plus mesh_size, pyepr), and a nested {"<analysis>": {...}} dict for that analysis only. Builder options (airbridges) and settings of other analyses are left out.

quantcore_circuits.sim_tools.export.read_job(job_dir: str | pathlib.Path) → dict
quantcore_circuits.sim_tools.export.set_fem_fast(flag: bool | None) → None

Process-wide default for export_job(fast=None) (None: QCC_FEM_FAST, else off).

quantcore_circuits.sim_tools.export.sim_faces(setup: quantcore_circuits.sim_tools.builder.SimSetup) → list[str]

The KQC faces the job simulates (its face_stack, flattened; empty entries left out).

quantcore_circuits.sim_tools.export.solver_of(analysis: str) → str
quantcore_circuits.sim_tools.export.tighter_or_equal(old: dict, new: dict) → bool

Whether solver settings old are at least as tight as new: the same keys and values except that each convergence criterion of old is ≤ new’s, each pass count ≥ and each mesh seed ≤ (e.g. a full solve vs the fast settings of the same job: its results can stand in for a fast re-run).

quantcore_circuits.sim_tools.export.update_job(job_dir: str | pathlib.Path, **fields) → dict
quantcore_circuits.sim_tools.export.write_job_json(setup: quantcore_circuits.sim_tools.builder.SimSetup, job_dir: pathlib.Path, settings: dict) → pathlib.Path
quantcore_circuits.sim_tools.export.DEFAULT_SETTINGS
quantcore_circuits.sim_tools.export.FAST_ISLAND_SEED = 10.0
quantcore_circuits.sim_tools.export.FAST_MESH_FACTOR = 3.0
quantcore_circuits.sim_tools.export.FAST_MESH_SEED
quantcore_circuits.sim_tools.export.FAST_SETTINGS
quantcore_circuits.sim_tools.export.FAST_SWEEP_POINTS = 10001
quantcore_circuits.sim_tools.export.JOB_SCHEMA = 'qcc-job/0.1'
quantcore_circuits.sim_tools.export.MAX_SWEEP_POINTS = 25000
quantcore_circuits.sim_tools.export.PYEPR_DEFAULTS