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
Quick setup
If uv is not installed yet on your machine, install it first:
Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Installing deteqt package
# Create a virtual environment:
uv venv deteqt-env --python 313
# Activate virtual environment:
source deteqt-env/bin/activate # Linux/macOS
# Or if you are on Windows:
# .\deteqt-env\Scripts\activate
# Install local editable package with all tool groups:
uv pip install -e . --group all
# Verify installation and version:
uv run --active python -c "import deteqt; print(deteqt.__version__)"
Writing and querying data
To write and query data, first edit settings.toml at the project root
with values provided by your administrator:
url = "your-url-here"
org = "your-org-here"
bucket = "your-bucket-here"
token = "your-token-here"
Write one point to InfluxDB
from deteqt import write_point
write_point(qoi="frequency", value=1.01, uncertainty=0.01)
Write a batch of points
from deteqt import write_batch
my_data = write_batch(
[
{"qoi": "frequency", "value": 1.01},
{"qoi": "phase", "value": 0.12, "uncertainty": 0.01},
],
)
Query rows
from deteqt import build_query, query_rows
query = build_query(
bucket="your-bucket-here",
measurement="frequency",
start="-1h",
)
rows = query_rows(
measurement="frequency",
start="-1h",
)
Ingest data from a folder recursively, process it, and write to InfluxDB
from deteqt import ingest_data, process_data, write_batch
raw_data = ingest_data(
folder="quantify-data",
file_name="quantities_of_interest.json", # or "quantities.csv"
)
processed_data = process_data(
raw_data,
keep_keys=("qoi", "value", "uncertainty", "run_id", "cycle_id"),
)
summary = write_batch(processed_data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deteqt-0.1.1.tar.gz.
File metadata
- Download URL: deteqt-0.1.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7c37588a3d3b66d63fdccc0abbcb01b98ca86a174f224eb3277dd2a3657f422
|
|
| MD5 |
cd54e6a6a5a7d7b6d5fd55b8a2e19580
|
|
| BLAKE2b-256 |
61288365c0538bbc0d2ce7b6ce5b23e7553216ffe292fd0d1fa69550558a1d99
|
File details
Details for the file deteqt-0.1.1-py3-none-any.whl.
File metadata
- Download URL: deteqt-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72181d47e0d0538a6a765ec854286bfd3c972f48e1b446cf349a0b903c1df09a
|
|
| MD5 |
7a15366b4a851635d398540ebc29505a
|
|
| BLAKE2b-256 |
994b562d4538e3bcab0292b4de67f4234d87637d4e6d2771154ebd1f7aba4267
|