Skip to main content

Quantum hardware module and drivers for Qibo

Project description

Qibolab

codecov PyPI - Version PyPI - Python Version

Qibolab is the dedicated Qibo backend for the automatic deployment of quantum circuits on quantum hardware.

Some of the key features of Qibolab are:

  • Deploy Qibo models on quantum hardware easily.
  • Create custom experimental drivers for custom lab setup.
  • Support multiple heterogeneous platforms.
  • Use existing calibration procedures for experimentalists.
  • Provide a emulator backend equipped with various quantum dynamics simulation engines (currently support: QuTiP) for seamless emulation of quantum hardware.

Documentation

docs

The qibolab backend documentation is available at https://qibo.science/qibolab/stable/.

Minimum working example

A simple example on how to connect to a platform and use it execute a pulse sequence:

from qibolab import create_platform, ExecutionParameters
from qibolab.pulses import DrivePulse, ReadoutPulse, PulseSequence

# Define PulseSequence
sequence = PulseSequence()
# Add some pulses to the pulse sequence
sequence.add(
    DrivePulse(
        start=0,
        amplitude=0.3,
        duration=4000,
        frequency=200_000_000,
        relative_phase=0,
        shape="Gaussian(5)",  # Gaussian shape with std = duration / 5
        channel=1,
    )
)

sequence.add(
    ReadoutPulse(
        start=4004,
        amplitude=0.9,
        duration=2000,
        frequency=20_000_000,
        relative_phase=0,
        shape="Rectangular",
        channel=2,
    )
)

# Define platform and load specific runcard
platform = create_platform("my_platform")

# Connects to lab instruments using the details specified in the calibration settings.
platform.connect()

# Execute a pulse sequence
options = ExecutionParameters(nshots=1000)
results = platform.execute_pulse_sequence(sequence, options)

# Print the acquired shots
print(results.samples)

# Disconnect from the instruments
platform.disconnect()

Here is another example on how to execute circuits:

import qibo
from qibo import gates, models


# Create circuit and add gates
c = models.Circuit(1)
c.add(gates.H(0))
c.add(gates.RX(0, theta=0.2))
c.add(gates.X(0))
c.add(gates.M(0))


# Simulate the circuit using numpy
qibo.set_backend("numpy")
for _ in range(5):
    result = c(nshots=1024)
    print(result.probabilities())

# Execute the circuit on hardware
qibo.set_backend("qibolab", platform="my_platform")
for _ in range(5):
    result = c(nshots=1024)
    print(result.probabilities())

Citation policy

arXiv DOI

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

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

qibolab-0.1.10.tar.gz (145.6 kB view details)

Uploaded Source

Built Distribution

qibolab-0.1.10-py3-none-any.whl (173.4 kB view details)

Uploaded Python 3

File details

Details for the file qibolab-0.1.10.tar.gz.

File metadata

  • Download URL: qibolab-0.1.10.tar.gz
  • Upload date:
  • Size: 145.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qibolab-0.1.10.tar.gz
Algorithm Hash digest
SHA256 2541ded6ce3d7071c4c5be6714266e23b5c86c5e3dde1657c82382246f05b81a
MD5 9181518650289eadd2f8c04072754a44
BLAKE2b-256 f3b05da46a66c7d6a66393396773ba3197dfdf7d223644668514f266c91cadd8

See more details on using hashes here.

File details

Details for the file qibolab-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: qibolab-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 173.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qibolab-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 f0ca402148acd3f97aab22440d2f9c0a93774b28216a3d2e3ad14d5a912a4476
MD5 41083fac6d16a167dfdf0b4a1b22f98d
BLAKE2b-256 d0247970ceaad099ef5b7ecf92e16200c15212a28bec04509df471b13ef38923

See more details on using hashes here.

Supported by

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