quantcore_circuits.circuit.consensus ==================================== .. py:module:: quantcore_circuits.circuit.consensus .. autoapi-nested-parse:: Consensus across estimators (M10): per parameter the estimator values, spread, chosen value, residual, pass/fail. Selection policy (configurable, first available wins): pyEPR for χ/α when eigenmode data exists, SQcircuit for qubit spectra, QuCat for κ and χ, Metal LOM as the C-matrix reference. A parameter whose relative spread exceeds its ``spread_tol`` is *flagged*: the estimators disagree, which is a modelling problem rather than a design problem. Attributes ---------- .. autoapisummary:: quantcore_circuits.circuit.consensus.LABELS quantcore_circuits.circuit.consensus.POLICY quantcore_circuits.circuit.consensus.SPREAD_TOL Classes ------- .. autoapisummary:: quantcore_circuits.circuit.consensus.Row Functions --------- .. autoapisummary:: quantcore_circuits.circuit.consensus.consensus quantcore_circuits.circuit.consensus.flag_near_resonance quantcore_circuits.circuit.consensus.goal quantcore_circuits.circuit.consensus.report_markdown quantcore_circuits.circuit.consensus.save Module Contents --------------- .. py:class:: Row .. py:attribute:: chosen :type: float | None .. py:attribute:: chosen_by :type: str | None .. py:attribute:: flagged :type: bool .. py:attribute:: notes :type: list[str] :value: [] .. py:attribute:: param :type: str .. py:attribute:: quantity :type: str .. py:attribute:: residual :type: float | None :value: None .. py:attribute:: spread_rel :type: float | None .. py:attribute:: status :type: str :value: 'unknown' .. py:attribute:: symbol :type: str .. py:attribute:: target :type: float | None :value: None .. py:attribute:: tol :type: float | None :value: None .. py:attribute:: unit :type: str .. py:attribute:: values :type: dict[str, float] .. py:function:: consensus(estimates: dict[str, dict], targets: dict | None = None, policy=None, spread_tol=None) -> list[Row] ``estimates``: estimator → ParamSet; ``targets``: param → {"value", "tol"} (``CircuitModel.targets`` form). .. py:function:: flag_near_resonance(rows: list[Row], pairs, factor: float = 5.0) -> list[str] Flag qubit–resonator pairs with \|f_q − f_r\| < ``factor``·g: the modes hybridise, so dispersive quantities and the estimators' mode labels disagree by construction (not an estimator bug). ``pairs``: objects with ``qubit`` and ``resonator`` names (``FilledCircuit.pairs``). Adds a note and ``flagged`` to the f_q, f_r, χ and g rows and returns the notes. .. py:function:: goal(rows: list[Row]) -> dict .. py:function:: report_markdown(rows: list[Row], title: str = 'Consensus') -> str .. py:function:: save(rows: list[Row], path) -> pathlib.Path .. py:data:: LABELS .. py:data:: POLICY :type: dict[str, list[str]] .. py:data:: SPREAD_TOL