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 313
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",
    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_written': 1}

Write batch (with optional extras)

from deteqt import write_batch

summary = write_batch(
    [
        {
            "qoi": "frequency",
            "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",
            "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: 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".

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.3.tar.gz (14.0 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.3-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deteqt-0.1.3.tar.gz
  • Upload date:
  • Size: 14.0 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.3.tar.gz
Algorithm Hash digest
SHA256 14c282574b6b70c95643e089c73afb3dbc728de648227d233d52cbae820f69d7
MD5 cbd1358f11d3aae9335d2cdda0c0929d
BLAKE2b-256 7623e951106493be175b9616a689e2aaea9c6976cc2bb463e854c8a4f2569340

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deteqt-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 20.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 698996616f4b57fd170a19967b1a92907a784ecbac3ab7b586072be613d6a1af
MD5 ae84f192f0251993d58c35423f85e319
BLAKE2b-256 264debeae5db8967e097bb8eba4cf1e362d857a4086736945d2be9b421137039

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