qcc_kplugin.simsetup ==================== .. py:module:: qcc_kplugin.simsetup .. autoapi-nested-parse:: What Simulate runs: the analysis for a selection, and the last run's convergence. Plain Python (no pya), unit-tested outside KLayout; the dialog is in ``flow.py``. KLayout is the quick-prototyping route: Q3D capacitance and HFSS eigenmode only (driven / full-wave S-parameter runs are for scripts). The dialog's solver settings start at the library's fast values (:data:`FAST`) and can be changed; or change the setup in AEDT, solve there and read the result back with Import results (the job folder, after ``scripts/qcc_collect.py`` in AEDT). * **Analysis** (:func:`recommend`): a selection with a resonator, a feedline or a pad is an HFSS **eigenmode** run of exactly what is selected (``qcc sim … -a hfss_eigenmode``: the library adds the routes joining the parts and a line's end pads; junctions are lumped L‖C ports, lines leaving the box end in 50 Ω) → f, Q, κ, χ. Qubits alone (or with couplers / capacitors) are a **Q3D capacitance** run: islands and couplers as nets, the resonators cut to a short stub port → the C matrix the LOM uses. The user can pick the other one. * **Convergence** (:func:`last_feedback`): after a solve, and after Import results, the library writes ``build//convergence.json`` (passes, last Δ, target, converged); the dialog shows it. Attributes ---------- .. autoapisummary:: qcc_kplugin.simsetup.ANALYSES qcc_kplugin.simsetup.CAPACITANCE_ANALYSES qcc_kplugin.simsetup.FAST qcc_kplugin.simsetup.LABELS qcc_kplugin.simsetup.WIDE_CATEGORIES Functions --------- .. autoapisummary:: qcc_kplugin.simsetup.cli_args qcc_kplugin.simsetup.last_feedback qcc_kplugin.simsetup.missing_junctions qcc_kplugin.simsetup.missing_text qcc_kplugin.simsetup.parse_settings qcc_kplugin.simsetup.recommend qcc_kplugin.simsetup.run_dir qcc_kplugin.simsetup.settings_for Module Contents --------------- .. py:function:: cli_args(analysis: str, settings: dict) -> list[str] ``qcc sim auto / subset`` arguments: every value explicit on top of the analysis defaults (``--full``), so what the dialog shows is what runs. .. py:function:: last_feedback(design_path, name: str, analysis: str) -> dict | None The last solve's / import's convergence for ``analysis`` (``convergence.json``), or None. .. py:function:: missing_junctions(names, data: dict, categories: dict, design: dict) -> list[str] Selected qubits without an L_J for the eigenmode / driven lumped port. The rule is the library's: the build sidecar's ``instances..junction`` (``Lj_eff_nH`` None, or an ``error`` at Φ = ½ with d = 0) says it, which counts a drawn trilayer junction's PDK value. A sidecar without that entry (an older build) falls back to the design's own ``junction.Lj_nH``. .. py:function:: missing_text(names, data: dict, extra: dict | None = None) -> str The Simulate dialog's warning for ``names`` without an L_J (``extra``: the library's own messages by name, e.g. ``qcc design junctions``): which, why, and where to set the value. "" for none. .. py:function:: parse_settings(analysis: str, texts: dict) -> dict The dialog's fields → numbers (mesh seeds may be empty = none); raises ``ValueError`` naming the field. .. py:function:: recommend(names, data: dict, categories: dict) -> tuple[str, str] ``(analysis, why)`` for the selected ``names`` (instances and routes; ``data`` = the sidecar, ``categories`` = component ref → class). .. py:function:: run_dir(design_path, name: str) -> pathlib.Path ``/build/`` (guiflow.run_dir). .. py:function:: settings_for(analysis: str, saved: dict | None = None) -> dict The values the dialog shows: the fast defaults, with the user's last values for ``analysis`` on top. .. py:data:: ANALYSES .. py:data:: CAPACITANCE_ANALYSES .. py:data:: FAST .. py:data:: LABELS .. py:data:: WIDE_CATEGORIES :value: ('resonator', 'launcher', 'waveguide', 'termination')