QuLab 2.3.0__cp312-cp312-win_amd64.whl → 2.3.2__cp312-cp312-win_amd64.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.2
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=vkFybY8YSsQilYdThPRD83-btPAR41sy_WCXiM-6mME,141
2
2
  qulab/__main__.py,sha256=V7iokU7awstgjCeiF_hoOdFyrqJwC_4QetiLe7cWvOQ,454
3
- qulab/fun.cp312-win_amd64.pyd,sha256=yAmYxozUNlJlPUxVUsnHDaHh1Z-MbF59IMABzcHaXyo,32256
4
- qulab/version.py,sha256=GxSenfTTbLiVCmY5yEHjwuV-eKudBrOQ2NqIY4Qj64g,21
3
+ qulab/fun.cp312-win_amd64.pyd,sha256=Iys1OlXXuGh6v5_FXDp6BNgObI59dKkRt5-AyE-TsOU,32256
4
+ qulab/version.py,sha256=wmsQzkE8l2rmrt5-AjUYaTVQ_X-dbo-FDvqay4JDxVk,21
5
5
  qulab/monitor/__init__.py,sha256=xEVDkJF8issrsDeLqQmDsvtRmrf-UiViFcGTWuzdlFU,43
6
6
  qulab/monitor/__main__.py,sha256=k2H1H5Zf9LLXTDLISJkbikLH-z0f1e5i5i6wXXYPOrE,105
7
7
  qulab/monitor/config.py,sha256=y_5StMkdrbZO1ziyKBrvIkB7Jclp9RCPK1QbsOhCxnY,785
@@ -14,14 +14,14 @@ qulab/monitor/qt_compat.py,sha256=Eq7zlA4_XstB92NhtAqebtWU_Btw4lcwFO30YxZ-TPE,80
14
14
  qulab/monitor/toolbar.py,sha256=HxqG6ywKFyQJM2Q1s7SnhuzjbyeROczAZKwxztD1WJ8,8213
15
15
  qulab/scan/__init__.py,sha256=RR_0NQcr8Mi3vpWdypydbijQ1rXA0D3DEidQ7xjNslM,133
16
16
  qulab/scan/curd.py,sha256=yaTglGiS6mlk0GqDHi_w8T02XGBMvDZtXSdML7zDywk,7117
17
- qulab/scan/expression.py,sha256=4JeagGnwyOtLbz9UFQjcloRUZpIPvBFr2HY8UOxMW_E,16351
17
+ qulab/scan/expression.py,sha256=NzGfoCrrpSPg-qlAq04KrYCp1V9zp4CFv0Ia5EA9oTM,20073
18
18
  qulab/scan/models.py,sha256=ZvXkJEt5Yz3Sjx0JKzYka-q2Uo-w_iVzHgH8A6DbjF0,18236
19
19
  qulab/scan/optimize.py,sha256=ACfGSfrFpPgmZo_P5kD4mquahXImYipdP7E86dtFQO8,2635
20
20
  qulab/scan/query.py,sha256=RM8bG4Tcx_PaNk8tv9HdlTZ1dGuuSr3sZVkYVq2BtfQ,12183
21
- qulab/scan/record.py,sha256=aBpUllhKsBRhPOwZwsp3rcw2HB-3ne9yLYHLBeXXM-M,21669
22
- qulab/scan/scan.py,sha256=g2_iQKcYYHOBxDUlAdWNVMhSOg8OPOzlOxPcF_dw0Pc,38966
21
+ qulab/scan/record.py,sha256=7Lu1A80yAHgZnlLS_ZRXLBhHhllWL8lxxUHd2NQ871Y,21795
22
+ qulab/scan/scan.py,sha256=lJxcTxjGeG77ZfmP1EdSfEHJgMWeiVm6Nf6zKa3UKfg,38963
23
23
  qulab/scan/server.py,sha256=eukKCsJphmYTiqvn4HY8Dc-tTEzDkxXHgApVvxtX0Fc,14662
24
- qulab/scan/space.py,sha256=o2oqweDBWfAjJ025xzVs2gyqq41Zk4eUTdwkaABz6_c,6290
24
+ qulab/scan/space.py,sha256=S-jHaXXf12FzjajOhPsZ-mkpGzAxrFAI3tRuQrvTBKg,6274
25
25
  qulab/scan/utils.py,sha256=30qnYvyFyctwcWxOCUpCNxXgGysA7xdIDzYbjwxGUzA,3744
26
26
  qulab/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  qulab/storage/__main__.py,sha256=6-EjN0waX1yfcMPJXqpIr9UlrIEsSCFApm5G-ZeaPMQ,1742
@@ -78,9 +78,9 @@ qulab/visualization/plot_layout.py,sha256=yAnMONOms7_szCdng-8wPpUMPis5UnbaNNzV4K
78
78
  qulab/visualization/plot_seq.py,sha256=h9D0Yl_yO64IwlvBgzMu9EBKr9gg6y8QE55gu2PfTns,2783
79
79
  qulab/visualization/qdat.py,sha256=HubXFu4nfcA7iUzghJGle1C86G6221hicLR0b-GqhKQ,5887
80
80
  qulab/visualization/widgets.py,sha256=HcYwdhDtLreJiYaZuN3LfofjJmZcLwjMfP5aasebgDo,3266
81
- QuLab-2.3.0.dist-info/LICENSE,sha256=b4NRQ-GFVpJMT7RuExW3NwhfbrYsX7AcdB7Gudok-fs,1086
82
- QuLab-2.3.0.dist-info/METADATA,sha256=QUo05dKHcMlNsaWWl1rPUtkM3ec01fJLwkgaT_uFgfo,3609
83
- QuLab-2.3.0.dist-info/WHEEL,sha256=fZWyj_84lK0cA-ZNCsdwhbJl0OTrpWkxInEn424qrSs,102
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.2.dist-info/LICENSE,sha256=b4NRQ-GFVpJMT7RuExW3NwhfbrYsX7AcdB7Gudok-fs,1086
82
+ QuLab-2.3.2.dist-info/METADATA,sha256=PhoeyPK8kpUxXm8GQkFFoLcycY0eM_IhU7Wp8dJFnKY,3609
83
+ QuLab-2.3.2.dist-info/WHEEL,sha256=h3VxxLkZstcnkT86k1ujrti5ToMTN-RbBnzIRuTWCMs,101
84
+ QuLab-2.3.2.dist-info/entry_points.txt,sha256=ohBzutEnQimP_BZWiuXdSliu4QAYSHHcN0PZD8c7ZCY,46
85
+ QuLab-2.3.2.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
86
+ QuLab-2.3.2.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-win_amd64
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/scan.py CHANGED
@@ -481,8 +481,8 @@ class Scan():
481
481
  elif isinstance(space, OptimizeSpace):
482
482
  space.name = name
483
483
  space.optimizer.dimensions[name] = space.space
484
- if space.suggestions:
485
- space.optimizer.suggestions[name] = space.suggestions
484
+ if space.suggestion:
485
+ space.optimizer.suggestion[name] = space.suggestion
486
486
  self._add_search_space(name, space.optimizer.level, space)
487
487
  self.add_depends(space.optimizer.name, [name])
488
488
  else:
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.2"
File without changes