QuLab 2.3.0__tar.gz → 2.3.1__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.
Files changed (95) hide show
  1. {qulab-2.3.0 → qulab-2.3.1}/PKG-INFO +1 -1
  2. {qulab-2.3.0 → qulab-2.3.1}/QuLab.egg-info/PKG-INFO +1 -1
  3. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/expression.py +106 -0
  4. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/record.py +3 -1
  5. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/space.py +14 -14
  6. qulab-2.3.1/qulab/version.py +1 -0
  7. qulab-2.3.0/qulab/version.py +0 -1
  8. {qulab-2.3.0 → qulab-2.3.1}/LICENSE +0 -0
  9. {qulab-2.3.0 → qulab-2.3.1}/MANIFEST.in +0 -0
  10. {qulab-2.3.0 → qulab-2.3.1}/QuLab.egg-info/SOURCES.txt +0 -0
  11. {qulab-2.3.0 → qulab-2.3.1}/QuLab.egg-info/dependency_links.txt +0 -0
  12. {qulab-2.3.0 → qulab-2.3.1}/QuLab.egg-info/entry_points.txt +0 -0
  13. {qulab-2.3.0 → qulab-2.3.1}/QuLab.egg-info/requires.txt +0 -0
  14. {qulab-2.3.0 → qulab-2.3.1}/QuLab.egg-info/top_level.txt +0 -0
  15. {qulab-2.3.0 → qulab-2.3.1}/README.md +0 -0
  16. {qulab-2.3.0 → qulab-2.3.1}/pyproject.toml +0 -0
  17. {qulab-2.3.0 → qulab-2.3.1}/qulab/__init__.py +0 -0
  18. {qulab-2.3.0 → qulab-2.3.1}/qulab/__main__.py +0 -0
  19. {qulab-2.3.0 → qulab-2.3.1}/qulab/monitor/__init__.py +0 -0
  20. {qulab-2.3.0 → qulab-2.3.1}/qulab/monitor/__main__.py +0 -0
  21. {qulab-2.3.0 → qulab-2.3.1}/qulab/monitor/config.py +0 -0
  22. {qulab-2.3.0 → qulab-2.3.1}/qulab/monitor/dataset.py +0 -0
  23. {qulab-2.3.0 → qulab-2.3.1}/qulab/monitor/event_queue.py +0 -0
  24. {qulab-2.3.0 → qulab-2.3.1}/qulab/monitor/mainwindow.py +0 -0
  25. {qulab-2.3.0 → qulab-2.3.1}/qulab/monitor/monitor.py +0 -0
  26. {qulab-2.3.0 → qulab-2.3.1}/qulab/monitor/ploter.py +0 -0
  27. {qulab-2.3.0 → qulab-2.3.1}/qulab/monitor/qt_compat.py +0 -0
  28. {qulab-2.3.0 → qulab-2.3.1}/qulab/monitor/toolbar.py +0 -0
  29. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/__init__.py +0 -0
  30. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/curd.py +0 -0
  31. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/models.py +0 -0
  32. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/optimize.py +0 -0
  33. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/query.py +0 -0
  34. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/scan.py +0 -0
  35. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/server.py +0 -0
  36. {qulab-2.3.0 → qulab-2.3.1}/qulab/scan/utils.py +0 -0
  37. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/__init__.py +0 -0
  38. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/__main__.py +0 -0
  39. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/backend/__init__.py +0 -0
  40. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/backend/redis.py +0 -0
  41. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/base_dataset.py +0 -0
  42. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/chunk.py +0 -0
  43. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/dataset.py +0 -0
  44. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/file.py +0 -0
  45. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/models/__init__.py +0 -0
  46. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/models/base.py +0 -0
  47. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/models/config.py +0 -0
  48. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/models/file.py +0 -0
  49. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/models/ipy.py +0 -0
  50. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/models/models.py +0 -0
  51. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/models/record.py +0 -0
  52. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/models/report.py +0 -0
  53. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/models/tag.py +0 -0
  54. {qulab-2.3.0 → qulab-2.3.1}/qulab/storage/storage.py +0 -0
  55. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/__init__.py +0 -0
  56. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/chat.py +0 -0
  57. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/device/__init__.py +0 -0
  58. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/device/basedevice.py +0 -0
  59. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/device/loader.py +0 -0
  60. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/device/utils.py +0 -0
  61. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/drivers/FakeInstrument.py +0 -0
  62. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/drivers/__init__.py +0 -0
  63. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/ipy_events.py +0 -0
  64. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/net/__init__.py +0 -0
  65. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/net/bencoder.py +0 -0
  66. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/net/cli.py +0 -0
  67. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/net/dhcp.py +0 -0
  68. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/net/dhcpd.py +0 -0
  69. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/net/kad.py +0 -0
  70. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/net/kcp.py +0 -0
  71. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/net/nginx.py +0 -0
  72. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/progress.py +0 -0
  73. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/__init__.py +0 -0
  74. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/client.py +0 -0
  75. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/exceptions.py +0 -0
  76. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/msgpack.py +0 -0
  77. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/msgpack.pyi +0 -0
  78. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/rpc.py +0 -0
  79. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/serialize.py +0 -0
  80. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/server.py +0 -0
  81. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/socket.py +0 -0
  82. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/utils.py +0 -0
  83. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/worker.py +0 -0
  84. {qulab-2.3.0 → qulab-2.3.1}/qulab/sys/rpc/zmq_socket.py +0 -0
  85. {qulab-2.3.0 → qulab-2.3.1}/qulab/visualization/__init__.py +0 -0
  86. {qulab-2.3.0 → qulab-2.3.1}/qulab/visualization/__main__.py +0 -0
  87. {qulab-2.3.0 → qulab-2.3.1}/qulab/visualization/_autoplot.py +0 -0
  88. {qulab-2.3.0 → qulab-2.3.1}/qulab/visualization/plot_layout.py +0 -0
  89. {qulab-2.3.0 → qulab-2.3.1}/qulab/visualization/plot_seq.py +0 -0
  90. {qulab-2.3.0 → qulab-2.3.1}/qulab/visualization/qdat.py +0 -0
  91. {qulab-2.3.0 → qulab-2.3.1}/qulab/visualization/widgets.py +0 -0
  92. {qulab-2.3.0 → qulab-2.3.1}/setup.cfg +0 -0
  93. {qulab-2.3.0 → qulab-2.3.1}/setup.py +0 -0
  94. {qulab-2.3.0 → qulab-2.3.1}/src/qulab.h +0 -0
  95. {qulab-2.3.0 → qulab-2.3.1}/tests/test_scan.py +0 -0
@@ -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,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>
@@ -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
 
@@ -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"""
@@ -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()
@@ -0,0 +1 @@
1
+ __version__ = "2.3.1"
@@ -1 +0,0 @@
1
- __version__ = "2.3.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes