qibocal.cli package

CLI entry point.

Submodules

qibocal.cli.acquisition module

qibocal.cli.acquisition.acquire(runcard: Runcard, folder: Path, force: bool)[source]

Data acquisition.

Parameters:

RUNCARD (-) – runcard with declarative inputs.

qibocal.cli.compare module

qibocal.cli.compare.initialize_combined_report(report_path: Path, output_folder: Path, force: bool) tuple[Output, Path][source]

Initialisation of the output.

Create the report directory and set up start-finish time, report title.

Parameters:
  • report_path (pathlib.Path) – path of the folder containing one of the initial reports.

  • output_folder (pathlib.Path) – path of the folder containing the combined report.

  • force (bool) – if set to true, overwrites output_folder (if it already exists).

qibocal.cli.compare.compare_reports(folder: Path, path_1: Path, path_2: Path, force: bool)[source]

Report comparison generation.

Currently only two reports can be combined together. Only tasks with the same id can be merged. Tables display data from both reports side by side. Plots display data from both reports.

Parameters:
  • folder (pathlib.Path) – path of the folder containing the combined report.

  • path_1 (pathlib.Path) – path of the first report to be compared.

  • path_2 (pathlib.Path) – path of the second report to be compared.

  • force (bool) – if set to true, overwrites folder (if it already exists).

qibocal.cli.fit module

qibocal.cli.fit.mkoutput(input: Path, output: Path | None, force: bool)[source]
qibocal.cli.fit.fit(input_path: Path, update: bool, output_path: Path | None, force: bool)[source]

Post-processing analysis.

Arguments: - input_path: input folder. - update: perform platform update - output_path: new folder with data and fit

qibocal.cli.report module

qibocal.cli.report.ReportOutcome

Report produced by protocol.

alias of tuple[str, list[Figure]]

qibocal.cli.report.generate_figures_and_report(node: ~qibocal.auto.task.Completed, target: ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])] | ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)] | list[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]]) tuple[str, list[Figure]][source]

Calling protocol plot by checking if fit has been performed.

It operates on a completed node and a specific protocol target, generating a report outcome (cf. ReportOutcome).

qibocal.cli.report.plotter(node: ~qibocal.auto.task.Completed, target: ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])] | ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)] | list[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]]) tuple[str, str][source]

Run plotly pipeline for generating html.

Performs conversions of plotly figures in html rendered code for completed node on specific target.

qibocal.cli.report.report(path: Path, history: History | None = None)[source]

Report generation.

Generates the report for protocol dumped in path. Executor can be passed to generate report on the fly.

qibocal.cli.run module

qibocal.cli.run.protocols_execution(runcard: Runcard, folder: Path, force, update)[source]

Autocalibration.

Parameters:

RUNCARD (-) – runcard with declarative inputs.

qibocal.cli.update module

qibocal.cli.update.update(path: Path)[source]

Perform copy of updated platform in QIBOLAB_PLATFORM

Parameters:

input_path (-) – Qibocal output folder.

qibocal.cli.upload module

Upload report to server.

class qibocal.cli.upload.UploadLab(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Lab where the report is uploaded.

TII = 'tii'
S14 = 's14'
class qibocal.cli.upload.UploadConfig(host: str, target_dir: str, root_url: str)[source]

Bases: object

Configuration for the upload process.

host: str

Host to upload the report to.

target_dir: str

Target directory on the host where the report will be uploaded.

root_url: str

Root URL for accessing the uploaded report.

static from_lab(lab_name: str) UploadConfig[source]
qibocal.cli.upload.upload_report(path: Path, tag: str, author: str, lab: str) str[source]