Skip to main content

Qibocal

codecov PyPI - Version PyPI - Python Version Documentation

Qibocal provides calibration protocols using Qibo and Qibolab.

Qibocal key features:

  • Declarative inputs using runcard.

  • Generation of a report.

Documentation

Qibocal documentation is available at https://qibo.science/qibocal/stable/.

Installation

The package can be installed from source:

git clone https://github.com/qiboteam/qibocal.git
cd qibocal
pip install .

Developer instructions

For development make sure to install the package using uv and to install the pre-commit hooks:

git clone https://github.com/qiboteam/qibocal.git
cd qibocal
uv sync
pre-commit install

Minimal working example

Here is an example on how to run a Rabi experiment in Qibocal.

from qibocal import create_calibration_platform
from qibocal.protocols import rabi_amplitude

# create platform
platform = create_calibration_platform("qubit")

# define qubits where the protocols will be executed
targets = [0]

# define protocol parameters
params = rabi_amplitude.parameters_type.load(
    dict(
        min_amp=0.01,
        max_amp=0.2,
        step_amp=0.02,
        nshots=2000,
        pulse_length=40,
    )
)

# acquire
platform.connect()
data, acquisition_time = rabi_amplitude.acquisition(
    params=params, platform=platform, targets=targets
)
platform.disconnect()

# post-processing
results, fit_time = rabi_amplitude.fit(data=data)

# visualize the results
plots, table = rabi_amplitude.report(data=data, results=results, target=targets[0])
plots[0].show()

Rabi

The table is written in HTML and can be visualized in Python with

from IPython import display

display.HTML(table)

Table

Running a protocol through a runcard

The same experiment can also be run using the following yaml file

platform: qubit
targets: [0]
actions:
- id: rabi
  operation: rabi_amplitude
  parameters:
    min_amp: 0.01
    max_amp: 0.2
    step_amp: 0.02
    nshots: 2000
    pulse_length: 40

To run the protocol Qibocal uses the qq run command

qq run <runcard> -o <output_folder>

If <output_folder> is specified, the results will be saved in it, otherwise qq will automatically create a default folder containing the current date and the username.

Uploading reports to server

In order to upload the report to a centralized server, send to the server administrators your public ssh key (from the machine(s) you are planning to upload the report) and then use the qq upload <output_folder> command. This program will upload your report to the server and generate a unique URL.

Contributing

Contributions, issues and feature requests are welcome! Feel free to check GitHub issues

Citation policy

arXiv DOI

If you use the package please refer to the documentation for citation instructions.

Ongoing development

A non-exhaustive list of possible protocols to be implemented in Qibocal is collected here.

Metadata

Release files for qibocal 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qibocal 0.2.7
File Size Uploaded Provenance Actions
qibocal-0.2.7.tar.gz 853.0 kB Without provenance Details for qibocal-0.2.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qibocal 0.2.7
File Interpreter ABI Platform Actions
qibocal-0.2.7-py3-none-any.whl Python 3 none any Details for qibocal-0.2.7-py3-none-any.whl

Total release size: 1.8 MB

Release files / qibocal-0.2.7.tar.gz

Download URL qibocal-0.2.7.tar.gz
Size 853.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1f5951bf3d53d8a201bfdb09db79841760c21c48fa654ad5740625c4e855510f
BLAKE2b-256 checksum
How to use checksums
2650992c4b79203e91cecd5676e75d5da377cadc2ea2c351b083cebc082173ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / qibocal-0.2.7-py3-none-any.whl

Download URL qibocal-0.2.7-py3-none-any.whl
Size 966.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89123ee753ed83fdc99c1cdfbd36eed2182edcfcacb745c0f43921d0bedbb2df
BLAKE2b-256 checksum
How to use checksums
d65a6feb2c260e74bc757f0ea8231e323330c4c0375e1e687d182240c4458d9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for qibocal 0.2.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page