logqbit 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of logqbit might be problematic. Click here for more details.

logqbit-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,182 @@
1
+ Metadata-Version: 2.3
2
+ Name: logqbit
3
+ Version: 0.2.0
4
+ Summary: Simple data logger and live plotter for lab-scale experiments.
5
+ Requires-Dist: labcodes>=1.0.4
6
+ Requires-Dist: numpy>=2.3.3
7
+ Requires-Dist: pandas>=2.3.3
8
+ Requires-Dist: pyarrow>=21.0.0
9
+ Requires-Dist: pyqtgraph>=0.13.7
10
+ Requires-Dist: pyside6>=6.9.3
11
+ Requires-Dist: ruamel-yaml>=0.18.15
12
+ Requires-Dist: tqdm>=4.67.1
13
+ Requires-Dist: pylabrad>=0.98.3 ; extra == 'labrad'
14
+ Requires-Python: >=3.13
15
+ Project-URL: Homepage, https://github.com/Qiujv/logqbit
16
+ Provides-Extra: labrad
17
+ Description-Content-Type: text/markdown
18
+
19
+ # LogQbit
20
+
21
+ *LogQbit* 是一个轻量且可扩展的实验数据记录工具包。
22
+ 它最初用于记录 量子比特(qubit)实验测量数据,但凭借灵活的数据格式和实时可视化功能,同样适用于 任意中小规模(≤MB级)实验数据 的采集与管理。
23
+
24
+ *LogQbit* is a lightweight and extensible data logging toolkit for lab-scale experiments.
25
+ It was originally developed for recording quantum qubit measurement data,
26
+ but its flexible format and real-time visualization tools make it suitable for any small to medium (≤MB-level) experimental dataset.
27
+
28
+ 通过使用 `logqbit`,你可以:
29
+
30
+ - 以最少的样板代码记录结构化实验数据;
31
+
32
+ - 使用集成的实时绘图工具可视化数据流;
33
+
34
+ - 通过交互式日志浏览器查看与分析记录的数据。
35
+
36
+ With `logqbit`, you can:
37
+
38
+ - Record structured experimental data with minimal boilerplate.
39
+
40
+ - Visualize data streams in real time with an integrated live plotter.
41
+
42
+ - Browse and analyze logged results through an interactive log browser.
43
+
44
+ 无论是量子比特读出、参数扫描,还是传感器输出记录,
45
+ `logqbit` 都能为你提供一个简洁而可靠的实验数据采集与回溯工作流。
46
+
47
+ Whether you are monitoring qubit readouts, scanning a parameter sweep, or simply logging sensor outputs,
48
+ `logqbit` provides a simple and robust workflow for capturing and revisiting your experimental data.
49
+
50
+ ## 安装 Installation
51
+
52
+ 从 PyPI 安装 / Install from PyPI:
53
+
54
+ ```bash
55
+ pip install logqbit
56
+ ```
57
+
58
+ ## 命令行工具 Command-Line Tools
59
+
60
+ 安装后,以下命令可用:
61
+
62
+ After installation, the following commands are available:
63
+
64
+ - `logqbit-browser [directory]` - 启动交互式日志浏览器 GUI / Launch the interactive log browser GUI
65
+ - `logqbit-live-plotter` - 启动实时绘图窗口 / Launch the live plotting window
66
+ - `logqbit browser-demo` - 创建示例数据并启动浏览器 / Create example data and launch browser
67
+ - `logqbit copy-template <name>` - 复制迁移/工具模板到工作目录 / Copy migration/utility templates to your working directory
68
+ - `logqbit shortcuts` - 在桌面创建带自定义图标的快捷方式 / Create desktop shortcuts with custom icons
69
+
70
+ ### 快速体验 Quick Demo
71
+
72
+ 想快速体验 logqbit browser 的功能?运行以下命令:
73
+
74
+ Want to quickly experience logqbit browser? Run:
75
+
76
+ ```bash
77
+ logqbit browser-demo
78
+ ```
79
+
80
+ 这将创建示例数据并自动启动浏览器:
81
+
82
+ This will create example data and automatically launch the browser:
83
+
84
+ - `logqbit_example/` - 包含 3 个示例日志文件夹 / Contains 3 example log folders
85
+ - **示例 0** - 线性关系:`y = 2x + 1` 和 `z = x²` / Linear relationship: `y = 2x + 1` and `z = x²`
86
+ - **示例 1** - 带噪声的正弦信号 / Noisy sinusoidal signal
87
+ - **示例 2** - 2D 参数扫描(共振模拟)/ 2D parameter scan (resonance simulation)
88
+
89
+ 浏览器将自动打开并显示示例数据。
90
+
91
+ The browser will automatically open and display the example data.
92
+
93
+ ### 从 LabRAD 迁移数据 Data Migration from LabRAD
94
+
95
+ 如果你有 LabRAD 格式的现有数据,可以轻松迁移:
96
+
97
+ If you have existing data in LabRAD format, you can easily migrate it:
98
+
99
+ ```bash
100
+ # 复制迁移模板 / Copy the migration template
101
+ logqbit copy-template move_from_labrad
102
+
103
+ # 编辑 move_from_labrad.py 设置路径 / Edit move_from_labrad.py to set your paths
104
+ # 然后运行 / Then run it
105
+ python move_from_labrad.py
106
+ ```
107
+
108
+ 详细说明请参阅 [迁移指南](docs/migration_guide.md)。
109
+
110
+ See [Migration Guide](docs/migration_guide.md) for detailed instructions.
111
+
112
+ ### 创建桌面快捷方式 Create Desktop Shortcuts
113
+
114
+ 在桌面创建 LogQbit Browser 和 Live Plotter 的快捷方式(带自定义图标):
115
+
116
+ Create desktop shortcuts for LogQbit Browser and Live Plotter with custom icons:
117
+
118
+ ```bash
119
+ # 在桌面创建快捷方式 / Create shortcuts on desktop
120
+ logqbit shortcuts
121
+
122
+ # 在指定目录创建快捷方式 / Create shortcuts in a specific directory
123
+ logqbit shortcuts -o "C:\MyShortcuts"
124
+ ```
125
+
126
+ 这将创建以下快捷方式:
127
+
128
+ This will create the following shortcuts:
129
+
130
+ - **LogQbit Browser.lnk** - 日志浏览器快捷方式 / Log browser shortcut
131
+ - **LogQbit Live Plotter.lnk** - 实时绘图工具快捷方式 / Live plotter shortcut
132
+
133
+ 每个快捷方式都配有对应的自定义图标。
134
+
135
+ Each shortcut comes with its corresponding custom icon.
136
+
137
+ ## 文档 Documentation
138
+
139
+ - [首页 index](docs/index.md)
140
+ - [迁移指南 Migration Guide](docs/migration_guide.md) - 从 LabRAD 迁移数据 / Migrate data from LabRAD format
141
+
142
+ ## 快速开始 Quick Start
143
+
144
+ ### 基本用法 Basic Usage
145
+
146
+ ```python
147
+ from pathlib import Path
148
+ from logqbit.logfolder import LogFolder
149
+
150
+ # 创建项目文件夹 / Create project folder
151
+ project_folder = Path('test')
152
+ project_folder.mkdir(exist_ok=True)
153
+
154
+ # 创建新的日志文件夹 / Create a new log folder
155
+ lf = LogFolder.new(project_folder)
156
+
157
+ # 添加数据行 / Add data rows
158
+ lf.add_row(x=1.5, y=2.0)
159
+ lf.add_row(x=233, y=[1, 3, 5])
160
+
161
+ # 访问数据 / Access data
162
+ print(lf.df)
163
+
164
+ # [可选] 设置元数据 / [Optional] Set metadata
165
+ lf.meta.title = "My Experiment"
166
+ lf.meta.star = 1
167
+ lf.meta.plot_axes = ["x"]
168
+
169
+ # [可选] 添加常量配置 / [Optional] Add constant configuration
170
+ lf.const["temperature"] = "300 K"
171
+ lf.const["description"] = "Test measurement"
172
+ ```
173
+
174
+ ### API 说明 API Reference
175
+
176
+ **LogFolder 主要属性和方法 Main Attributes and Methods:**
177
+
178
+ - `lf.df` - 获取完整数据帧 / Get full dataframe
179
+ - `lf.meta` - 元数据(标题、星标、标签等)/ Metadata (title, star, tags, etc.)
180
+ - `lf.const` - 常量配置(实验参数等)/ Constant configuration (experiment parameters, etc.)
181
+ - `lf.add_row(**kwargs)` - 添加数据行 / Add data row
182
+ - `lf.flush()` - 强制保存数据 / Force save data
@@ -0,0 +1,164 @@
1
+ # LogQbit
2
+
3
+ *LogQbit* 是一个轻量且可扩展的实验数据记录工具包。
4
+ 它最初用于记录 量子比特(qubit)实验测量数据,但凭借灵活的数据格式和实时可视化功能,同样适用于 任意中小规模(≤MB级)实验数据 的采集与管理。
5
+
6
+ *LogQbit* is a lightweight and extensible data logging toolkit for lab-scale experiments.
7
+ It was originally developed for recording quantum qubit measurement data,
8
+ but its flexible format and real-time visualization tools make it suitable for any small to medium (≤MB-level) experimental dataset.
9
+
10
+ 通过使用 `logqbit`,你可以:
11
+
12
+ - 以最少的样板代码记录结构化实验数据;
13
+
14
+ - 使用集成的实时绘图工具可视化数据流;
15
+
16
+ - 通过交互式日志浏览器查看与分析记录的数据。
17
+
18
+ With `logqbit`, you can:
19
+
20
+ - Record structured experimental data with minimal boilerplate.
21
+
22
+ - Visualize data streams in real time with an integrated live plotter.
23
+
24
+ - Browse and analyze logged results through an interactive log browser.
25
+
26
+ 无论是量子比特读出、参数扫描,还是传感器输出记录,
27
+ `logqbit` 都能为你提供一个简洁而可靠的实验数据采集与回溯工作流。
28
+
29
+ Whether you are monitoring qubit readouts, scanning a parameter sweep, or simply logging sensor outputs,
30
+ `logqbit` provides a simple and robust workflow for capturing and revisiting your experimental data.
31
+
32
+ ## 安装 Installation
33
+
34
+ 从 PyPI 安装 / Install from PyPI:
35
+
36
+ ```bash
37
+ pip install logqbit
38
+ ```
39
+
40
+ ## 命令行工具 Command-Line Tools
41
+
42
+ 安装后,以下命令可用:
43
+
44
+ After installation, the following commands are available:
45
+
46
+ - `logqbit-browser [directory]` - 启动交互式日志浏览器 GUI / Launch the interactive log browser GUI
47
+ - `logqbit-live-plotter` - 启动实时绘图窗口 / Launch the live plotting window
48
+ - `logqbit browser-demo` - 创建示例数据并启动浏览器 / Create example data and launch browser
49
+ - `logqbit copy-template <name>` - 复制迁移/工具模板到工作目录 / Copy migration/utility templates to your working directory
50
+ - `logqbit shortcuts` - 在桌面创建带自定义图标的快捷方式 / Create desktop shortcuts with custom icons
51
+
52
+ ### 快速体验 Quick Demo
53
+
54
+ 想快速体验 logqbit browser 的功能?运行以下命令:
55
+
56
+ Want to quickly experience logqbit browser? Run:
57
+
58
+ ```bash
59
+ logqbit browser-demo
60
+ ```
61
+
62
+ 这将创建示例数据并自动启动浏览器:
63
+
64
+ This will create example data and automatically launch the browser:
65
+
66
+ - `logqbit_example/` - 包含 3 个示例日志文件夹 / Contains 3 example log folders
67
+ - **示例 0** - 线性关系:`y = 2x + 1` 和 `z = x²` / Linear relationship: `y = 2x + 1` and `z = x²`
68
+ - **示例 1** - 带噪声的正弦信号 / Noisy sinusoidal signal
69
+ - **示例 2** - 2D 参数扫描(共振模拟)/ 2D parameter scan (resonance simulation)
70
+
71
+ 浏览器将自动打开并显示示例数据。
72
+
73
+ The browser will automatically open and display the example data.
74
+
75
+ ### 从 LabRAD 迁移数据 Data Migration from LabRAD
76
+
77
+ 如果你有 LabRAD 格式的现有数据,可以轻松迁移:
78
+
79
+ If you have existing data in LabRAD format, you can easily migrate it:
80
+
81
+ ```bash
82
+ # 复制迁移模板 / Copy the migration template
83
+ logqbit copy-template move_from_labrad
84
+
85
+ # 编辑 move_from_labrad.py 设置路径 / Edit move_from_labrad.py to set your paths
86
+ # 然后运行 / Then run it
87
+ python move_from_labrad.py
88
+ ```
89
+
90
+ 详细说明请参阅 [迁移指南](docs/migration_guide.md)。
91
+
92
+ See [Migration Guide](docs/migration_guide.md) for detailed instructions.
93
+
94
+ ### 创建桌面快捷方式 Create Desktop Shortcuts
95
+
96
+ 在桌面创建 LogQbit Browser 和 Live Plotter 的快捷方式(带自定义图标):
97
+
98
+ Create desktop shortcuts for LogQbit Browser and Live Plotter with custom icons:
99
+
100
+ ```bash
101
+ # 在桌面创建快捷方式 / Create shortcuts on desktop
102
+ logqbit shortcuts
103
+
104
+ # 在指定目录创建快捷方式 / Create shortcuts in a specific directory
105
+ logqbit shortcuts -o "C:\MyShortcuts"
106
+ ```
107
+
108
+ 这将创建以下快捷方式:
109
+
110
+ This will create the following shortcuts:
111
+
112
+ - **LogQbit Browser.lnk** - 日志浏览器快捷方式 / Log browser shortcut
113
+ - **LogQbit Live Plotter.lnk** - 实时绘图工具快捷方式 / Live plotter shortcut
114
+
115
+ 每个快捷方式都配有对应的自定义图标。
116
+
117
+ Each shortcut comes with its corresponding custom icon.
118
+
119
+ ## 文档 Documentation
120
+
121
+ - [首页 index](docs/index.md)
122
+ - [迁移指南 Migration Guide](docs/migration_guide.md) - 从 LabRAD 迁移数据 / Migrate data from LabRAD format
123
+
124
+ ## 快速开始 Quick Start
125
+
126
+ ### 基本用法 Basic Usage
127
+
128
+ ```python
129
+ from pathlib import Path
130
+ from logqbit.logfolder import LogFolder
131
+
132
+ # 创建项目文件夹 / Create project folder
133
+ project_folder = Path('test')
134
+ project_folder.mkdir(exist_ok=True)
135
+
136
+ # 创建新的日志文件夹 / Create a new log folder
137
+ lf = LogFolder.new(project_folder)
138
+
139
+ # 添加数据行 / Add data rows
140
+ lf.add_row(x=1.5, y=2.0)
141
+ lf.add_row(x=233, y=[1, 3, 5])
142
+
143
+ # 访问数据 / Access data
144
+ print(lf.df)
145
+
146
+ # [可选] 设置元数据 / [Optional] Set metadata
147
+ lf.meta.title = "My Experiment"
148
+ lf.meta.star = 1
149
+ lf.meta.plot_axes = ["x"]
150
+
151
+ # [可选] 添加常量配置 / [Optional] Add constant configuration
152
+ lf.const["temperature"] = "300 K"
153
+ lf.const["description"] = "Test measurement"
154
+ ```
155
+
156
+ ### API 说明 API Reference
157
+
158
+ **LogFolder 主要属性和方法 Main Attributes and Methods:**
159
+
160
+ - `lf.df` - 获取完整数据帧 / Get full dataframe
161
+ - `lf.meta` - 元数据(标题、星标、标签等)/ Metadata (title, star, tags, etc.)
162
+ - `lf.const` - 常量配置(实验参数等)/ Constant configuration (experiment parameters, etc.)
163
+ - `lf.add_row(**kwargs)` - 添加数据行 / Add data row
164
+ - `lf.flush()` - 强制保存数据 / Force save data
@@ -0,0 +1,44 @@
1
+ [project]
2
+ name = "logqbit"
3
+ version = "0.2.0"
4
+ description = "Simple data logger and live plotter for lab-scale experiments."
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ dependencies = [
8
+ "labcodes>=1.0.4",
9
+ "numpy>=2.3.3",
10
+ "pandas>=2.3.3",
11
+ "pyarrow>=21.0.0",
12
+ "pyqtgraph>=0.13.7",
13
+ "pyside6>=6.9.3",
14
+ "ruamel-yaml>=0.18.15",
15
+ "tqdm>=4.67.1",
16
+ ]
17
+
18
+ [project.urls]
19
+ Homepage = "https://github.com/Qiujv/logqbit"
20
+
21
+ [project.scripts]
22
+ logqbit = "logqbit.cli:main"
23
+
24
+ [project.gui-scripts]
25
+ logqbit-live-plotter = "logqbit.live_plotter:main"
26
+ logqbit-browser = "logqbit.browser:main"
27
+
28
+ [project.optional-dependencies]
29
+ labrad = [
30
+ "pylabrad>=0.98.3",
31
+ ]
32
+
33
+ [build-system]
34
+ requires = ["uv_build>=0.8.0,<0.9.0"]
35
+ build-backend = "uv_build"
36
+
37
+ [dependency-groups]
38
+ dev = [
39
+ "ipykernel>=6.30.1",
40
+ "ipywidgets>=8.1.7",
41
+ "matplotlib>=3.10.7",
42
+ "pytest>=8.4.2",
43
+ "pytest-cov>=7.0.0",
44
+ ]
File without changes
@@ -0,0 +1,40 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
2
+ <defs>
3
+ <style>
4
+ .cls-1 {
5
+ fill: #ffca4f;
6
+ }
7
+
8
+ .cls-2 {
9
+ fill: #ffd97d;
10
+ }
11
+
12
+ .cls-3 {
13
+ fill: #ffe9b1;
14
+ }
15
+
16
+ .cls-4 {
17
+ fill: #a56ad4;
18
+ }
19
+
20
+ .cls-5 {
21
+ fill: #fb9423;
22
+ }
23
+
24
+ .cls-6 {
25
+ fill: #6cb64e;
26
+ }
27
+ </style>
28
+ </defs>
29
+ <rect class="cls-1" x="90.13" y="101.9" width="324" height="187.2" rx="25" />
30
+ <rect class="cls-2" x="72.13" y="166.65" width="360" height="187.2" rx="25" />
31
+ <rect class="cls-3" x="54.13" y="235.2" width="396" height="201.6" rx="25" />
32
+ <path class="cls-4"
33
+ d="M108.7,266.3a27.54,27.54,0,0,1-27.5-27.5V226.2a22.52,22.52,0,0,1,22.5-22.5h89.6a22.52,22.52,0,0,1,22.5,22.5v12.6a27.54,27.54,0,0,1-27.5,27.5Z" />
34
+ <path class="cls-3"
35
+ d="M193.3,206.2a20,20,0,0,1,20,20v12.6a25,25,0,0,1-25,25H108.7a25,25,0,0,1-25-25V226.2a20,20,0,0,1,20-20h89.6m0-5H103.7a25,25,0,0,0-25,25v12.6a30,30,0,0,0,30,30h79.6a30,30,0,0,0,30-30V226.2a25,25,0,0,0-25-25Z" />
36
+ <rect class="cls-5" x="167.45" y="136.7" width="134.6" height="62.6" rx="27.5" />
37
+ <path class="cls-2"
38
+ d="M274.55,139.2a25,25,0,0,1,25,25v7.6a25,25,0,0,1-25,25H195a25,25,0,0,1-25-25v-7.6a25,25,0,0,1,25-25h79.6m0-5H195a30,30,0,0,0-30,30v7.6a30,30,0,0,0,30,30h79.6a30,30,0,0,0,30-30v-7.6a30,30,0,0,0-30-30Z" />
39
+ <rect class="cls-6" x="256.2" y="73.2" width="129.6" height="57.6" rx="25" />
40
+ </svg>
@@ -0,0 +1,15 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
2
+ <defs>
3
+ <marker id="arrow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="3" markerHeight="3"
4
+ orient="auto-start-reverse">
5
+ <path d="M 0 0 L 10 5 L 0 10 z" fill="#2DB84D" />
6
+ </marker>
7
+ </defs>
8
+ <g stroke="#2DB84D" stroke-width="28" stroke-linecap="round" stroke-linejoin="round" fill="none">
9
+ <path d="M 96 432 L 96 96" />
10
+ <path d="M 96 432 L 416 432" />
11
+ </g>
12
+ <polyline points="136,360 220,220 300,300 396,168" fill="none" stroke="#2DB84D" stroke-width="32"
13
+ stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)" />
14
+ <circle cx="300" cy="360" r="20" fill="#2DB84D" />
15
+ </svg>