Skip to main content

The qualang_tools package includes various tools related to QUA programs in Python

Project description

PyPI discord

License

QUA Language Tools

The QUA language tools package includes various tools useful while writing QUA programs and performing experiments.

It includes:

  • QUA Loops Tools - This library includes tools for parametrizing QUA for_ loops using the numpy (linspace, arange, logspace) methods or by directly inputting a numpy array.

  • Plotting Tools - This library includes tools to help handling plots from QUA programs.

  • Result Tools - This library includes tools for handling and fetching results from QUA programs, and saving them to the local file storage.

  • Units Tools - This library includes tools for using units (MHz, us, mV...) and converting data to other units (demodulated data to volts for instance).

  • Analysis Tools - This library includes tools for analyzing data from experiments. It currently has a two-states discriminator for analyzing the ground and excited IQ blobs.

  • Octave Tools - This library includes tools for controlling the Octave and extract/set the correction parameters from the calibration database.

  • Multi-user tools - This library includes tools for working with the QOP in a multi-user or multi-process setting.

  • Simulator tools - This library includes tools for creating simulations.

  • Bakery - This library introduces a new framework for creating arbitrary waveforms and storing them in the usual configuration file. It allows defining waveforms in a QUA-like manner while working with 1ns resolution (or higher).

  • External Frameworks - This library introduces drivers for integrating the OPX within external frameworks such as QCoDeS. Please refer to the examples section for more details about how to use these drivers.

  • Video Mode - This module allows the user to update some pre-defined parameters of a QUA program while fetching data from the OPX for dynamic tuning. Please refer to the examples section for more details about how to implement this module.

  • Addons:

    • Calibrations - This module allows to easily perform most of the standard single qubit calibrations from a single python file.
    • Interactive Plot Library - This package drastically extends the capabilities of matplotlib, enables easily editing various parts of the figure, copy-pasting data between figures and into spreadsheets, fitting the data and saving the figures.
    • assign_variables_to_element - Forces the given variables to be used by the given element thread. Useful as a workaround for when the compiler wrongly assigns variables which can cause gaps.
  • Config Tools - This package includes tools related to the QOP configuration file, including:

    • Integration Weights Tools - This package includes tools for the creation and manipulation of integration weights.
    • Waveform Tools - This package includes tools for creating waveforms useful for experiments with the QOP.
    • Config Helper Tools - This package includes tools for writing and updating the configuration.
    • Config GUI - This package contains a GUI for creating and visualizing the configuration file - No longer being actively developed.
    • Config Builder - This package contains an API for creating and manipulation configuration files - No longer being actively developed.
  • Control Panel- This package includes tools for directly controlling the OPX.

    • ManualOutputControl - This module allows controlling the outputs from the OPX in CW mode. Once created, it has an API for defining which channels are on. Analog channels also have an API for defining their amplitude and frequency.
    • VNA - This module allows to configure the OPX as a VNA for a given element (readout resonator for instance) and operation (readout pulse for instance) already defined in the configuration. Once created, it has an API for defining which measurements are to be run depending on the down-conversion solution used (ED: envelope detector, IR: image rejection mixer, IQ: IQ mixer).
  • Macros - This module includes convenience functions for encapsulating common QUA code.

  • Digital filters - Library of functions allowing the derivation of the digital filter taps to correct distortions.

  • Voltage Gates - The VoltageGateSequence class facilitates the creation and management of complex pulse sequences for quantum operations, allowing for dynamic voltage control, ramping, and bias compensation across multiple gate elements.

  • Wirer - The wirer tool allows for automatic allocation of arbitrary channels to an arbitrary combination of instruments.

Installation

Install the current version using pip, the --upgrade flag ensures that you will get the latest version.

pip install --upgrade qualang-tools

Note that in order use the Interactive Plot Library, you need to install using

pip install --upgrade qualang-tools[interplot]

Note that in order to run 2-Qubit Randomized Benchmarking, you need to install using

pip install --upgrade qualang-tools[two-qubit-rb]
# Note that `cirq` will only be installed if your python version exceeds 3.10. 
# Otherwise, install it separately, i.e., pip install cirq==1.2.0

Note that in order to use the data handler, you need to install using:

pip install --upgrade qualang-tools[datahandler]

[!WARNING] Deprecated: The following extras are deprecated and are no longer supported.

Note that in order use the Config GUI or Config Builder, you need to install using

pip install --upgrade qualang-tools[configbuilder]

Support and Contribution

Have an idea for another tool? A way to improve an existing one? Found a bug in our code?

We'll be happy if you could let us know by opening an issue on the GitHub repository.

Feel like contributing code to this library? We're thrilled! Please follow this guide and feel free to contact us if you need any help, you can do it by opening an issue :)

Usage

Examples for using various tools can be found on the QUA Libraries Repository.

Examples for using the Baking toolbox, including 1-qubit randomized benchmarking, cross-entropy benchmark (XEB), high sampling rate baking and more can be found 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

qualang_tools-0.22.0.tar.gz (4.4 MB view details)

Uploaded Source

Built Distribution

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

qualang_tools-0.22.0-py3-none-any.whl (4.5 MB view details)

Uploaded Python 3

File details

Details for the file qualang_tools-0.22.0.tar.gz.

File metadata

  • Download URL: qualang_tools-0.22.0.tar.gz
  • Upload date:
  • Size: 4.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for qualang_tools-0.22.0.tar.gz
Algorithm Hash digest
SHA256 585afbf56437c471ab420e001c5f12293dcd9e6f934c8096bd323023ea6887c2
MD5 46c9f6bfcb6a3fb7b08a8af50d49a1b1
BLAKE2b-256 0763c86dc18120f968c1219ec56ba4e1620508aac5122963780c35b90eb96ecb

See more details on using hashes here.

File details

Details for the file qualang_tools-0.22.0-py3-none-any.whl.

File metadata

  • Download URL: qualang_tools-0.22.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for qualang_tools-0.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7fabf9e974cf1e408cd12f1cb0bc06262342b156af87a18d640719a4b780e46
MD5 e810914ca21f13b4f5041f42f53e98a6
BLAKE2b-256 8a19e3ff5da7fa4ddc94044b4acb6f50ae3a0446a0cae2918e2e9dadefd03fc4

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