Skip to main content

Qibo's quantum calibration, characterization and validation module.

Project description

Qibocal

codecov PyPI - Version PyPI - Python Version

Qibocal provides calibration protocols using Qibo and Qibolab.

Qibocal key features:

  • Declarative inputs using runcard.

  • Generation of a report.

Documentation

docs

Qibocal documentation is available here.

[!NOTE] Qibocal main contains some breaking changes compared to 0.1 versions. A small guide to make the transition as smooth as possible can be found here.

Installation

The package can be installed by source:

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

Developer instructions

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

git clone https://github.com/qiboteam/qibocal.git
cd qibocal
poetry install
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=target[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 an 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qibocal-0.2.4.tar.gz (729.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qibocal-0.2.4-py3-none-any.whl (898.0 kB view details)

Uploaded Python 3

File details

Details for the file qibocal-0.2.4.tar.gz.

File metadata

  • Download URL: qibocal-0.2.4.tar.gz
  • Upload date:
  • Size: 729.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qibocal-0.2.4.tar.gz
Algorithm Hash digest
SHA256 c2ddbbb3a8f8356bc4590745e80be3f6627ba80444e05198c6bfda867af44880
MD5 81d2e77ccfac6ec817e5a792a8e26043
BLAKE2b-256 f7244212f793e05833a73426894b1b14dfbfb618fe78337ba738416084ccd0f1

See more details on using hashes here.

File details

Details for the file qibocal-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: qibocal-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 898.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qibocal-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 be57642278b1f878ca6210a2b327f27e51e8516b325d5fe15ce816711e1eec6b
MD5 c0221ae2ce8d33ae309ab6d16ab7c946
BLAKE2b-256 14844bc1712f965246ae5f61fb9183ef3fad33e2a923e12efb6b00c9e7dafbfe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page