QuLab 2.3.0__cp312-cp312-macosx_10_9_universal2.whl → 2.3.1__cp312-cp312-macosx_10_9_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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: QuLab
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: contral instruments and manage data
5
5
  Author-email: feihoo87 <feihoo87@gmail.com>
6
6
  Maintainer-email: feihoo87 <feihoo87@gmail.com>
@@ -1,7 +1,7 @@
1
1
  qulab/__init__.py,sha256=P-Mx2p4TVmL91SoxoeXcj8Qm0x4xUf5Q_FLk0Yc_gIQ,138
2
2
  qulab/__main__.py,sha256=ZC1NKaoxKyy60DaCfB8vYnB1z3RXQ2j8E1sRZ4A8sXE,428
3
- qulab/fun.cpython-312-darwin.so,sha256=JVHBI8lJzKnWDQrrte1tgnQMgtZJCl-CHbDnN1qad6s,159632
4
- qulab/version.py,sha256=GxSenfTTbLiVCmY5yEHjwuV-eKudBrOQ2NqIY4Qj64g,21
3
+ qulab/fun.cpython-312-darwin.so,sha256=EuzZAPAemdjuQNtRUDAHGzeik3LPhyygWNMjOKlB2gg,159632
4
+ qulab/version.py,sha256=6STsl4r4R0vt1cK4ruxjle9q351XfLSSyARO42RdqOk,21
5
5
  qulab/monitor/__init__.py,sha256=nTHelnDpxRS_fl_B38TsN0njgq8eVTEz9IAnN3NbDlM,42
6
6
  qulab/monitor/__main__.py,sha256=w3yUcqq195LzSnXTkQcuC1RSFRhy4oQ_PEBmucXguME,97
7
7
  qulab/monitor/config.py,sha256=fQ5JcsMApKc1UwANEnIvbDQZl8uYW0tle92SaYtX9lI,744
@@ -14,14 +14,14 @@ qulab/monitor/qt_compat.py,sha256=OK71_JSO_iyXjRIKHANmaK4Lx4bILUzmXI-mwKg3QeI,78
14
14
  qulab/monitor/toolbar.py,sha256=WEag6cxAtEsOLL14XvM7pSE56EA3MO188_JuprNjdBs,7948
15
15
  qulab/scan/__init__.py,sha256=ZX4WsvqYxvJeHLgGSrtJoAnVU94gxY7EHKMxYooMERg,130
16
16
  qulab/scan/curd.py,sha256=thq_qfi3qng3Zx-1uhNG64IQhGCuum_LR4MOKnS8cDI,6896
17
- qulab/scan/expression.py,sha256=JsJ00qK05QVDAgz-husRuov7hKg8nW75rsTwLG8RH7Q,15843
17
+ qulab/scan/expression.py,sha256=s2_sWFm4gKgJ7pGLmuugCU8XifAm9Mc3AT3bdoyFUtM,19459
18
18
  qulab/scan/models.py,sha256=5Jpo25WGMWs0GtLzYLsWO61G3-FFYx5BHhBr2b6rOTE,17681
19
19
  qulab/scan/optimize.py,sha256=jYceGazEabuwYqmZE8P6Nnq_KsLyUP0p-p88VbbJLhM,2559
20
20
  qulab/scan/query.py,sha256=-5uHMhXSyGovK1oy_uUbGVEbRFzaMBkP78ZMNfI3jD0,11809
21
- qulab/scan/record.py,sha256=-FL9JMgfhvkT0q7dhJJXbjXOrOkTIk2J9oPmxP6psuA,21070
21
+ qulab/scan/record.py,sha256=sICMLAWf3IgvJ3JlS0cKQA4mSpLZins7K5qFoAnCSYI,21194
22
22
  qulab/scan/scan.py,sha256=GXjx5gDT2L7S2H_opdFl9fEEJNsHi2RlwJpcbAY4aKg,37837
23
23
  qulab/scan/server.py,sha256=ZT-J447xuLSpmbTNm5dNIz8_CXKOow66_bjkFNGh_vI,14274
24
- qulab/scan/space.py,sha256=tmTMrLzUwm-NiXDQyJsr--D6Gj8GbF9XQx--o1QpQzE,6092
24
+ qulab/scan/space.py,sha256=X5anTvw7X0XGN83y0o0C-zhvh6bDEU-kshGgo004pNE,6076
25
25
  qulab/scan/utils.py,sha256=Pg_tCf3SUKTiPSBqb6Enkgx4bAyQJAkDGe9uYys1xVU,3613
26
26
  qulab/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  qulab/storage/__main__.py,sha256=3emxxRry8BB0m8hUZvJ_oBqkPy7ksV7flHB_KEDXZuI,1692
@@ -78,9 +78,9 @@ qulab/visualization/plot_layout.py,sha256=clNw9QjE_kVNpIIx2Ob4YhAz2fucPGMuzkoIrO
78
78
  qulab/visualization/plot_seq.py,sha256=lphYF4VhkEdc_wWr1kFBwrx2yujkyFPFaJ3pjr61awI,2693
79
79
  qulab/visualization/qdat.py,sha256=ZeevBYWkzbww4xZnsjHhw7wRorJCBzbG0iEu-XQB4EA,5735
80
80
  qulab/visualization/widgets.py,sha256=6KkiTyQ8J-ei70LbPQZAK35wjktY47w2IveOa682ftA,3180
81
- QuLab-2.3.0.dist-info/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
82
- QuLab-2.3.0.dist-info/METADATA,sha256=FB6pFPfzfkG_vsOZXBQhdl-lGrsSGXsAPAjOiaT6YfI,3510
83
- QuLab-2.3.0.dist-info/WHEEL,sha256=aK27B_a3TQKBFhN_ATCfuFR4pBRqHlzwr7HpZ6iA79M,115
84
- QuLab-2.3.0.dist-info/entry_points.txt,sha256=ohBzutEnQimP_BZWiuXdSliu4QAYSHHcN0PZD8c7ZCY,46
85
- QuLab-2.3.0.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
86
- QuLab-2.3.0.dist-info/RECORD,,
81
+ QuLab-2.3.1.dist-info/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
82
+ QuLab-2.3.1.dist-info/METADATA,sha256=86_MtpxRFwbah3FMBNV24Gsr_p05NkZo6Sx6904TtUw,3510
83
+ QuLab-2.3.1.dist-info/WHEEL,sha256=AvY5kd1l-6eld3_O1DbDacb3SfHwf7SbqPFKKoBohWQ,114
84
+ QuLab-2.3.1.dist-info/entry_points.txt,sha256=ohBzutEnQimP_BZWiuXdSliu4QAYSHHcN0PZD8c7ZCY,46
85
+ QuLab-2.3.1.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
86
+ QuLab-2.3.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-cp312-macosx_10_9_universal2
5
5
 
Binary file
qulab/scan/expression.py CHANGED
@@ -210,6 +210,16 @@ class Expression():
210
210
  return -self
211
211
  return BinaryExpression(other, self, operator.mul)
212
212
 
213
+ def __matmul__(self, other):
214
+ if isinstance(other, Expression):
215
+ other = other.eval(_default_env)
216
+ return BinaryExpression(self, other, operator.matmul)
217
+
218
+ def __rmatmul__(self, other):
219
+ if isinstance(other, Expression):
220
+ other = other.eval(_default_env)
221
+ return BinaryExpression(other, self, operator.matmul)
222
+
213
223
  def __truediv__(self, other):
214
224
  if isinstance(other, Expression):
215
225
  other = other.eval(_default_env)
@@ -226,6 +236,34 @@ class Expression():
226
236
  return 0
227
237
  return BinaryExpression(other, self, operator.truediv)
228
238
 
239
+ def __floordiv__(self, other):
240
+ if isinstance(other, Expression):
241
+ other = other.eval(_default_env)
242
+ if isinstance(other, ConstType) and other == 1:
243
+ return self
244
+ if isinstance(other, ConstType) and other == -1:
245
+ return -self
246
+ return BinaryExpression(self, other, operator.floordiv)
247
+
248
+ def __rfloordiv__(self, other):
249
+ if isinstance(other, Expression):
250
+ other = other.eval(_default_env)
251
+ if isinstance(other, ConstType) and other == 0:
252
+ return 0
253
+ return BinaryExpression(other, self, operator.floordiv)
254
+
255
+ def __mod__(self, other):
256
+ if isinstance(other, Expression):
257
+ other = other.eval(_default_env)
258
+ if isinstance(other, ConstType) and other == 1:
259
+ return 0
260
+ return BinaryExpression(self, other, operator.mod)
261
+
262
+ def __rmod__(self, other):
263
+ if isinstance(other, Expression):
264
+ other = other.eval(_default_env)
265
+ return BinaryExpression(other, self, operator.mod)
266
+
229
267
  def __pow__(self, other):
230
268
  if isinstance(other, Expression):
231
269
  other = other.eval(_default_env)
@@ -248,6 +286,21 @@ class Expression():
248
286
  def __pos__(self):
249
287
  return UnaryExpression(self, operator.pos)
250
288
 
289
+ def __abs__(self):
290
+ return UnaryExpression(self, operator.abs)
291
+
292
+ def __not__(self):
293
+ return UnaryExpression(self, operator.not_)
294
+
295
+ def __inv__(self):
296
+ return UnaryExpression(self, operator.inv)
297
+
298
+ def __invert__(self):
299
+ return UnaryExpression(self, operator.invert)
300
+
301
+ def __index__(self):
302
+ return UnaryExpression(self, operator.index)
303
+
251
304
  def __eq__(self, other):
252
305
  if isinstance(other, Expression):
253
306
  other = other.eval(_default_env)
@@ -278,6 +331,56 @@ class Expression():
278
331
  other = other.eval(_default_env)
279
332
  return BinaryExpression(self, other, operator.ge)
280
333
 
334
+ def __and__(self, other):
335
+ if isinstance(other, Expression):
336
+ other = other.eval(_default_env)
337
+ return BinaryExpression(self, other, operator.and_)
338
+
339
+ def __rand__(self, other):
340
+ if isinstance(other, Expression):
341
+ other
342
+ return BinaryExpression(other, self, operator.and_)
343
+
344
+ def __or__(self, other):
345
+ if isinstance(other, Expression):
346
+ other = other.eval(_default_env)
347
+ return BinaryExpression(self, other, operator.or_)
348
+
349
+ def __ror__(self, other):
350
+ if isinstance(other, Expression):
351
+ other = other.eval(_default_env)
352
+ return BinaryExpression(other, self, operator.or_)
353
+
354
+ def __lshift__(self, other):
355
+ if isinstance(other, Expression):
356
+ other = other.eval(_default_env)
357
+ return BinaryExpression(self, other, operator.lshift)
358
+
359
+ def __rlshift__(self, other):
360
+ if isinstance(other, Expression):
361
+ other = other.eval(_default_env)
362
+ return BinaryExpression(other, self, operator.lshift)
363
+
364
+ def __rshift__(self, other):
365
+ if isinstance(other, Expression):
366
+ other = other.eval(_default_env)
367
+ return BinaryExpression(self, other, operator.rshift)
368
+
369
+ def __rrshift__(self, other):
370
+ if isinstance(other, Expression):
371
+ other = other.eval(_default_env)
372
+ return BinaryExpression(other, self, operator.rshift)
373
+
374
+ def __xor__(self, other):
375
+ if isinstance(other, Expression):
376
+ other = other.eval(_default_env)
377
+ return BinaryExpression(self, other, operator.xor)
378
+
379
+ def __rxor__(self, other):
380
+ if isinstance(other, Expression):
381
+ other = other.eval(_default_env)
382
+ return BinaryExpression(other, self, operator.xor)
383
+
281
384
  def __getitem__(self, other):
282
385
  if isinstance(other, Expression):
283
386
  other = other.eval(_default_env)
@@ -301,6 +404,9 @@ class Expression():
301
404
  def __round__(self, n=None):
302
405
  return self
303
406
 
407
+ def __bool__(self):
408
+ return True
409
+
304
410
  def eval(self, env):
305
411
  raise NotImplementedError
306
412
 
qulab/scan/record.py CHANGED
@@ -589,7 +589,9 @@ class Record():
589
589
  return record
590
590
 
591
591
  def __repr__(self):
592
- return f"<Record: id={self.id} app={self.description['app']}, keys={self.keys()}>"
592
+ if self.is_remote_record() and not self._items:
593
+ self._items = {key: None for key in self.keys()}
594
+ return f"<Record: id={self.id} app={self.description['app']}, keys={self._items.keys()}>"
593
595
 
594
596
  # def _repr_html_(self):
595
597
  # return f"""
qulab/scan/space.py CHANGED
@@ -104,14 +104,14 @@ def geomspace(start, stop, num=50, endpoint=True):
104
104
 
105
105
  class OptimizeSpace():
106
106
 
107
- def __init__(self, optimizer: 'Optimizer', space, suggestions=None):
107
+ def __init__(self, optimizer: 'Optimizer', space, suggestion=None):
108
108
  self.optimizer = optimizer
109
109
  self.space = space
110
110
  self.name = None
111
- if suggestions is not None and not isinstance(
112
- suggestions, (list, tuple, np.ndarray)):
113
- suggestions = [suggestions]
114
- self.suggestions = suggestions
111
+ if suggestion is not None and not isinstance(
112
+ suggestion, (list, tuple, np.ndarray)):
113
+ suggestion = [suggestion]
114
+ self.suggestion = suggestion
115
115
 
116
116
  def __len__(self):
117
117
  return self.optimizer.maxiter
@@ -135,7 +135,7 @@ class Optimizer():
135
135
  self.level = level
136
136
  self.kwds = kwds
137
137
  self.minimize = minimize
138
- self.suggestions = {}
138
+ self.suggestion = {}
139
139
 
140
140
  def create(self):
141
141
  opt = self.method(list(self.dimensions.values()), **self.kwds)
@@ -144,9 +144,9 @@ class Optimizer():
144
144
  while True:
145
145
  yield space.rvs()[0]
146
146
 
147
- if self.suggestions:
147
+ if self.suggestion:
148
148
  for suggestion in zip(*[
149
- self.suggestions.get(key, rvs(space))
149
+ self.suggestion.get(key, rvs(space))
150
150
  for key, space in self.dimensions.items()
151
151
  ]):
152
152
  opt.suggest(*suggestion)
@@ -157,10 +157,10 @@ class Optimizer():
157
157
  prior=None,
158
158
  transform=None,
159
159
  name=None,
160
- suggestions=None) -> OptimizeSpace:
160
+ suggestion=None) -> OptimizeSpace:
161
161
  return OptimizeSpace(self,
162
162
  Categorical(categories, prior, transform, name),
163
- suggestions)
163
+ suggestion)
164
164
 
165
165
  def Integer(self,
166
166
  low,
@@ -170,10 +170,10 @@ class Optimizer():
170
170
  transform="normalize",
171
171
  name=None,
172
172
  dtype=np.int64,
173
- suggestions=None) -> OptimizeSpace:
173
+ suggestion=None) -> OptimizeSpace:
174
174
  return OptimizeSpace(
175
175
  self, Integer(low, high, prior, base, transform, name, dtype),
176
- suggestions)
176
+ suggestion)
177
177
 
178
178
  def Real(self,
179
179
  low,
@@ -183,10 +183,10 @@ class Optimizer():
183
183
  transform="normalize",
184
184
  name=None,
185
185
  dtype=float,
186
- suggestions=None) -> OptimizeSpace:
186
+ suggestion=None) -> OptimizeSpace:
187
187
  return OptimizeSpace(
188
188
  self, Real(low, high, prior, base, transform, name, dtype),
189
- suggestions)
189
+ suggestion)
190
190
 
191
191
  def __getstate__(self) -> dict:
192
192
  state = self.__dict__.copy()
qulab/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.3.0"
1
+ __version__ = "2.3.1"
File without changes