Skip to main content

QKIT

Qkit - a quantum measurement suite in python

PyPI - Version PyPI - Python Version Release

Features:

  • a collection of ipython notebooks for measurement and data analysis tasks.
  • hdf5 based data storage of 1,2 and 3 dimensional data, including a viewer.
  • classes for data fitting, e.g. of microwave resonator data. This includes also a robust circle fit algorithm.
  • extended and maintained drivers for various low frequency and microwave electronics.

Platform:

The qkit framework has been tested under windows and with limits under macos x and linux. The gui requires h5py, qt and pyqtgraph, which work fine on these platforms. The core of the framework should run with python 3.9+

Configuration

There are three sources of configuration, which are used to set up your environment

  • qkit defaults (you shouldn't change those)
  • local config file
  • configuration in notebooks

Local config file

On import, qkit will look for a file called qkit_local_config.py or local.py in your current working directory or any of its parents. Note, that in case of a jupyter notebook, the current working directory is the directory in which your notebook is located.

If you can't put such a configuration file into a suitable location, you can set the environment variable QKIT_LOCAL_CONFIG with a path pointing to such a configuration file. This variable circumvents the search, and the file is directly loaded.

Installation Guide

Installing qkit is a two step process: First you need to obtain the qkit package, and then you need to setup your system to use it properly. This guide will provide you with the required steps.

Creating a Virtual Environment

It is mandatory to use a virtual environment if you want to use automatic installation. This isolates this local environment from your global packages. This way, version conflicts can be avoided. You need to activate the virtual environment before using qkit. Otherwise, qkit and its dependencies will not be available.

NOTE: WE DO NOT GUARANTEE COMPATIBILITY WITH ANACONDA/MINICONDA/CONDA! USE AT YOUR OWN RISK!

First, create a virtual environment:

python -m virtualenv venv

And then activate it on Linux:

source venv/bin/activate

or Windows:

.\venv\bin\activate.bat

Obtaining the qkit package

You have two choices, based on whether you want to modify qkit (development) or only want to use it.

Install qkit for usage only

Create a virtual environment, as described above. Then use pip to install qkit:

pip install qkit[jupyter,analysis]

If you are simply using qkit, changes to files in src/ should not be necessary. If you find things you need to change there, this might be a bug. Please report this.

Install qkit for development

Clone this repository to wherever is convenient.

git clone https://github.com/qkitgroup/qkit

Create a virtual environment, as described above.

Now, you can install qkit as an editable package. This means, that you can change files in the cloned repository. Changes will affect your python setup.

The brackets contain optional dependencies. This pulls the libraries needed for jupyter lab.

pip install --editable '.[jupyter,analysis]'

Configuring your system

In order to make .h5-files clickable and to configure qkit globally, run

qkit-install

On Windows, some of the changes require editing the registry. qkit-install can do that automatically, if run with elevated priviledges (as an Admin). To do so, run in a PowerShell

Start-Process qkit-install -Verb runAs

This will associate .h5-files with qkit, and set the environment variables QKIT_LOCAL_CONFIG and QKIT_VENV to the correct values. It will also create the required directories for data, notebooks and logs, and it will instantiate the configuration files for Jupyter Lab and Qkit.

If the notebooks folder this creates does not match your needs, you can change it by modifiying jupyter_lab_config.py:

# Set Notebook directory
notebook_dir = r'C:\notebooks' # Change this line

Launching Jupyter Lab

On Linux, qkit-install will install a desktop file to launch Qkit. Look for "Qkit Jupyter Lab". On Windows, qkit-install will create a batch script launch.bat. You can create a shortcut to it to launch it from the desktop.

Upgrading

If you use an existing installation of qkit, there might be some breaking changes. They are not major, but need to be taken care of.

Migrating Configuration

Previously, the configuration of qkit was located in qkit/config/local.py. As this directory is now a child of src/, you are probably not supposed to touch this file. This method is deprecated (you will receive warnings).

Instead, in a parent directory, a file named qkit_local_config.py is used to configure your environment.

To migrate, copy the code in your old local.py into the new qkit_local_config.py file. Do note, however, that the datadir and logdir paths have changed. It is recommended to use the new values. Conflicting entries in your config may need to be deleted.

"My changes to the configuration are not applied after upgrading"

If your notebooks do not reside in a child directory of qkit, the qkit_local_config.py may not be found, as each notebook launches a Python process in its location running itself. Thus qkit_local_config.py may not be in any of the notebooks parent directories. In this case, either set the environment variable QKIT_LOCAL_CONFIG to your configuration, or place the configuration in your notebook directory instead.

Migrating Notebooks

The new setup assumes, that notebooks are located in notebooks/. This way, qkit_local_config.py is in a parent directory of your notebooks and is thus loaded when you initialize qkit in your notebooks.

On measurement computers, it is recommended to move your notebooks into that directory. Alternatively, update jupyter_lab_config.py to point to the notebook directory:

# Set Notebook directory
notebook_dir = 'notebooks' # Change this line

On Windows, this might be set to:

# Set Notebook directory
notebook_dir = r'C:\notebooks' # Change this line

Also, you will need to migrate your local config to a parent directory of your notebooks, or point to it using the environment variable QKIT_LOCAL_CONFIG. It is possible to set this environment variable in jupyter_lab_config.py, as environment variables are inherited to process children.

Requirements

This project uses python. An up to date installation of python is expected to be present.

Library Usage
pyqt5 GUI
numpy, scipy, uncertainties General Usage
pyqtgraph, matplotlib Plotting
h5py Data Stroage
jupyterlab Interactive Notebooks
jupyterlab-templates Notebook Templating
pyvisa, pyvisa-py Communication with Devices
zhinst Drivers for Zurich Instruments devices
zeromq Messaging
toml Configuration

Metadata

Release files for qkit 0.7.0

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

Source distribution (sdist)

Source distribution for qkit 0.7.0
File Size Uploaded Provenance Actions
qkit-0.7.0.tar.gz 5.7 MB Without provenance Details for qkit-0.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 10.9 MB

Release files / qkit-0.7.0.tar.gz

Download URL qkit-0.7.0.tar.gz
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
e61e9868b5958d5eee6fb607d14f171a4720df1fb7e571c19c94741d0f65592b
BLAKE2b-256 checksum
How to use checksums
6e8bb3f00b09e5a8c8d5c6d19fb163c69996ea606bd249fe868469b5e5adc1e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":true,"cpu":"x86_64","distro":{"id":"resolute","libc":{"lib":"glibc","version":"2.43"},"name":"Ubuntu","version":"26.04"},"implementation":{"name":"CPython","version":"3.15.2"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.5 27 Jan 2026","python":"3.15.2","system":{"name":"Linux","release":"7.0.0-1019-azure"}} HTTPX2/2.16.0

Release files / qkit-0.7.0-py3-none-any.whl

Download URL qkit-0.7.0-py3-none-any.whl
Size 5.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
93215f4111afed79462d623253864983405291b8057f29fb86e91806d2e8bd75
BLAKE2b-256 checksum
How to use checksums
a1e38a1bdf597bb78835ac670e180e4bcf40f5238026a6bcaa45e6adbf16aeb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":true,"cpu":"x86_64","distro":{"id":"resolute","libc":{"lib":"glibc","version":"2.43"},"name":"Ubuntu","version":"26.04"},"implementation":{"name":"CPython","version":"3.15.2"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.5 27 Jan 2026","python":"3.15.2","system":{"name":"Linux","release":"7.0.0-1019-azure"}} HTTPX2/2.16.0

Security for qkit 0.7.0

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