quantcore_circuits.sim_tools.geometry_check¶
Geometry checks of an exported Ansys job folder (no solver, no AEDT): what Q3D / HFSS reject or silently get wrong.
The checks read what AEDT imports: <sim>.json (KQC layers with z, thickness and excitation; ports) and
<sim>.gds (one AEDT object per GDS polygon, named <layer>_<k>).
nets disjoint — two metal objects of different excitations (KQC nets) must not touch or overlap where their z ranges meet: Q3D stops with
Object 'a' in Net 'x' and object 'b' in Net 'y' are touching.no point / edge contacts — two objects of the same net that touch without overlapping (e.g. a junction pad ending on a curved island at one polygon vertex) count as connected for KQC (
Region.interacting) but not for Q3D’sAutoIdentifyNets, which splits the net and then reports the same “touching” error.one piece per net — a signal net in two disconnected pieces becomes two Q3D nets (C-matrix rows mislabelled).
floating metal off the boundary — a signal object reaching the top or bottom of the simulation domain (an indium bump with no opposite face) is shorted to the outer boundary in HFSS and adds a pillar’s capacitance in Q3D.
junction ports — each junction port has a polygon that KQC itself could build (its signal and ground points on metal edges: no
Unable to create polygon for portwarning), the sheet lies in the gap (no metal inside it), its signal and ground edges touch two different nets, neither island net reaches the box edge (joined to the ground plane), and the signal net carries the port’s island label.line / pad ports — every other internal port has a polygon (a line end the box edge cuts in a bend or a taper has none) and its signal and ground points lie on it (AEDT draws the port’s current line between them).
Use check_job() ({"errors": [...], "warnings": [...]}) or python scripts/check_sim_export.py <job>....
Attributes¶
Classes¶
One AEDT object: a GDS polygon of a KQC metal layer. |
Functions¶
|
Signal metal reaching the top or bottom of the simulation domain (a bump without its opposite face). |
|
|
|
Polygons whose GDS XY record exceeds 0x7fff bytes (> 4095 points): KLayout reads them as unsigned with a |
|
All checks of one exported Ansys job folder: |
|
Junction-port polygons (see module docstring). |
|
Net disjointness, same-net point/edge contacts and pieces per net (see module docstring). |
|
Internal ports that are not junctions (50 Ω pad / edge-lumped ports, waveguide stubs) without a polygon: KQC |
|
Non-junction internal ports whose signal or ground point lies outside the port polygon: AEDT's Lumped RLC / |
|
The metal objects AEDT creates: one per GDS polygon of every layer with an |
Module Contents¶
- class quantcore_circuits.sim_tools.geometry_check.MetalObject¶
One AEDT object: a GDS polygon of a KQC metal layer.
- bbox: kqcircuits.pya_resolver.pya.Box¶
- excitation: int¶
- layer: str¶
- name: str¶
- region: kqcircuits.pya_resolver.pya.Region¶
- z0: float¶
- z1: float¶
- quantcore_circuits.sim_tools.geometry_check.check_boundary(sim: dict, objs: list[MetalObject]) list[str]¶
Signal metal reaching the top or bottom of the simulation domain (a bump without its opposite face).
- quantcore_circuits.sim_tools.geometry_check.check_gds_other_layers(sim: dict, layout: kqcircuits.pya_resolver.pya.Layout) list[str]¶
check_gds_records()for the non-metal layers of the GDS (gap layers AEDT imports as mesh-seed sheets).
- quantcore_circuits.sim_tools.geometry_check.check_gds_records(objs: list[MetalObject]) list[str]¶
Polygons whose GDS XY record exceeds 0x7fff bytes (> 4095 points): KLayout reads them as unsigned with a warning; readers that take the record length as signed (not verified for AEDT) reject or truncate them.
- quantcore_circuits.sim_tools.geometry_check.check_job(job_dir: str | pathlib.Path) dict¶
All checks of one exported Ansys job folder:
{"job", "errors", "warnings", "nets", "objects"}.
- quantcore_circuits.sim_tools.geometry_check.check_junction_ports(meta: dict, sim: dict, objs: list[MetalObject], dbu: float) tuple[list[str], list[str]]¶
Junction-port polygons (see module docstring).
- quantcore_circuits.sim_tools.geometry_check.check_nets(objs: list[MetalObject], dbu: float, z_eps: float = 1e-09) tuple[list[str], list[str]]¶
Net disjointness, same-net point/edge contacts and pieces per net (see module docstring).
- quantcore_circuits.sim_tools.geometry_check.check_other_ports(meta: dict, sim: dict) list[str]¶
Internal ports that are not junctions (50 Ω pad / edge-lumped ports, waveguide stubs) without a polygon: KQC logged
Unable to create polygon for portand AEDT skips the port (that line end is left open). An edge-lumped port has one wherever the box edge crosses a straight section of its line, square or at an angle (the builder then puts the port on the line’s own axis); a bend or a taper at the edge is what remains.
- quantcore_circuits.sim_tools.geometry_check.check_port_lines(meta: dict, sim: dict) list[str]¶
Non-junction internal ports whose signal or ground point lies outside the port polygon: AEDT’s Lumped RLC / lumped port current line runs between those points and must lie on the sheet (“Both endpoints of the directed line must lie on the boundary face”); on a slanted port a point off the database grid misses the polygon by a fraction of a nm.
- quantcore_circuits.sim_tools.geometry_check.metal_objects(sim: dict, layout: kqcircuits.pya_resolver.pya.Layout) list[MetalObject]¶
The metal objects AEDT creates: one per GDS polygon of every layer with an
excitation.
- quantcore_circuits.sim_tools.geometry_check.AREA_EPS_UM2 = 1e-06¶
- quantcore_circuits.sim_tools.geometry_check.GDS_SIGNED_RECORD_POINTS = 4095¶
- quantcore_circuits.sim_tools.geometry_check.PORT_LINE_TOL_UM = 1e-07¶
- quantcore_circuits.sim_tools.geometry_check.PORT_METAL_EPS_UM2 = 0.05¶