Core-tools backend for eTiKeT sync agent
Project description
eTiKeT Sync Agent - Core Tools Backend
Backend for synchronizing core_tools datasets with the eTiKeT platform. This backend reads measurements from core_tools PostgreSQL databases and syncs them to the cloud.
Installation
This backend depends on core_tools and pulse_lib, which are hosted on a private TU Delft GitLab repository. You must have these packages cloned locally and install them from their folder locations.
from etiket_sdk.sync import Backends
# 1. Install dependencies from local folders
Backends.install_from_local("/path/to/pulse_lib")
Backends.install_from_local("/path/to/core_tools")
# 2. Install the backend
Backends.install_from_pypi("etiket-sync-agent-core-tools")
The package is automatically discovered by etiket_sync_agent through the entry-point system. Once installed, you can verify with:
print(Backends.list())
backend = Backends.get("etiket_sync_agent_core_tools")
print(backend)
What Gets Synchronized
When a core_tools measurement is synced, the following data is extracted and uploaded:
| core_tools Data | eTiKeT Field | Description |
|---|---|---|
exp_uuid |
alt_uid |
Unique identifier for the measurement |
name |
name |
Name of the dataset |
run_timestamp |
collected |
When the measurement was taken |
keywords |
keywords |
Keywords associated with the measurement |
sample_name |
attributes["sample"] |
Sample name for the measurement |
set_up |
attributes["set-up"] |
Experimental setup name |
| xarray dataset | HDF5 file | The actual measurement data |
Additional Metadata
The backend also extracts and synchronizes:
- Snapshot data: Instrument settings stored in the measurement snapshot
- Pulses data: AWG pulse sequences (if available in snapshot)
- Gates data: Gate voltages (if available in snapshot)
Configuration
The core_tools backend requires a CoreToolsConfigData configuration with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
dbname |
str |
Yes | Name of the PostgreSQL database |
user |
str |
Yes | Database username |
password |
str |
Yes | Database password |
host |
str |
No | Database host (default: localhost) |
port |
int |
No | Database port (default: 5432) |
Example Configuration
from etiket_sync_agent_core_tools import CoreToolsConfigData
config = CoreToolsConfigData(
dbname="my_experiments",
user="postgres",
password="secret",
host="localhost",
port=5432
)
Scope Mapping
Core_tools supports the concept of scope (or project in older versions) to organize measurements. When syncing, the backend maps core_tools scopes to eTiKeT scopes.
How Scope Mapping Works
- If scope exists in core_tools: The scope name is used as the
scopeIdentifier - If scope is
None: A generated identifier is used:CT_PROJECT_{project_name}
Assigning Scope Mappings
After datasets are discovered, the user must map the scopeIdentifier to an actual eTiKeT scope. There are two ways to do this:
- Auto-assignment: If the
scopeIdentifierexactly matches an existing eTiKeT scope name, use the auto-assign feature - Manual mapping: Use the etiket_sdk or the DataQruiser GUI to manually map identifiers to scopes
For more information, see the etiket_sdk documentation or use our GUI application (DataQruiser).
Features
- Direct integration with core_tools PostgreSQL databases
- Automatic metadata extraction from snapshots
- Live sync support for running measurements
- Pulse sequence extraction from AWG instruments
- Gate voltage extraction in the metadata of the hdf5 file.
Live Measurement Sync
The core_tools backend supports live synchronization of in-progress measurements. When a measurement is detected as "running", the sync agent:
- Creates the dataset entry in eTiKeT
- Streams data points as they are written to the database
- Uploads pulse metadata (if available)
- Marks the dataset as complete when the measurement finishes
Timeout Handling
If no new data is written for 30 minutes, the live sync assumes the measurement has stalled and raises a timeout error.
Requirements
- Python >= 3.10
- core_tools (private package from TU Delft GitLab)
- PostgreSQL database with core_tools schema
License
Copyright © 2025 QHarbor. All Rights Reserved. See LICENCE for details.
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 Distributions
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 etiket_sync_agent_core_tools-0.3.0b1-py3-none-any.whl.
File metadata
- Download URL: etiket_sync_agent_core_tools-0.3.0b1-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1de32fe4230c5e035ce563ccf9c960fdd30994e8a998f6ab05172730b2191d60
|
|
| MD5 |
e1d76949000d86f89cee40026d6bc41e
|
|
| BLAKE2b-256 |
9867fc68c5d998478e4e149d152c978e09e3a532c055152cd0b787d1d6fd9f36
|