QuLab 2.10.10__cp313-cp313-macosx_10_13_universal2.whl
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.
- qulab/__init__.py +33 -0
- qulab/__main__.py +4 -0
- qulab/cli/__init__.py +0 -0
- qulab/cli/commands.py +30 -0
- qulab/cli/config.py +170 -0
- qulab/cli/decorators.py +28 -0
- qulab/dicttree.py +523 -0
- qulab/executor/__init__.py +5 -0
- qulab/executor/analyze.py +188 -0
- qulab/executor/cli.py +434 -0
- qulab/executor/load.py +563 -0
- qulab/executor/registry.py +185 -0
- qulab/executor/schedule.py +543 -0
- qulab/executor/storage.py +615 -0
- qulab/executor/template.py +259 -0
- qulab/executor/utils.py +194 -0
- qulab/expression.py +827 -0
- qulab/fun.cpython-313-darwin.so +0 -0
- qulab/monitor/__init__.py +1 -0
- qulab/monitor/__main__.py +8 -0
- qulab/monitor/config.py +41 -0
- qulab/monitor/dataset.py +77 -0
- qulab/monitor/event_queue.py +54 -0
- qulab/monitor/mainwindow.py +234 -0
- qulab/monitor/monitor.py +115 -0
- qulab/monitor/ploter.py +123 -0
- qulab/monitor/qt_compat.py +16 -0
- qulab/monitor/toolbar.py +265 -0
- qulab/scan/__init__.py +2 -0
- qulab/scan/curd.py +221 -0
- qulab/scan/models.py +554 -0
- qulab/scan/optimize.py +76 -0
- qulab/scan/query.py +387 -0
- qulab/scan/record.py +603 -0
- qulab/scan/scan.py +1166 -0
- qulab/scan/server.py +450 -0
- qulab/scan/space.py +213 -0
- qulab/scan/utils.py +234 -0
- qulab/storage/__init__.py +0 -0
- qulab/storage/__main__.py +51 -0
- qulab/storage/backend/__init__.py +0 -0
- qulab/storage/backend/redis.py +204 -0
- qulab/storage/base_dataset.py +352 -0
- qulab/storage/chunk.py +60 -0
- qulab/storage/dataset.py +127 -0
- qulab/storage/file.py +273 -0
- qulab/storage/models/__init__.py +22 -0
- qulab/storage/models/base.py +4 -0
- qulab/storage/models/config.py +28 -0
- qulab/storage/models/file.py +89 -0
- qulab/storage/models/ipy.py +58 -0
- qulab/storage/models/models.py +88 -0
- qulab/storage/models/record.py +161 -0
- qulab/storage/models/report.py +22 -0
- qulab/storage/models/tag.py +93 -0
- qulab/storage/storage.py +95 -0
- qulab/sys/__init__.py +2 -0
- qulab/sys/chat.py +688 -0
- qulab/sys/device/__init__.py +3 -0
- qulab/sys/device/basedevice.py +255 -0
- qulab/sys/device/loader.py +86 -0
- qulab/sys/device/utils.py +79 -0
- qulab/sys/drivers/FakeInstrument.py +68 -0
- qulab/sys/drivers/__init__.py +0 -0
- qulab/sys/ipy_events.py +125 -0
- qulab/sys/net/__init__.py +0 -0
- qulab/sys/net/bencoder.py +205 -0
- qulab/sys/net/cli.py +169 -0
- qulab/sys/net/dhcp.py +543 -0
- qulab/sys/net/dhcpd.py +176 -0
- qulab/sys/net/kad.py +1142 -0
- qulab/sys/net/kcp.py +192 -0
- qulab/sys/net/nginx.py +194 -0
- qulab/sys/progress.py +190 -0
- qulab/sys/rpc/__init__.py +0 -0
- qulab/sys/rpc/client.py +0 -0
- qulab/sys/rpc/exceptions.py +96 -0
- qulab/sys/rpc/msgpack.py +1052 -0
- qulab/sys/rpc/msgpack.pyi +41 -0
- qulab/sys/rpc/router.py +35 -0
- qulab/sys/rpc/rpc.py +412 -0
- qulab/sys/rpc/serialize.py +139 -0
- qulab/sys/rpc/server.py +29 -0
- qulab/sys/rpc/socket.py +29 -0
- qulab/sys/rpc/utils.py +25 -0
- qulab/sys/rpc/worker.py +0 -0
- qulab/sys/rpc/zmq_socket.py +227 -0
- qulab/tools/__init__.py +0 -0
- qulab/tools/connection_helper.py +39 -0
- qulab/typing.py +2 -0
- qulab/utils.py +95 -0
- qulab/version.py +1 -0
- qulab/visualization/__init__.py +188 -0
- qulab/visualization/__main__.py +71 -0
- qulab/visualization/_autoplot.py +464 -0
- qulab/visualization/plot_circ.py +319 -0
- qulab/visualization/plot_layout.py +408 -0
- qulab/visualization/plot_seq.py +242 -0
- qulab/visualization/qdat.py +152 -0
- qulab/visualization/rot3d.py +23 -0
- qulab/visualization/widgets.py +86 -0
- qulab-2.10.10.dist-info/METADATA +110 -0
- qulab-2.10.10.dist-info/RECORD +107 -0
- qulab-2.10.10.dist-info/WHEEL +5 -0
- qulab-2.10.10.dist-info/entry_points.txt +2 -0
- qulab-2.10.10.dist-info/licenses/LICENSE +21 -0
- qulab-2.10.10.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This module provides the visualization of the qdat file.
|
|
3
|
+
"""
|
|
4
|
+
import logging
|
|
5
|
+
import math
|
|
6
|
+
import re
|
|
7
|
+
from functools import reduce
|
|
8
|
+
|
|
9
|
+
import matplotlib.pyplot as plt
|
|
10
|
+
import numpy as np
|
|
11
|
+
from matplotlib import cm
|
|
12
|
+
|
|
13
|
+
log = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def draw(record_dict, fig=None, transpose=True, remove=True):
|
|
17
|
+
"""Draw a 2D or 3D plot from a record dict.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
record_dict (dict): The record dict.
|
|
21
|
+
fig (matplotlib.figure.Figure): The figure to draw on.
|
|
22
|
+
transpose (bool): Whether to transpose the data.
|
|
23
|
+
"""
|
|
24
|
+
dim = record_dict['info']['dim']
|
|
25
|
+
zshape = record_dict['info']['zshape']
|
|
26
|
+
zsize = reduce(lambda a, b: a * b, zshape, 1)
|
|
27
|
+
|
|
28
|
+
axis_label = np.asarray(record_dict['info'].get('axis_label',
|
|
29
|
+
[])).flatten()
|
|
30
|
+
z_label = np.asarray(record_dict['info'].get('z_label', [])).flatten()
|
|
31
|
+
axis_unit = np.asarray(record_dict['info'].get('axis_unit', [])).flatten()
|
|
32
|
+
z_unit = np.asarray(record_dict['info'].get('z_unit', [])).flatten()
|
|
33
|
+
|
|
34
|
+
fig = plt.figure() if fig is None else fig
|
|
35
|
+
if zsize < 4:
|
|
36
|
+
plot_shape = (1, zsize)
|
|
37
|
+
else:
|
|
38
|
+
n = int(np.sqrt(zsize))
|
|
39
|
+
plot_shape = (math.ceil(zsize / n), n)
|
|
40
|
+
if dim < 3 and zsize < 100:
|
|
41
|
+
figsize = plot_shape[1] * 8, plot_shape[0] * 6
|
|
42
|
+
fig.set_size_inches(*figsize)
|
|
43
|
+
axes = fig.subplots(*plot_shape)
|
|
44
|
+
axes = np.array(axes).flatten()
|
|
45
|
+
else:
|
|
46
|
+
axes = []
|
|
47
|
+
|
|
48
|
+
cb_list = []
|
|
49
|
+
if dim == 1 and zsize < 101:
|
|
50
|
+
for i in range(zsize):
|
|
51
|
+
title = record_dict[
|
|
52
|
+
'name'] + f' {i}' if zsize > 1 else record_dict['name']
|
|
53
|
+
try:
|
|
54
|
+
xlabel = axis_label[0]
|
|
55
|
+
ylabel = z_label[0] if len(z_label) == 1 else z_label[i]
|
|
56
|
+
except:
|
|
57
|
+
xlabel, ylabel = 'X', 'Y'
|
|
58
|
+
try:
|
|
59
|
+
x_unit = axis_unit[0]
|
|
60
|
+
y_unit = z_unit[0] if len(z_unit) == 1 else z_unit[i]
|
|
61
|
+
except:
|
|
62
|
+
x_unit, y_unit = 'a.u.', 'a.u.'
|
|
63
|
+
axes[i].set_title(title)
|
|
64
|
+
axes[i].set_xlabel(f'{xlabel} ({x_unit})')
|
|
65
|
+
axes[i].set_ylabel(f'{ylabel} ({y_unit})')
|
|
66
|
+
elif dim == 2 and zsize < 101:
|
|
67
|
+
for i in range(zsize):
|
|
68
|
+
smp = cm.ScalarMappable(norm=None, cmap=None)
|
|
69
|
+
cb = fig.colorbar(smp, ax=axes[i]) # 默认色谱的colorbar
|
|
70
|
+
cb_list.append(cb)
|
|
71
|
+
try:
|
|
72
|
+
title = record_dict['name'] + \
|
|
73
|
+
f': {z_label[i]}' if zsize > 1 else record_dict['name']
|
|
74
|
+
except:
|
|
75
|
+
title = record_dict[
|
|
76
|
+
'name'] + f' {i}' if zsize > 1 else record_dict['name']
|
|
77
|
+
try:
|
|
78
|
+
xlabel, ylabel = axis_label[1], axis_label[0]
|
|
79
|
+
if transpose:
|
|
80
|
+
xlabel, ylabel = ylabel, xlabel
|
|
81
|
+
except:
|
|
82
|
+
xlabel, ylabel = 'X', 'Y'
|
|
83
|
+
try:
|
|
84
|
+
x_unit, y_unit = axis_unit[1], axis_unit[0]
|
|
85
|
+
if transpose:
|
|
86
|
+
x_unit, y_unit = y_unit, x_unit
|
|
87
|
+
except:
|
|
88
|
+
x_unit, y_unit = 'a.u.', 'a.u.'
|
|
89
|
+
axes[i].set_title(title)
|
|
90
|
+
axes[i].set_xlabel(f'{xlabel} ({x_unit})')
|
|
91
|
+
axes[i].set_ylabel(f'{ylabel} ({y_unit})')
|
|
92
|
+
else:
|
|
93
|
+
message1 = f'dim {dim} is too large (>2)! ' if dim > 2 else f'dim={dim}; '
|
|
94
|
+
message2 = f'zsize {zsize} is too large (>101)!' if zsize > 101 else f'zsize={zsize}'
|
|
95
|
+
log.warning('PASS: ' + message1 + message2)
|
|
96
|
+
#########################################################################################
|
|
97
|
+
try:
|
|
98
|
+
tags = [
|
|
99
|
+
tag.strip(r'\*')
|
|
100
|
+
for tag in record_dict['ParaSpace'].get('tags', [])
|
|
101
|
+
if re.match(r'\*', tag)
|
|
102
|
+
]
|
|
103
|
+
tag_text = ','.join(tags)
|
|
104
|
+
if tag_text:
|
|
105
|
+
axes[0].text(-0.1,
|
|
106
|
+
1.1,
|
|
107
|
+
'TAG: ' + tag_text,
|
|
108
|
+
horizontalalignment='left',
|
|
109
|
+
verticalalignment='bottom',
|
|
110
|
+
transform=axes[0].transAxes) # fig.transFigure)#
|
|
111
|
+
except:
|
|
112
|
+
pass
|
|
113
|
+
#########################################################################################
|
|
114
|
+
fig.tight_layout()
|
|
115
|
+
|
|
116
|
+
dim = record_dict['info']['dim']
|
|
117
|
+
zshape = record_dict['info']['zshape']
|
|
118
|
+
datashape = record_dict['info']['datashape']
|
|
119
|
+
zsize = reduce(lambda a, b: a * b, zshape, 1)
|
|
120
|
+
datashape_r = (*datashape[:dim], zsize)
|
|
121
|
+
|
|
122
|
+
if dim == 1 and zsize < 101:
|
|
123
|
+
x, z = record_dict['data']
|
|
124
|
+
z = z.reshape(datashape_r)
|
|
125
|
+
z = np.abs(z) if np.any(np.iscomplex(z)) else z.real
|
|
126
|
+
for i in range(zsize):
|
|
127
|
+
_ = [a.remove() for a in axes[i].get_lines()] if remove else []
|
|
128
|
+
axes[i].plot(x, z[:, i], 'C0')
|
|
129
|
+
axes[i].plot(x, z[:, i], 'C0.')
|
|
130
|
+
elif dim == 2 and zsize < 101:
|
|
131
|
+
x, y, z = record_dict['data']
|
|
132
|
+
x_step, y_step = x[1] - x[0], y[1] - y[0]
|
|
133
|
+
if transpose:
|
|
134
|
+
x, y = y, x
|
|
135
|
+
x_step, y_step = y_step, x_step
|
|
136
|
+
z = z.reshape(datashape_r)
|
|
137
|
+
z = np.abs(z) if np.any(np.iscomplex(z)) else z.real
|
|
138
|
+
for i in range(zsize):
|
|
139
|
+
_z = z[:, :, i]
|
|
140
|
+
_ = [a.remove() for a in axes[i].get_images()] if remove else []
|
|
141
|
+
if transpose:
|
|
142
|
+
_z = _z.T
|
|
143
|
+
im = axes[i].imshow(_z,
|
|
144
|
+
extent=(y[0] - y_step / 2, y[-1] + y_step / 2,
|
|
145
|
+
x[0] - x_step / 2, x[-1] + x_step / 2),
|
|
146
|
+
origin='lower',
|
|
147
|
+
aspect='auto')
|
|
148
|
+
cb_list[i].update_normal(im) # 更新对应的colorbar
|
|
149
|
+
else:
|
|
150
|
+
pass
|
|
151
|
+
|
|
152
|
+
return fig, axes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from scipy.linalg import expm
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def _rot(theta, v):
|
|
6
|
+
x, y, z = np.asarray(v) / np.sqrt(np.sum(np.asarray(v)**2))
|
|
7
|
+
c, s = np.cos(theta), np.sin(theta)
|
|
8
|
+
|
|
9
|
+
return np.array([[
|
|
10
|
+
c + (1 - c) * x**2, (1 - c) * x * y - s * z, (1 - c) * x * z + s * y
|
|
11
|
+
], [(1 - c) * x * y + s * z, c + (1 - c) * y**2, (1 - c) * y * z - s * x],
|
|
12
|
+
[(1 - c) * x * z - s * y, (1 - c) * y * z + s * x,
|
|
13
|
+
c + (1 - c) * z**2]])
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def rot_round(x, y, z, v=[0, 0, 1], theta=0, c=[0, 0, 0]):
|
|
17
|
+
ret = (np.array([x, y, z]).T - np.array(c)) @ _rot(theta, v) + np.array(c)
|
|
18
|
+
return ret.T
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def projection(x, y, z, y0=1):
|
|
22
|
+
d = np.sqrt(x**2 + y**2 + z**2)
|
|
23
|
+
return x * y0 / y, z * y0 / y, d
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import matplotlib.pyplot as plt
|
|
2
|
+
import numpy as np
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class DataPicker():
|
|
6
|
+
|
|
7
|
+
def __init__(self, ax=None):
|
|
8
|
+
self.points_and_text = {}
|
|
9
|
+
self.points = None
|
|
10
|
+
self.hline = None
|
|
11
|
+
self.vline = None
|
|
12
|
+
self.text = None
|
|
13
|
+
if ax is None:
|
|
14
|
+
ax = plt.gca()
|
|
15
|
+
self.ax = ax
|
|
16
|
+
self.ax.figure.canvas.mpl_connect('button_press_event', self.on_click)
|
|
17
|
+
# self.ax.figure.canvas.mpl_connect('motion_notify_event', self.on_move)
|
|
18
|
+
self.ax.figure.canvas.mpl_connect('key_press_event', self.on_key_press)
|
|
19
|
+
self.mode = 'pick'
|
|
20
|
+
|
|
21
|
+
def on_key_press(self, event):
|
|
22
|
+
if event.key == 'a':
|
|
23
|
+
if self.mode != 'pick':
|
|
24
|
+
self.mode = 'pick'
|
|
25
|
+
else:
|
|
26
|
+
self.mode = 'default'
|
|
27
|
+
|
|
28
|
+
def on_move(self, event):
|
|
29
|
+
if event.inaxes is self.ax:
|
|
30
|
+
# self.hline = self.ax.axhline(y=np.nan, color='r', lw=1)
|
|
31
|
+
# self.vline = self.ax.axvline(x=np.nan, color='r', lw=1)
|
|
32
|
+
# self.text = self.ax.text(0, 0, '', verticalalignment='center')
|
|
33
|
+
self.hline.set_ydata(event.ydata)
|
|
34
|
+
self.vline.set_xdata(event.xdata)
|
|
35
|
+
self.text.set_position((event.xdata, event.ydata))
|
|
36
|
+
self.text.set_text(f'({event.xdata:.2f}, {event.ydata:.2f})')
|
|
37
|
+
self.ax.draw()
|
|
38
|
+
|
|
39
|
+
def on_click(self, event):
|
|
40
|
+
if self.mode != 'pick':
|
|
41
|
+
return
|
|
42
|
+
# 鼠标左键的button值为1
|
|
43
|
+
if event.button == 1 and event.inaxes is self.ax:
|
|
44
|
+
point = (event.xdata, event.ydata)
|
|
45
|
+
text = self.ax.text(point[0],
|
|
46
|
+
point[1],
|
|
47
|
+
f'({point[0]:.2f}, {point[1]:.2f})',
|
|
48
|
+
verticalalignment='center')
|
|
49
|
+
self.points_and_text[point] = text
|
|
50
|
+
x, y = self.get_xy()
|
|
51
|
+
if self.points is None:
|
|
52
|
+
self.points, = self.ax.plot(x, y, 'ro')
|
|
53
|
+
else:
|
|
54
|
+
self.points.set_data(x, y)
|
|
55
|
+
self.ax.draw()
|
|
56
|
+
|
|
57
|
+
elif event.button == 3 and event.inaxes is self.ax:
|
|
58
|
+
for point, text in list(self.points_and_text.items()):
|
|
59
|
+
point_xdisplay, point_ydisplay = self.ax.transData.transform_point(
|
|
60
|
+
point)
|
|
61
|
+
|
|
62
|
+
distance = np.sqrt((point_xdisplay - event.x)**2 +
|
|
63
|
+
(point_ydisplay - event.y)**2)
|
|
64
|
+
if distance < 10:
|
|
65
|
+
text.remove()
|
|
66
|
+
self.points_and_text.pop(point)
|
|
67
|
+
if self.points_and_text:
|
|
68
|
+
x, y = self.get_xy()
|
|
69
|
+
self.points.set_data(x, y)
|
|
70
|
+
else:
|
|
71
|
+
self.points.remove()
|
|
72
|
+
self.points = None
|
|
73
|
+
self.ax.draw()
|
|
74
|
+
break
|
|
75
|
+
|
|
76
|
+
def get_xy(self):
|
|
77
|
+
if self.points_and_text:
|
|
78
|
+
data = np.asarray(list(self.points_and_text.keys()))
|
|
79
|
+
x, y = data[:, 0], data[:, 1]
|
|
80
|
+
|
|
81
|
+
index = np.argsort(x)
|
|
82
|
+
x = np.asarray(x)[index]
|
|
83
|
+
y = np.asarray(y)[index]
|
|
84
|
+
return x, y
|
|
85
|
+
else:
|
|
86
|
+
return np.array([]), np.array([])
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: QuLab
|
|
3
|
+
Version: 2.10.10
|
|
4
|
+
Summary: contral instruments and manage data
|
|
5
|
+
Author-email: feihoo87 <feihoo87@gmail.com>
|
|
6
|
+
Maintainer-email: feihoo87 <feihoo87@gmail.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/feihoo87/QuLab
|
|
9
|
+
Project-URL: Bug Reports, https://github.com/feihoo87/QuLab/issues
|
|
10
|
+
Project-URL: Source, https://github.com/feihoo87/QuLab/
|
|
11
|
+
Keywords: experiment,laboratory
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator
|
|
20
|
+
Classifier: Programming Language :: Python
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: blinker>=1.4
|
|
28
|
+
Requires-Dist: click>=7.1.2
|
|
29
|
+
Requires-Dist: dill>=0.3.6
|
|
30
|
+
Requires-Dist: GitPython>=3.1.14
|
|
31
|
+
Requires-Dist: ipython>=7.4.0
|
|
32
|
+
Requires-Dist: ipywidgets>=7.4.2
|
|
33
|
+
Requires-Dist: loguru>=0.7.2
|
|
34
|
+
Requires-Dist: matplotlib>=3.7.2
|
|
35
|
+
Requires-Dist: msgpack>=1.0.5
|
|
36
|
+
Requires-Dist: nevergrad>=1.0.2
|
|
37
|
+
Requires-Dist: numpy>=1.13.3
|
|
38
|
+
Requires-Dist: ply>=3.11
|
|
39
|
+
Requires-Dist: pyperclip>=1.8.2
|
|
40
|
+
Requires-Dist: pyzmq>=25.1.0
|
|
41
|
+
Requires-Dist: qlisp>=1.1.4
|
|
42
|
+
Requires-Dist: qlispc>=1.1.8
|
|
43
|
+
Requires-Dist: scipy>=1.0.0
|
|
44
|
+
Requires-Dist: scikit-optimize>=0.9.0
|
|
45
|
+
Requires-Dist: SQLAlchemy>=2.0.19
|
|
46
|
+
Requires-Dist: watchdog>=4.0.0
|
|
47
|
+
Requires-Dist: wath>=1.1.6
|
|
48
|
+
Requires-Dist: waveforms>=1.9.4
|
|
49
|
+
Provides-Extra: full
|
|
50
|
+
Requires-Dist: uvloop>=0.19.0; extra == "full"
|
|
51
|
+
Dynamic: license-file
|
|
52
|
+
|
|
53
|
+
# QuLab
|
|
54
|
+
[](https://travis-ci.org/feihoo87/QuLab)
|
|
55
|
+
[](https://coveralls.io/github/feihoo87/QuLab)
|
|
56
|
+
[](https://pyup.io/repos/github/feihoo87/QuLab/)
|
|
57
|
+
[](http://qulab.readthedocs.org)
|
|
58
|
+
[](https://badge.fury.io/py/QuLab)
|
|
59
|
+
[]()
|
|
60
|
+
[](https://doi.org/10.5281/zenodo.3352232)
|
|
61
|
+
|
|
62
|
+
**Documentation can be found at [qulab.readthedocs.org](https://qulab.readthedocs.org/).**
|
|
63
|
+
|
|
64
|
+
## Installation
|
|
65
|
+
We encourage installing QuLab via the pip tool (a python package manager):
|
|
66
|
+
```bash
|
|
67
|
+
python -m pip install QuLab
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
To install from the latest source, you need to clone the GitHub repository on your machine.
|
|
71
|
+
```bash
|
|
72
|
+
git clone https://github.com/feihoo87/QuLab.git
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Then dependencies and QuLab can be installed in this way:
|
|
76
|
+
```bash
|
|
77
|
+
cd QuLab
|
|
78
|
+
python -m pip install -e .
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Usage
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
## Running Tests
|
|
85
|
+
To run tests:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
python -m pip install -r requirements-dev.txt
|
|
89
|
+
python -m pytest
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Attribution
|
|
93
|
+
If you make use of this code, please consider citing the Zenodo DOI [](https://doi.org/10.5281/zenodo.3352232) as a software citation:
|
|
94
|
+
```
|
|
95
|
+
@misc{xu_huikai_2019_3352232,
|
|
96
|
+
author = {Xu, Huikai},
|
|
97
|
+
title = {QuLab},
|
|
98
|
+
month = aug,
|
|
99
|
+
year = 2019,
|
|
100
|
+
doi = {10.5281/zenodo.3352232},
|
|
101
|
+
url = {https://doi.org/10.5281/zenodo.3352232}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Reporting Issues
|
|
106
|
+
Please report all issues [on github](https://github.com/feihoo87/QuLab/issues).
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
[MIT](https://opensource.org/licenses/MIT)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
qulab/__init__.py,sha256=hmf6R3jiM5NtJY1mSptogYnH5DMTR2dTzlXykqLxQzg,2027
|
|
2
|
+
qulab/__main__.py,sha256=fjaRSL_uUjNIzBGNgjlGswb9TJ2VD5qnkZHW3hItrD4,68
|
|
3
|
+
qulab/dicttree.py,sha256=QNClEGRFRFJIgAq9bUyxK4iPbkNRdZDona8UZq9jDfw,14236
|
|
4
|
+
qulab/expression.py,sha256=ZnTepyvhG2DUdOvCCny8jbeNCsvYi6G4xjdr05HxLuE,25751
|
|
5
|
+
qulab/fun.cpython-313-darwin.so,sha256=qnMz_fwsGOw9QtfkjmrlcdK5zczMw29K_vSHmRr07OA,126960
|
|
6
|
+
qulab/typing.py,sha256=vg62sGqxuD9CI5677ejlzAmf2fVdAESZCQjAE_xSxPg,69
|
|
7
|
+
qulab/utils.py,sha256=BdLdlfjpe6m6gSeONYmpAKTTqxDaYHNk4exlz8kZxTg,2982
|
|
8
|
+
qulab/version.py,sha256=iMPctba7Zmc8k76pU7WvVtu7ECCARmwVtsbglGDvCSg,23
|
|
9
|
+
qulab/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
qulab/cli/commands.py,sha256=F1LATmSC9lOAdnrOTMK7DRjETCEcOmMsocovWRyjWTc,597
|
|
11
|
+
qulab/cli/config.py,sha256=tZPSBLbf2x_Brb2UBuA1bsni8nC8WOPPGyWIi8m7j1I,5459
|
|
12
|
+
qulab/cli/decorators.py,sha256=oImteZVnDPPWdyhJ4kzf2KYGJLON7VsKGBvZadWLQZo,621
|
|
13
|
+
qulab/executor/__init__.py,sha256=LosPzOMaljSZY1thy_Fxtbrgq7uubJszMABEB7oM7tU,101
|
|
14
|
+
qulab/executor/analyze.py,sha256=4Hau5LrKUdpweh7W94tcG4ahgxucHOevbM0hm57T7zE,5649
|
|
15
|
+
qulab/executor/cli.py,sha256=bmuFPpPhHiRzTjIjhvlp2tQYp0jEwXSETILX8Nu2tLE,14901
|
|
16
|
+
qulab/executor/load.py,sha256=C5qepxC9QALMgfG_twxvGts6i0bCsnVg9lS05PXZZRM,20291
|
|
17
|
+
qulab/executor/registry.py,sha256=gym9F5FIDY5eV-cSCZsP99wC4l-6jkx9VMjJMaPOLaQ,4730
|
|
18
|
+
qulab/executor/schedule.py,sha256=7gAJFwj13j1niGjVa1fSzwOS22eNFEN1hdrN3dfTY6A,21410
|
|
19
|
+
qulab/executor/storage.py,sha256=8K73KGLAVgchJdtd4rKHXkr1CQOJORWH-Gi57w8IYsw,21081
|
|
20
|
+
qulab/executor/template.py,sha256=_HEtsUQ5_jSujCw8FBDAK1PRTMRCa4iD4DduHIpjo3c,10569
|
|
21
|
+
qulab/executor/utils.py,sha256=3OLRMBJu-1t78BeuZs4fv4jioEXnRNygaPnSoibzfgs,6405
|
|
22
|
+
qulab/monitor/__init__.py,sha256=nTHelnDpxRS_fl_B38TsN0njgq8eVTEz9IAnN3NbDlM,42
|
|
23
|
+
qulab/monitor/__main__.py,sha256=w3yUcqq195LzSnXTkQcuC1RSFRhy4oQ_PEBmucXguME,97
|
|
24
|
+
qulab/monitor/config.py,sha256=fQ5JcsMApKc1UwANEnIvbDQZl8uYW0tle92SaYtX9lI,744
|
|
25
|
+
qulab/monitor/dataset.py,sha256=C4wZU-XqYHY1ysvUGSF5958M_GANrXW-f1SHnruHJno,2455
|
|
26
|
+
qulab/monitor/event_queue.py,sha256=o66jOTKJmJibt-bhYFjk5p_rExxu-hdoR_BfR8PMN3I,1823
|
|
27
|
+
qulab/monitor/mainwindow.py,sha256=Bme7YKg2LQSpRH6cg8rcFhdnxUU_d_F4b6TIvPVAbx4,7799
|
|
28
|
+
qulab/monitor/monitor.py,sha256=Nt6IH51hhDcVmY2NNUlwk5G4rlgnBbsh4w5xpCuYkak,2797
|
|
29
|
+
qulab/monitor/ploter.py,sha256=CbiIjmohgtwDDTVeGzhXEGVo3XjytMdhLwU9VUkg9vo,3601
|
|
30
|
+
qulab/monitor/qt_compat.py,sha256=OK71_JSO_iyXjRIKHANmaK4Lx4bILUzmXI-mwKg3QeI,788
|
|
31
|
+
qulab/monitor/toolbar.py,sha256=WEag6cxAtEsOLL14XvM7pSE56EA3MO188_JuprNjdBs,7948
|
|
32
|
+
qulab/scan/__init__.py,sha256=Z88CzGsvr1VdKbF6aYgQv3j-fsEkKmqvpvX4LlzOM98,87
|
|
33
|
+
qulab/scan/curd.py,sha256=ZcwO5SKO95OcDgpUPDHcK5FW_BrJbUzuBk71UG_pqnM,6888
|
|
34
|
+
qulab/scan/models.py,sha256=JFofv-RH0gpS3--M6izXiQg7iGkS9a_em2DwhS5kTTk,17626
|
|
35
|
+
qulab/scan/optimize.py,sha256=VT9TpuqDkG7FdJJkYy60r5Pfrmjvfu5i36Ru6XvIiTI,2561
|
|
36
|
+
qulab/scan/query.py,sha256=SM4N3YfUpWnocl_7WNj00ff8uNzRQINMK0RNfPoDcoc,12254
|
|
37
|
+
qulab/scan/record.py,sha256=yIHPANf6nuBXy8Igf-dMtGJ7wuFTLYlBaaAUc0AzwyU,21280
|
|
38
|
+
qulab/scan/scan.py,sha256=m4EomeknN7MmNH-6M1mSmGHgz5QdkTkvHIkH6v66Bo4,39473
|
|
39
|
+
qulab/scan/server.py,sha256=Y1W3DysWBFQxR7-GoP95gvsf2SxRPY40GnONbmkQCu4,17188
|
|
40
|
+
qulab/scan/space.py,sha256=OQLepiNNP5TNYMHXeVFT59lL5n4soPmnMoMy_o9EHt0,6696
|
|
41
|
+
qulab/scan/utils.py,sha256=38-rxQmMfKn1QVeScvyyGCk01dE2eE9ffPssdgtSCZA,6289
|
|
42
|
+
qulab/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
|
+
qulab/storage/__main__.py,sha256=3emxxRry8BB0m8hUZvJ_oBqkPy7ksV7flHB_KEDXZuI,1692
|
|
44
|
+
qulab/storage/base_dataset.py,sha256=4aKhqBNdZfdlm_z1Qy5dv0HrvgpvMdy8pbyfua8uE-4,11865
|
|
45
|
+
qulab/storage/chunk.py,sha256=dtck2Pem7OYYX3TYlnWwfqrgXSmkLhi0nN_ElbuS-c8,1701
|
|
46
|
+
qulab/storage/dataset.py,sha256=Q9asJxNwYNcmu7sSqsAdAntYIre9b4dGIiFnt1O-KI4,4655
|
|
47
|
+
qulab/storage/file.py,sha256=KAaXFI1SKdcCVWjopVqYaWU4WZgZU9Oh2epdqH1ADPw,8343
|
|
48
|
+
qulab/storage/storage.py,sha256=qRyR-5zRRx84DfsifozlYKMRj8bykwRyF7TW8oyFmwk,2561
|
|
49
|
+
qulab/storage/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
|
+
qulab/storage/backend/redis.py,sha256=hNaPP0V1BSWbUcx4AxOhEXiR83c_BZqeVzeOYkb8-zM,5202
|
|
51
|
+
qulab/storage/models/__init__.py,sha256=DkKzQF7tYd1WL1gGPuCThBcGfpnCuZ_PTLrqV3M_EJ0,586
|
|
52
|
+
qulab/storage/models/base.py,sha256=QLXiTRCPcg28BCFxBHexAxdNLjh2ONkzgNavoFOBW9s,114
|
|
53
|
+
qulab/storage/models/config.py,sha256=Mxk0-YcK0WgA-7-2oIuDMAeBaUECzj-3_oPvgF7gYtE,689
|
|
54
|
+
qulab/storage/models/file.py,sha256=1Rypz1QSco6drBCiR_BS6Oy0ifOapBIeNEm0uDqqxBk,2716
|
|
55
|
+
qulab/storage/models/ipy.py,sha256=uYBeqWsOxxCWUsDpnwhxugh6C9OuH92OrChlLj0gddk,1574
|
|
56
|
+
qulab/storage/models/models.py,sha256=JUqtvk8ywulkcFL38WfTviuVOcdvSGakZYJS7jAPNig,2879
|
|
57
|
+
qulab/storage/models/record.py,sha256=L0k531bGF9JN-GLv3hG87tB7k0kuSBkEeC9vi6_qywE,4970
|
|
58
|
+
qulab/storage/models/report.py,sha256=j9ByrVoue-rwaXcnfTzVOSf1xDJdlZJq666agF0AZRY,798
|
|
59
|
+
qulab/storage/models/tag.py,sha256=c3cTxpJUoG9L6xyDvVuagYVhB32amzbkBOmVeRIZ5Zo,2339
|
|
60
|
+
qulab/sys/__init__.py,sha256=-XRZUpLakoCDsNEmwtW6IG7vjvX0MPzEIuD2KXc9yAg,122
|
|
61
|
+
qulab/sys/chat.py,sha256=DlFLP_gbVyL8fDUyad6Xu8sjQCZJauLIvF31mj5BtMs,22449
|
|
62
|
+
qulab/sys/ipy_events.py,sha256=qvsqs7-CYQ-P4WtSe9UUZZ0tC88XxPMd9DM4LJALgEk,2889
|
|
63
|
+
qulab/sys/progress.py,sha256=Tk1B96_1QrlI4yU0cyZlf2wVsF238DjQGqXJVG2j4t0,5350
|
|
64
|
+
qulab/sys/device/__init__.py,sha256=bDqJrYQJx8YR4u_CYvJPpIBr6whP7pVnxnROTHk_yhA,149
|
|
65
|
+
qulab/sys/device/basedevice.py,sha256=FQJqJEQPcWJALm1qQ0NQzfgncManD_Br2v2fzXSunLk,7195
|
|
66
|
+
qulab/sys/device/loader.py,sha256=BBcEnuQzCM6-ulJZ3nnf6xF3wSvUh02LLMN-cTY0ODE,2497
|
|
67
|
+
qulab/sys/device/utils.py,sha256=4NG_OKMDRdVH8YKHNf6kVocevXf7bqyf1PiGctTF_oA,2314
|
|
68
|
+
qulab/sys/drivers/FakeInstrument.py,sha256=_Mix8lfKGapTzCXBnfE9O3vznuqC379LtYopJ35HcIQ,2406
|
|
69
|
+
qulab/sys/drivers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
70
|
+
qulab/sys/net/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
|
+
qulab/sys/net/bencoder.py,sha256=p85DtmVy3cna3Da07boau77el2Cnym5-mKGF4xCJSy4,4959
|
|
72
|
+
qulab/sys/net/cli.py,sha256=dm-JxbgZgFH2P_5Zu3kSrLzy2U_VRLswkvE1d3xGp0w,5690
|
|
73
|
+
qulab/sys/net/dhcp.py,sha256=gT5ehyvwW3y8E5u_DnYRd5I0KaddonmQJFVhlIS2yxM,23509
|
|
74
|
+
qulab/sys/net/dhcpd.py,sha256=pNC47i-hu8HTzCrKU0PatL3AbgEqe1ovmpLPwNoZLa8,5322
|
|
75
|
+
qulab/sys/net/kad.py,sha256=gGYb9cXbAdbYhubQdCRqOGigllBy0kSUp4z3_f3AWz0,38981
|
|
76
|
+
qulab/sys/net/kcp.py,sha256=oFyiosQ1o0qeVA9hODIYEZtJj4HN1aNLGVP6vbxouMs,5761
|
|
77
|
+
qulab/sys/net/nginx.py,sha256=8dH76kQzB7coJ-VUCVggfSyjI86GsripDi6nlBrssM0,4890
|
|
78
|
+
qulab/sys/rpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
|
+
qulab/sys/rpc/client.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
80
|
+
qulab/sys/rpc/exceptions.py,sha256=djK44hYVMixF2Y-lAXDGHlyyCmYGw7EJjB3I0ttejok,2567
|
|
81
|
+
qulab/sys/rpc/msgpack.py,sha256=s9mbPIkQktO1FiSAuE6ymM_1w8rIERA0gMm5GQkT7z8,35327
|
|
82
|
+
qulab/sys/rpc/msgpack.pyi,sha256=3dJgISPCTEBo65VaoGjcFkdLijPx6zJtKqcZiS9bcaE,1274
|
|
83
|
+
qulab/sys/rpc/router.py,sha256=Q10UA0cL95PcrtYU0dpPsq3hLSN9IzFaL8XCpIBSqbk,941
|
|
84
|
+
qulab/sys/rpc/rpc.py,sha256=9ZwzC79FgmbHXbO1Gjg4z0wZgHLDziTwVuS2aZpLJAk,11979
|
|
85
|
+
qulab/sys/rpc/serialize.py,sha256=0SR1me02mao2JwWR3rdjUIcOzh1m1JFb7fLEaw_q-pE,3355
|
|
86
|
+
qulab/sys/rpc/server.py,sha256=e3R0gwOHpLEkSp7Tb43FMSDvqSG-pjrkskdISKQRseE,713
|
|
87
|
+
qulab/sys/rpc/socket.py,sha256=e3R0gwOHpLEkSp7Tb43FMSDvqSG-pjrkskdISKQRseE,713
|
|
88
|
+
qulab/sys/rpc/utils.py,sha256=6YGFOkY7o09lkA_I1FIP9_1Up3k2F1KOkftvu0_8lxo,594
|
|
89
|
+
qulab/sys/rpc/worker.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
|
+
qulab/sys/rpc/zmq_socket.py,sha256=fyElXf0mghlKX7ZZKFoJgs043emfu1L7jr8DTzmEW20,8587
|
|
91
|
+
qulab/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
|
+
qulab/tools/connection_helper.py,sha256=o1t6UpJQPyj4mWY66axgQkgsqUzdkhEGBJo44x9U1iE,946
|
|
93
|
+
qulab/visualization/__init__.py,sha256=26cuHt3QIJXUb3VaMxlJx3IQTOUVJFKlYBZr7WMP53M,6129
|
|
94
|
+
qulab/visualization/__main__.py,sha256=9zKK3yZFy0leU40ou6BpRC1Fsetfc1gjjFzIZYIwP6Y,1639
|
|
95
|
+
qulab/visualization/_autoplot.py,sha256=31B7pn1pK19abpQDGYBU9a_27cDL87LBpx9vKqlcYAo,14165
|
|
96
|
+
qulab/visualization/plot_circ.py,sha256=qZS3auNG4qIyUvC-ijTce17xJwGBvpRvPUqPEx64KUY,8759
|
|
97
|
+
qulab/visualization/plot_layout.py,sha256=mfdKJUyjTNB3YyD6GcqM38GEwiae4g6Us9HJyAwen6Q,13535
|
|
98
|
+
qulab/visualization/plot_seq.py,sha256=UWTS6p9nfX_7B8ehcYo6UnSTUCjkBsNU9jiOeW2calY,6751
|
|
99
|
+
qulab/visualization/qdat.py,sha256=ZeevBYWkzbww4xZnsjHhw7wRorJCBzbG0iEu-XQB4EA,5735
|
|
100
|
+
qulab/visualization/rot3d.py,sha256=lMrEJlRLwYe6NMBlGkKYpp_V9CTipOAuDy6QW_cQK00,734
|
|
101
|
+
qulab/visualization/widgets.py,sha256=6KkiTyQ8J-ei70LbPQZAK35wjktY47w2IveOa682ftA,3180
|
|
102
|
+
qulab-2.10.10.dist-info/licenses/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
|
|
103
|
+
qulab-2.10.10.dist-info/METADATA,sha256=_ghsTiQ7CREyqxeELK_QDWOXenuL9wbfBichRzh544c,3838
|
|
104
|
+
qulab-2.10.10.dist-info/WHEEL,sha256=PcmO1RKDLsHMT3RAaZOqeTGX4lL6QEXJl_XsJdvcX3o,115
|
|
105
|
+
qulab-2.10.10.dist-info/entry_points.txt,sha256=b0v1GXOwmxY-nCCsPN_rHZZvY9CtTbWqrGj8u1m8yHo,45
|
|
106
|
+
qulab-2.10.10.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
|
|
107
|
+
qulab-2.10.10.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 feihoo87
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
qulab
|