Architecture#
The suite is a monorepo managed as a single uv workspace. Four packages
divide the work of a calibration run cleanly, and depend on each other only in
one direction:
bragi_quantum.experiments ── measurement nodes (the experiments)
│ produces datasets & QOIs, reads the active session
▼
bragi_quantum.datalayer ── device model + data persistence (HDF5, Redis) + the session
▲
│ builds & starts the session, drives nodes
bragi_quantum.api ── orchestration (CalibrationOrchestrator)
│ writes calibration_outputs/<timestamp>/
▼
bragi_quantum.gui ── replot / monitoring server (qc2-show), re-reads saved sessions
The four packages#
bragi_quantum.experiments — experiments#
A library of calibration and characterization nodes. Each node is one
experiment (resonator spectroscopy, qubit spectroscopy, Rabi, Ramsey, Motzoi,
readout frequency/amplitude optimization, punchout). Every node is built from
four cooperating pieces — Parameters, Measurement, Analysis and one
or more QOI classes — described in Core Concepts. bragi_quantum.experiments never talks to the
orchestrator directly; it reads everything it needs (device, hardware,
persistence) from the active session provided by bragi_quantum.datalayer.
bragi_quantum.datalayer — data layer#
Owns two things:
The device model (
bragi_quantum.datalayer.models): a Pydantic/Qblox description of the physical chip — transmons, tunable couplers, gates and pulses. The central entry point isDeviceConfiguration, hydrated from a YAML template or a Qblox snapshot.Data management (
bragi_quantum.datalayer.managing): the session abstraction (ActiveSession,SessionContext,SessionOptions), HDF5 dataset I/O, thesession_timeline.jsonlog, and the Redis integration that stores calibrated values.
The ActiveSession is a thread-safe
singleton — the handshake between bragi_quantum.api (which starts it) and bragi_quantum.experiments (which
reads from it), so the two packages stay decoupled.
bragi_quantum.api — orchestration and API#
The orchestration layer and the main public API. A single
CalibrationOrchestrator loads the device template,
connects the hardware, opens sessions, runs nodes, and produces the output
artifacts (datasets, PDF report, interactive HTML). bragi_quantum.api is deliberately
decoupled from concrete node types — it only calls the duck-typed
node.execute().
bragi_quantum.gui — GUI#
An on-demand replot and monitoring server, launched with qc2-show. It
reads back a directory of calibration_outputs/ run folders, re-instantiates
the analysis classes recorded in session_timeline.json, and re-renders plots
from the saved HDF5 data — without ever re-running an experiment. See
The Replot Server (bragi_quantum.gui).
Repository layout#
bragi-quantum/
├── packages/
│ ├── bragi_quantum.experiments/ # experiment nodes
│ ├── bragi_quantum.datalayer/ # device model + data management
│ ├── bragi_quantum.api/ # orchestrator
│ └── bragi_quantum.gui/ # replot / monitoring server
├── device_templates/ # per-chip device.yaml / cluster.yaml / spi.yaml
│ ├── example_chip/
│ └── ...
├── examples/ # scripts/ (runnable calibration scripts), notebooks/
├── calibration_outputs/# timestamped run artifacts (created at run time)
└── docs/ # this documentation
Device templates#
A device template under device_templates/<name>/ describes one physical
chip and its control hardware:
device.yaml— the qubits, couplers and their default parameters;cluster.yaml— the Qblox cluster hardware configuration;spi.yaml— the SPI rack (flux-bias DAC) configuration;wiring.yaml— the physical wiring configuration.
The orchestrator is pointed at a template by name
(experiment_template_name="example_chip"), which loads all three files and builds the
live device model from them.