How qiboteam/qibocal works
Main Components
• CLI & Runcard Parser: Represented in the “src/qibocal/cli” directory that handles runcard inputs and triggers protocol execution.
• Protocol Execution Engine: The core logic that dispatches different quantum protocols. This can be shown as a centralized module that collects sub-components from “src/qibocal/auto”, “src/qibocal/protocols”, and “src/qibocal/fitting” (for analysis and data fitting).
• Reporting & Web Interface: Indicate the reporting module in “src/qibocal/web” and also note the additional “serverscripts/web” that help generate or upload reports to a centralized server.
• External Dependencies: Represent integrations with external projects such as Qibo and Qibolab. Also note that the project uses modern Python tooling (Poetry, pre-commit hooks) and a comprehensive testing suite (“tests”).
Relationships and Flows
• The Engine then selects and invokes the appropriate quantum protocol module (from “src/qibocal/protocols”), uses calibration settings (from “src/qibocal/calibration” and platforms configurations under “platforms”), and leverages fitting routines (in “src/qibocal/fitting”) for processing experimental data.
Architectural Patterns and Design Principles
• Modules are clearly separated by responsibility (CLI, execution engine, calibration, protocols, reporting). This suggests a layered or modular design, similar to an MVC-type separation (input, processing, output).
• The system uses declarative runcard files, promoting a configuration-driven approach.
• Extensibility: new protocols can be added in the “src/qibocal/protocols” folder and integrated into the execution pipeline.
• The design supports both local execution (by generating a date-stamped directory) and remote reporting (upload feature).
Technologies and Tools
• Python as the core language, with Poetry for dependency management and pre-commit for code quality.
• Use of GitHub workflows and tools like Codecov for CI/CD, as seen from the “.github” folder.
• Integration of Qibo and Qibolab as key libraries for execution of quantum experiments.