QuLab 2.1.4__cp310-cp310-macosx_10_9_universal2.whl → 2.2.0__cp310-cp310-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.
- {QuLab-2.1.4.dist-info → QuLab-2.2.0.dist-info}/METADATA +1 -1
- {QuLab-2.1.4.dist-info → QuLab-2.2.0.dist-info}/RECORD +10 -10
- qulab/fun.cpython-310-darwin.so +0 -0
- qulab/scan/scan.py +25 -2
- qulab/scan/space.py +6 -6
- qulab/version.py +1 -1
- {QuLab-2.1.4.dist-info → QuLab-2.2.0.dist-info}/LICENSE +0 -0
- {QuLab-2.1.4.dist-info → QuLab-2.2.0.dist-info}/WHEEL +0 -0
- {QuLab-2.1.4.dist-info → QuLab-2.2.0.dist-info}/entry_points.txt +0 -0
- {QuLab-2.1.4.dist-info → QuLab-2.2.0.dist-info}/top_level.txt +0 -0
|
@@ -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-310-darwin.so,sha256=
|
|
4
|
-
qulab/version.py,sha256=
|
|
3
|
+
qulab/fun.cpython-310-darwin.so,sha256=WAYJl94wMNKbJJ-s-E7PgHBitGGJGZ7QoQBk2KDHePk,159632
|
|
4
|
+
qulab/version.py,sha256=j8DDNpniPNhmwry5zUQczzr9Gj6bGU3sUUeXfGl_kKE,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
|
|
@@ -19,9 +19,9 @@ qulab/scan/models.py,sha256=5Jpo25WGMWs0GtLzYLsWO61G3-FFYx5BHhBr2b6rOTE,17681
|
|
|
19
19
|
qulab/scan/optimize.py,sha256=vErjRTCtn2MwMF5Xyhs1P4gHF2IFHv_EqxsUvH_4y7k,2287
|
|
20
20
|
qulab/scan/query.py,sha256=Ct07TGwEedWY8z_Nv_1Y3BHIToli2KG88LB_X5VnZCU,11455
|
|
21
21
|
qulab/scan/record.py,sha256=_s2f6hp1poiyOqp81cBzt7EbNmkUPBt08bmmDQYcXaE,18572
|
|
22
|
-
qulab/scan/scan.py,sha256=
|
|
22
|
+
qulab/scan/scan.py,sha256=Zdeg5RTKVHEyDWd4z_2xRsnxuNDOm1S2McncVk1jKe8,34774
|
|
23
23
|
qulab/scan/server.py,sha256=EiS5hu1YM9e25W2tjekzfJiRkyD9urVLIo1dp3VXiDY,11591
|
|
24
|
-
qulab/scan/space.py,sha256=
|
|
24
|
+
qulab/scan/space.py,sha256=XEWQnlRYPix65LyiT6KLOK7WG2a11FJJ_M4H_dZ6Z-E,5209
|
|
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.
|
|
82
|
-
QuLab-2.
|
|
83
|
-
QuLab-2.
|
|
84
|
-
QuLab-2.
|
|
85
|
-
QuLab-2.
|
|
86
|
-
QuLab-2.
|
|
81
|
+
QuLab-2.2.0.dist-info/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
|
|
82
|
+
QuLab-2.2.0.dist-info/METADATA,sha256=dGfThQKKaP-VcDG5Nj0mSi3Z0gnytkYWShbUelPUm1M,3510
|
|
83
|
+
QuLab-2.2.0.dist-info/WHEEL,sha256=r7U64H7df5k5VoE41bE2otJ6YmrMps4wUd2_S2hHvHQ,115
|
|
84
|
+
QuLab-2.2.0.dist-info/entry_points.txt,sha256=ohBzutEnQimP_BZWiuXdSliu4QAYSHHcN0PZD8c7ZCY,46
|
|
85
|
+
QuLab-2.2.0.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
|
|
86
|
+
QuLab-2.2.0.dist-info/RECORD,,
|
qulab/fun.cpython-310-darwin.so
CHANGED
|
Binary file
|
qulab/scan/scan.py
CHANGED
|
@@ -332,7 +332,17 @@ class Scan():
|
|
|
332
332
|
async def _emit(self, current_level, step, position, variables: dict[str,
|
|
333
333
|
Any]):
|
|
334
334
|
for key, value in list(variables.items()):
|
|
335
|
-
if
|
|
335
|
+
if key.startswith('**'):
|
|
336
|
+
if isinstance(value, dict):
|
|
337
|
+
variables.update(value)
|
|
338
|
+
del variables[key]
|
|
339
|
+
elif inspect.isawaitable(value):
|
|
340
|
+
d = await value
|
|
341
|
+
assert isinstance(
|
|
342
|
+
d, dict), f"Should promise a dict for `**` symbol."
|
|
343
|
+
variables.update(d)
|
|
344
|
+
del variables[key]
|
|
345
|
+
elif inspect.isawaitable(value) and not self.hiden(key):
|
|
336
346
|
variables[key] = await value
|
|
337
347
|
if self._sock is not None:
|
|
338
348
|
await self._sock.send_pyobj({
|
|
@@ -362,7 +372,8 @@ class Scan():
|
|
|
362
372
|
self._hide_pattern_re = re.compile('|'.join(self.description['hiden']))
|
|
363
373
|
|
|
364
374
|
def hiden(self, name: str) -> bool:
|
|
365
|
-
return bool(
|
|
375
|
+
return bool(
|
|
376
|
+
self._hide_pattern_re.match(name)) and not name.startswith('**')
|
|
366
377
|
|
|
367
378
|
async def _filter(self, variables: dict[str, Any], level: int = 0):
|
|
368
379
|
try:
|
|
@@ -971,9 +982,21 @@ async def _iter_level(variables,
|
|
|
971
982
|
|
|
972
983
|
variables.update(await call_many_functions(order, getters, variables))
|
|
973
984
|
|
|
985
|
+
if opts:
|
|
986
|
+
for key in list(variables.keys()):
|
|
987
|
+
if key.startswith('**'):
|
|
988
|
+
d = variables[key]
|
|
989
|
+
if inspect.isawaitable(d):
|
|
990
|
+
d = await d
|
|
991
|
+
assert isinstance(
|
|
992
|
+
d, dict), f"Should promise a dict for `**` symbol."
|
|
993
|
+
variables.update(d)
|
|
994
|
+
del variables[key]
|
|
995
|
+
|
|
974
996
|
for name, opt in opts.items():
|
|
975
997
|
opt_cfg = optimizers[name]
|
|
976
998
|
args = [variables[n] for n in opt_cfg.dimensions.keys()]
|
|
999
|
+
|
|
977
1000
|
if name not in variables:
|
|
978
1001
|
raise ValueError(f'{name} not in variables.')
|
|
979
1002
|
fun = variables[name]
|
qulab/scan/space.py
CHANGED
|
@@ -23,11 +23,11 @@ class Space():
|
|
|
23
23
|
return len(self.toarray())
|
|
24
24
|
|
|
25
25
|
@classmethod
|
|
26
|
-
def fromarray(cls,
|
|
27
|
-
if isinstance(
|
|
28
|
-
return
|
|
29
|
-
if isinstance(
|
|
30
|
-
array = np.array(
|
|
26
|
+
def fromarray(cls, space):
|
|
27
|
+
if isinstance(space, Space):
|
|
28
|
+
return space
|
|
29
|
+
if isinstance(space, (list, tuple)):
|
|
30
|
+
array = np.array(space)
|
|
31
31
|
try:
|
|
32
32
|
a = np.linspace(array[0], array[-1], len(array), dtype=array.dtype)
|
|
33
33
|
if np.allclose(a, array):
|
|
@@ -81,7 +81,7 @@ class Space():
|
|
|
81
81
|
dtype=array.dtype)
|
|
82
82
|
except:
|
|
83
83
|
pass
|
|
84
|
-
return
|
|
84
|
+
return space
|
|
85
85
|
|
|
86
86
|
def toarray(self):
|
|
87
87
|
return getattr(np, self.function)(*self.args, **self.kwds)
|
qulab/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.
|
|
1
|
+
__version__ = "2.2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|