emu-base 2.5.2__py3-none-any.whl → 2.6.0__py3-none-any.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.
emu_base/__init__.py
CHANGED
emu_base/utils.py
CHANGED
|
@@ -12,6 +12,26 @@ if unix_like:
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def init_logging(log_level: int, log_file: Path | None) -> logging.Logger:
|
|
15
|
+
"""Create and return a configured logger for the emulators package.
|
|
16
|
+
|
|
17
|
+
This configures a logger named "emulators" and ensures it does not
|
|
18
|
+
propagate messages to ancestor loggers. Any existing handlers attached to
|
|
19
|
+
this logger are removed before the new handler is added.
|
|
20
|
+
|
|
21
|
+
Behavior
|
|
22
|
+
- If `log_file` is None, a StreamHandler writing to stdout is used.
|
|
23
|
+
- If `log_file` is a Path, a FileHandler is created (mode='w'), which
|
|
24
|
+
overwrites the file on each call.
|
|
25
|
+
- The handler's level is set to `log_level` and uses a simple
|
|
26
|
+
"%(message)s" formatter.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
log_level (int): Logging level (e.g. logging.INFO).
|
|
30
|
+
log_file (Path | None): Path to a log file, or None to log to stdout.
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
logging.Logger: The configured logger instance named "emulators".
|
|
34
|
+
"""
|
|
15
35
|
logger = logging.getLogger("emulators")
|
|
16
36
|
logger.propagate = False
|
|
17
37
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
emu_base/__init__.py,sha256=
|
|
1
|
+
emu_base/__init__.py,sha256=5JI5rxeebOrPm_PXO9VJS945rBSgP7x3fb1pM5VZGJw,759
|
|
2
2
|
emu_base/constants.py,sha256=41LYkKLUCz-oxPbd-j7nUDZuhIbUrnez6prT0uR0jcE,56
|
|
3
3
|
emu_base/jump_lindblad_operators.py,sha256=F_C-1aruXY_SLzw0m_HD5loqRGdjgsLHEzttlMzWNEw,3015
|
|
4
4
|
emu_base/pulser_adapter.py,sha256=QyvJVWmAQDpFBc68-cnndNBkY1rvdDeEXXPse-afQ68,7369
|
|
5
|
-
emu_base/utils.py,sha256=
|
|
5
|
+
emu_base/utils.py,sha256=b1MjdzkHUejUsC6W125MppMw7ALrUhS0ugS2u_DOod8,4378
|
|
6
6
|
emu_base/math/__init__.py,sha256=6BbIytYV5uC-e5jLMtIErkcUl_PvfSNnhmVFY9Il8uQ,97
|
|
7
7
|
emu_base/math/brents_root_finding.py,sha256=AVx6L1Il6rpPJWrLJ7cn6oNmJyZOPRgEaaZaubC9lsU,3711
|
|
8
8
|
emu_base/math/double_krylov.py,sha256=X16dyCbyzdP7fFK-hmKS03Q-DJtC6TZ8sJrGTJ6akIc,3708
|
|
9
9
|
emu_base/math/krylov_energy_min.py,sha256=iR4hmE0eXptbAg3opikd5d4Zv7dhnDrawH-n_4KG-cc,4009
|
|
10
10
|
emu_base/math/krylov_exp.py,sha256=mGFddVQ8mEbwypbZtnlRPFpi4Nf8JZT6OKLHloIwCDQ,3934
|
|
11
11
|
emu_base/math/matmul.py,sha256=lEAnV0b5z_f1xEA-9p-WXxA8bM3QbShiHdXQ3ZkZFcQ,877
|
|
12
|
-
emu_base-2.
|
|
13
|
-
emu_base-2.
|
|
14
|
-
emu_base-2.
|
|
12
|
+
emu_base-2.6.0.dist-info/METADATA,sha256=WiKgVyQECbJhXRy-DFgMvzn9GGvBvNS5HROaARcztyk,3604
|
|
13
|
+
emu_base-2.6.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
14
|
+
emu_base-2.6.0.dist-info/RECORD,,
|
|
File without changes
|