Skip to main content

Python client for DeteQT metrology and quantum-chip diagnostics on InfluxDB v2.

Project description

deteqt

Python client for DeteQT metrology and quantum-chip diagnostics on InfluxDB v2.

Documentation

Install

# Create and activate a virtual environment
uv venv deteqt-env --python 3.13  # any supported version >=3.12
source deteqt-env/bin/activate  # Linux/macOS
# .\deteqt-env\Scripts\activate  # Windows

# Install from PyPI
uv pip install deteqt

# Verify
uv run --active python -c "import deteqt; print(deteqt.__version__)"

If you cloned this repository for local development:

uv pip install -e . --group all

Configure settings

from deteqt import write_settings_file

settings_path = write_settings_file(
    url="https://deteqt.duckdns.org",
    org="YOUR_ORG",
    bucket="YOUR_BUCKET",
    token="YOUR_WRITE_TOKEN",
)
print(settings_path)  # settings.toml

This creates settings.toml in your current working directory.

You can also create it manually:

url = "https://deteqt.duckdns.org"
org = "YOUR_ORG"
bucket = "YOUR_BUCKET"
token = "YOUR_WRITE_TOKEN"

Write one point

from deteqt import TUID, write_point

run_tuid: TUID = TUID("20260213-143319-249-01d39d")

summary = write_point(
    qoi="frequency",
    nominal_value=1.01,
    uncertainty=0.01,
    tuid=run_tuid,
    element="q1",
    label="f01",
    unit="GHz",
    element_label="qubit-01",
    device_ID="chip-a",
    run_ID="run-001",
    cycle_ID="cycle-01",
    condition="4K",
    extra_tags={
        "area_of_interest": "sweetspot",
        "long_label": "Q1 frequency",
    },
    extra_fields={
        "temperature_mK": 12.3,
        "passed_qc": True,
    },
)
print(summary)  # {'records_total': 1, 'records_written': 1, 'records_failed': 0}

Write batch (with optional extras)

from deteqt import write_batch

summary = write_batch(
    [
        {
            "qoi": "frequency",
            "nominal_value": 1.01,
            "uncertainty": 0.01,
            "run_ID": "run-001",
            "cycle_ID": "cycle-01",
            "extra_tags": {
                "area_of_interest": "sweetspot",
                "long_label": "Q1 frequency",
            },
            "extra_fields": {"temperature_mK": 12.3},
        },
        {
            "qoi": "phase",
            "nominal_value": 0.12,
            "run_ID": "run-001",
            "extra_tags": {
                "area_of_interest": "sweetspot",
                "long_label": "Q1 frequency",
            },
            "extra_fields": {"passed_qc": True},
        },
    ]
)

Common schema policy

Use these common keys across all integrations:

  • measurement: qoi
  • tags: element, label, unit, element_label, device_ID, run_ID, cycle_ID, condition
  • fields: nominal_value, uncertainty, tuid

Partner-specific keys area_of_interest and long_label are treated as optional extra tags. If your settings file is elsewhere, pass settings_path=".../settings.toml".

Recursive ingest/write (single mode)

from deteqt import ingest_and_write

summary = ingest_and_write(folder="quantify-data")
print(summary)

The recursive path is JSON-only and always hybrid:

  • values come from quantities_of_interest*.json
  • metadata/tags come from snapshot*.json
  • only standard SCQT transmon QoIs are kept

Supported analysis aliases are normalized to standard names (for example: T1 -> t1, Qi -> resonator_qi, Qc -> resonator_qc, fr -> resonator_freq_low and resonator_freq_high).

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

deteqt-0.1.5.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

deteqt-0.1.5-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file deteqt-0.1.5.tar.gz.

File metadata

  • Download URL: deteqt-0.1.5.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for deteqt-0.1.5.tar.gz
Algorithm Hash digest
SHA256 58aba7d935b8e98630b300616031c756fa6d4ac65191b3c2b21d279a46d0bf35
MD5 435992074e36d702ccca917b22087980
BLAKE2b-256 5c63c2cdb102d609545aa950bd5b002c51233069412f36a32a0bc86413b53d8f

See more details on using hashes here.

File details

Details for the file deteqt-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: deteqt-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for deteqt-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0b926f48aba9a2102110a8d7891cf3bd91b7d661e82e5f402a3ecd4ad5f35932
MD5 71195712fc12c346ffbd5f9494d7b0a6
BLAKE2b-256 a91098f7ca23d51281b3818363715d38b930369e3a6c494cefa163cec62c7a61

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