quantcore_circuits.autotrack¶
Automatic run tracking: the library’s own calls record into build/<run>/state.json for the dashboard.
Switch it on with one line (from quantcore_circuits import track; track.start("t04")) or QCC_TRACK=1 in the
environment (a name instead of 1 names the run). From then on the hooks in the library report to the
Session:
library call |
what the dashboard gets |
|---|---|
|
Layout step, design block, headless KLayout snapshot ( |
|
DRC counts on the Layout step |
|
circuit (values, estimate vs FEM) and C-matrix, |
|
Hamiltonian step, targets with values, goal, plots, cards, one history row per design |
|
(old API) targets with values |
|
one history row per evaluation, with the knobs |
|
as before (explicit |
FEM jobs under build/jobs |
a watcher thread polls |
Run naming: track.start("t04") records everything into build/t04 whatever the design is called (the
tutorial’s revisions all land in one run); track.start() keeps one run per design name (build/<design>,
what loop.analyse and Run(design) use). build/_live.json points at the run that saw the latest event;
qcc dashboard follows it.
Nothing here may break a notebook: every handler is wrapped, a failure is logged once in the run’s log.
Attributes¶
Classes¶
Functions¶
|
Module Contents¶
- class quantcore_circuits.autotrack.Session(name: str | None = None, root: str | pathlib.Path = 'build', reset: bool = True, snapshots: bool = True, watch: bool = True)¶
- flush(timeout: float = 30.0) None¶
Wait until the background jobs (snapshots, cards) queued so far are done (scripts, tests).
- handle(event: str, kw: dict, run=None) None¶
- on_compare(run, targets, extracted, design=None)¶
The old extract/compare API: values vs targets.
- on_drc(run, report, design)¶
- on_fill(run, filled, job=None)¶
- on_layout(run, result, path)¶
- on_lom(run, result, filled)¶
- on_optimise(run, index, knobs, metrics, error, tol, design)¶
- on_optimise_end(run, converged, error=None, evaluations=0, design=None)¶
- on_stage(run, step, phase, label='', detail='')¶
A library stage (render / export): running → done / failed; nested stages of a step mark the outermost.
- on_synthesis(run, targets, result)¶
- run_for(design=None, model_name: str | None = None)¶
The Run events about
design(a Design, or None +model_name) go to; made and reset on first use.
- stop()¶
- current = None¶
- lom_designs: dict[str, dict[str, dict]]¶
- lom_hashes: dict[str, list[str]]¶
- lom_last: dict[str, tuple]¶
- lom_rows: dict[str, dict[str, dict]]¶
- name = None¶
- pending: list[tuple[str, dict]] = []¶
- quiet_depth = 0¶
- reset = True¶
- root¶
- runs: dict[str, object]¶
- snapshots = True¶
- quantcore_circuits.autotrack.quiet(session)¶
- quantcore_circuits.autotrack.MAX_SHOTS = 12¶
- quantcore_circuits.autotrack.POINTER = '_live.json'¶