quantcore_circuits.circuit.consensus

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

Classes

Row

Functions

consensus(estimates[, targets, policy, spread_tol]) → list[Row]

estimates: estimator → ParamSet; targets: param → {"value", "tol"} (CircuitModel.targets form).

flag_near_resonance(rows, pairs[, factor]) → list[str]

Flag qubit–resonator pairs with |f_q − f_r| < factor·g: the modes hybridise, so dispersive quantities and

goal(rows) → dict

report_markdown(rows[, title]) → str

save(rows, path) → pathlib.Path

Module Contents

class quantcore_circuits.circuit.consensus.Row
chosen: float | None
chosen_by: str | None
flagged: bool
notes: list[str] = []
param: str
quantity: str
residual: float | None = None
spread_rel: float | None
status: str = 'unknown'
symbol: str
target: float | None = None
tol: float | None = None
unit: str
values: dict[str, float]
quantcore_circuits.circuit.consensus.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).

quantcore_circuits.circuit.consensus.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.

quantcore_circuits.circuit.consensus.goal(rows: list[Row]) → dict
quantcore_circuits.circuit.consensus.report_markdown(rows: list[Row], title: str = 'Consensus') → str
quantcore_circuits.circuit.consensus.save(rows: list[Row], path) → pathlib.Path
quantcore_circuits.circuit.consensus.LABELS
quantcore_circuits.circuit.consensus.POLICY: dict[str, list[str]]
quantcore_circuits.circuit.consensus.SPREAD_TOL