qcc_kplugin.dock ================ .. py:module:: qcc_kplugin.dock .. autoapi-nested-parse:: Quantcore dock panel: the Flow strip on top, then components, LOM, DRC and results. * **Flow strip** — Design → Check → LOM → Simulate → Results → Fab, one button per step with a status mark (done / needs attention / not yet). Simulate, Results and Fab call ``qcc_kplugin.flow`` when it exists. * **Components** — double-click a cell to arm *Move/Snap* in place mode; the next click drops it (parameters can be given as JSON). Ports of the new instance are then connected with *Connect* or *Route handles*. * **LOM** — *Run LOM* exports the circuit and simulates it (QuCat / QuTiP) in a background process: modes, the derived parameters (f_q, alpha, f_r, chi, kappa) against the targets in design.json, the netlist values and the circuit drawing. Below: the circuit nodes / branches of the layout, as ``qcc`` derives them (updates on every rebuild). * **DRC** — dangling ports, overlaps, crossings, components without a LOM model; click an issue to zoom to it. *Check* also runs the netlist check (opens / shorts) in the background and lists its result below. Everything comes from the sidecar written by each build; nothing here imports quantcore_circuits. Attributes ---------- .. autoapisummary:: qcc_kplugin.dock.ALL_CATEGORIES qcc_kplugin.dock.CFG_LOM_LIMIT qcc_kplugin.dock.DOCK qcc_kplugin.dock.FLOW_STEPS qcc_kplugin.dock.LEGACY qcc_kplugin.dock.LOM_STAGES Classes ------- .. autoapisummary:: qcc_kplugin.dock.QuantcoreDock Functions --------- .. autoapisummary:: qcc_kplugin.dock.lom_stage qcc_kplugin.dock.lom_warnings qcc_kplugin.dock.show_dock Module Contents --------------- .. py:class:: QuantcoreDock .. py:method:: check() The DRC tab, plus the full check (netlist opens / shorts) in the background. .. py:method:: flow_click(key: str) .. py:method:: flow_state() -> dict Done / warn / todo per step: file checks (:func:`design_io.flow_status`) plus this session's Check. .. py:method:: load_components(force: bool = False) The library's components with their class (``qcc components --json --details``), then the list. Cached (see :mod:`qcache`); on a miss ``qcc`` runs in the background and the list shows "loading…". .. py:method:: load_lom() Fill the LOM tab from build//lom.json (written by ``qcc circuit simulate --json``). .. py:method:: lom_files() (circuit.json, lom.json, lom.png) for the open design. .. py:method:: open_png() The circuit picture in its own (non-modal, resizable) window, never larger than the screen: it opens fitted to the window (Fit), and 100 % / − / + zoom it, with scroll bars when it is larger than the window. .. py:method:: params() -> dict .. py:method:: refresh() .. py:method:: refresh_drc(running: bool = False) .. py:method:: refresh_list() The Refresh list button: forget the cache and ask ``qcc`` again. .. py:method:: refresh_sim_groups() The saved groups of design.json (the list keeps its selection while the names stay the same). .. py:method:: run_lom() Export the circuit and simulate it in a background process; the LOM tab fills when it ends. .. py:method:: selected() -> str | None .. py:method:: show_components() The list: the components of the chosen class (all classes: every component), by name. .. py:method:: show_tab(name: str) .. py:method:: stop_lom() Stop the LOM run this panel started: kill its ``qcc`` process, drop the partial output, restore the tab. .. py:method:: update_flow() .. py:attribute:: category .. py:attribute:: cell :value: None .. py:attribute:: components .. py:attribute:: dock .. py:attribute:: drc .. py:attribute:: drc_items :value: [] .. py:attribute:: flow_buttons .. py:attribute:: flow_hint .. py:attribute:: full_check :value: None .. py:attribute:: loading_list :value: False .. py:attribute:: loading_schema :value: None .. py:attribute:: lom_result :value: None .. py:attribute:: records .. py:attribute:: results .. py:attribute:: schema :value: [] .. py:attribute:: sim_analysis .. py:attribute:: sim_groups .. py:attribute:: sim_hide .. py:attribute:: sim_info .. py:attribute:: source .. py:attribute:: table .. py:attribute:: tabs .. py:attribute:: values .. py:attribute:: viewers :value: [] .. py:function:: lom_stage(step_index: int, text: str) -> int 1-based Run LOM stage from the running step and its output so far. .. py:function:: lom_warnings(output: str) -> list[str] The ``WARNING: route R2 failed to build (...); using its last good route`` lines of a LOM run's output (the circuit export prints each as a note and as a Python warning), once each, without the ``note:`` / file prefix. .. py:function:: show_dock() .. py:data:: ALL_CATEGORIES :value: 'all classes' .. py:data:: CFG_LOM_LIMIT .. py:data:: DOCK :value: [] .. py:data:: FLOW_STEPS .. py:data:: LEGACY :value: 'legacy (kept for old designs)' .. py:data:: LOM_STAGES :value: (('', 'exporting the circuit'), ('[lom] reading', 'reading the circuit'), ('[lom] solving',...