quantcore_circuits.loop ======================= .. py:module:: quantcore_circuits.loop .. autoapi-nested-parse:: The analysis half of the design loop, step by step, recording everything for the dashboard. :func:`analyse` — job results → ``circuit.json`` (filled: design vs extracted values) → Metal LOM / QuCat / SQcircuit / scqubits → QuTiP Hamiltonian (dressed levels, simulated readout χ, flux curve) → consensus vs targets. The design is planned once for the circuit and its fill; with ``out_dir`` the four estimators' results are kept in ``estimates_cache.json`` and reused while the circuit they read is the same (a second analysis of the same design and jobs, e.g. Propose after Simulate or Import, skips them). :func:`feedback` — a surrogate per qubit–readout pair anchored on that point (FEM or the layout's estimates; every qubit class with a LOM model, λ/4 and λ/2 readouts, :mod:`quantcore_circuits.codesign`) → proposed knobs → design revision (rebuilt and checked, or only written for a preview), with notes on what could not be tuned. Both update a :class:`~quantcore_circuits.track.Run` (``build//state.json``) when given one, and return plain data for notebooks and plots (:mod:`quantcore_circuits.plots`). Attributes ---------- .. autoapisummary:: quantcore_circuits.loop.BRANCH_TYPE quantcore_circuits.loop.ESTIMATES_CACHE quantcore_circuits.loop.TARGET_LABEL Classes ------- .. autoapisummary:: quantcore_circuits.loop.Analysis Functions --------- .. autoapisummary:: quantcore_circuits.loop.analyse quantcore_circuits.loop.dashboard_circuit quantcore_circuits.loop.dashboard_consensus quantcore_circuits.loop.dashboard_targets quantcore_circuits.loop.feedback quantcore_circuits.loop.pair_plot_id quantcore_circuits.loop.update_cards Module Contents --------------- .. py:class:: Analysis .. py:attribute:: dressed :type: dict | None :value: None .. py:attribute:: estimates :type: dict .. py:attribute:: filled :type: object .. py:attribute:: flux :type: dict | None :value: None .. py:attribute:: goal :type: dict .. py:attribute:: hamiltonian :type: object | None :value: None .. py:attribute:: model :type: object .. py:attribute:: pair_results :type: dict[str, dict] .. py:attribute:: plan :type: object | None :value: None .. py:attribute:: plots :type: list[dict] :value: [] .. py:attribute:: readout :type: dict | None :value: None .. py:attribute:: rows :type: list .. py:function:: analyse(design, job_dir=None, group: str | None = None, run=None, readout: bool = True, kappa_MHz: float | None = None, out_dir: str | pathlib.Path | None = None) -> Analysis Job → circuit → estimators → QuTiP → consensus (module docstring). ``run`` None: the dashboard tracking session's run (:func:`quantcore_circuits.track.start`), if there is one. .. py:function:: dashboard_circuit(filled) -> dict .. py:function:: dashboard_consensus(rows) -> list[dict] .. py:function:: dashboard_targets(rows) -> list[dict] .. py:function:: feedback(an: Analysis, run=None, design_source=None, iteration: int = 1, bounds=None, build_revision: bool = True) Surrogate from this FEM point → knobs → revision ``iteration`` (built + netlist-checked). Returns ``(proposal, revision_path, build_result)``. Every transmon–readout pair of the circuit gets a surrogate (:func:`quantcore_circuits.codesign. surrogate_from_fill`: any qubit class with a LOM model, λ/4 and λ/2 readouts); what cannot be tuned (no pair, no clean knob, a drawn junction) is listed in ``proposal.notes``. ``build_revision=False`` (a preview, e.g. ``qcc results propose``) writes the revision without building it: ``build_result`` is then None. .. py:function:: pair_plot_id(kind: str, qubit: str, an: Analysis) -> str Plot id of a per-pair plot (``levels``, ``readout``, ``flux``): bare for the first pair, ``_`` for the others. .. py:function:: update_cards(run, design, an, proposal=None) -> None Parameter cards + design summary for the dashboard (see :mod:`quantcore_circuits.cards`). .. py:data:: BRANCH_TYPE .. py:data:: ESTIMATES_CACHE :value: 'estimates_cache.json' .. py:data:: TARGET_LABEL