quantcore_circuits.sim_tools.palace¶
Palace adapter: KQC Elmer export + KQC gmsh mesher → Palace config.
export_palace writes a normal KQC Elmer job (geometry, layer stack, ports, mesh sizes and KQC’s
scripts/gmsh_helpers.py) and adds:
palace_job.json— what to generate (ElectrostaticorEigenmode) and solver settings,run_palace.sh—python -m quantcore_circuits.sim_tools.palace prepare .thenmpirun palace palace.json.
prepare (run where gmsh is available, usually the Linux server) meshes with KQC’s produce_mesh in MSH 2.2
(required by MFEM/Palace), reads the physical groups and writes palace.json:
volumes →
Domains.Materials(permittivity / loss tangent from the KQCmaterial_dict; vacuum ε=1),Electrostatic:
Ground=excitation_0_boundary,Terminalk =excitation_k_boundary(same order as Q3DNet<k>/ Elmer capacitance bodies, so C-matrix labels fromjob.jsonapply unchanged),Eigenmode:
PEC= all metal boundaries + outer box; junction ports →LumpedPortwithL = Lj,C = Cj; other internal ports → 50 ΩLumpedPort(gives κ inport-Q.csv).
Lengths stay in µm (Model.L0 = 1e-6).
Attributes¶
Functions¶
|
|
|
Palace configuration dict from a KQC simulation JSON and mesh physical groups. |
|
Mesh (KQC |
|
|
Module Contents¶
- quantcore_circuits.sim_tools.palace.export_palace(setup, job_dir: pathlib.Path, **cfg) pathlib.Path¶
- quantcore_circuits.sim_tools.palace.palace_config(sim_json: dict, physical: dict[str, tuple[int, int]], spec: dict, mesh_file: str) dict¶
Palace configuration dict from a KQC simulation JSON and mesh physical groups.
- quantcore_circuits.sim_tools.palace.prepare(job_dir: str | pathlib.Path) pathlib.Path¶
Mesh (KQC
produce_mesh, MSH 2.2) and writepalace.jsoninjob_dir.
- quantcore_circuits.sim_tools.palace.read_physical_names(msh_path: pathlib.Path) dict[str, tuple[int, int]]¶
$PhysicalNamesof an ASCII .msh → {name: (dim, tag)}.
- quantcore_circuits.sim_tools.palace.PALACE_JOB = 'palace_job.json'¶