emu-sv 2.4.3__py3-none-any.whl → 2.4.4__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_sv/__init__.py CHANGED
@@ -38,4 +38,4 @@ __all__ = [
38
38
  "DensityMatrix",
39
39
  ]
40
40
 
41
- __version__ = "2.4.3"
41
+ __version__ = "2.4.4"
emu_sv/sv_config.py CHANGED
@@ -1,10 +1,10 @@
1
1
  import copy
2
2
  import logging
3
3
  import pathlib
4
- import sys
5
4
  from types import MethodType
6
5
  from typing import Any, ClassVar
7
6
 
7
+ from emu_base import init_logging
8
8
  from emu_sv.utils import choose
9
9
  from emu_sv.state_vector import StateVector
10
10
  from emu_sv.dense_operator import DenseOperator
@@ -92,20 +92,8 @@ class SVConfig(EmulationConfig):
92
92
  )
93
93
 
94
94
  self.monkeypatch_observables()
95
+ self.logger = init_logging(log_level, log_file)
95
96
 
96
- self.logger = logging.getLogger("global_logger")
97
- if log_file is None:
98
- logging.basicConfig(
99
- level=log_level, format="%(message)s", stream=sys.stdout, force=True
100
- ) # default to stream = sys.stderr
101
- else:
102
- logging.basicConfig(
103
- level=log_level,
104
- format="%(message)s",
105
- filename=str(log_file),
106
- filemode="w",
107
- force=True,
108
- )
109
97
  if (self.noise_model.runs != 1 and self.noise_model.runs is not None) or (
110
98
  self.noise_model.samples_per_run != 1
111
99
  and self.noise_model.samples_per_run is not None
@@ -158,17 +146,3 @@ class SVConfig(EmulationConfig):
158
146
  )
159
147
  obs_list.append(obs_copy)
160
148
  self.observables = tuple(obs_list)
161
-
162
- def init_logging(self) -> None:
163
- if self.log_file is None:
164
- logging.basicConfig(
165
- level=self.log_level, format="%(message)s", stream=sys.stdout, force=True
166
- ) # default to stream = sys.stderr
167
- else:
168
- logging.basicConfig(
169
- level=self.log_level,
170
- format="%(message)s",
171
- filename=str(self.log_file),
172
- filemode="w",
173
- force=True,
174
- )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: emu-sv
3
- Version: 2.4.3
3
+ Version: 2.4.4
4
4
  Summary: Pasqal State Vector based pulse emulator built on PyTorch
5
5
  Project-URL: Documentation, https://pasqal-io.github.io/emulators/
6
6
  Project-URL: Repository, https://github.com/pasqal-io/emulators
@@ -25,7 +25,7 @@ Classifier: Programming Language :: Python :: 3.10
25
25
  Classifier: Programming Language :: Python :: Implementation :: CPython
26
26
  Classifier: Programming Language :: Python :: Implementation :: PyPy
27
27
  Requires-Python: >=3.10
28
- Requires-Dist: emu-base==2.4.3
28
+ Requires-Dist: emu-base==2.4.4
29
29
  Description-Content-Type: text/markdown
30
30
 
31
31
  <div align="center">
@@ -1,4 +1,4 @@
1
- emu_sv/__init__.py,sha256=1hHM5EAw0ugqsOoGkOSSSGUcOeV2WknuHoOl921Hd7g,771
1
+ emu_sv/__init__.py,sha256=5KQywugp66X9l0iIKKn8Rr26KU0RxrY6sZ1RGzrbcpc,771
2
2
  emu_sv/custom_callback_implementations.py,sha256=_7XLIDzJ-p3DVqz-Jyv0eYbl8nih2x2p-pM4cBCLumA,6367
3
3
  emu_sv/dense_operator.py,sha256=GvF0swsiFRqp83bpyaU_CXap2vm74-JLI5lHo-0Hbdk,5901
4
4
  emu_sv/density_matrix_state.py,sha256=6QmLZvqEHLR64r0nD7D2jZIiAYOgciNVCjh3ywfvIs0,7243
@@ -7,9 +7,9 @@ emu_sv/lindblad_operator.py,sha256=pgjRNLBcvEM2-qxM8uy9wL74OtrD4A8trQeERi_AXH8,8
7
7
  emu_sv/state_vector.py,sha256=Ookw_BDqzs9OFppQd7kaMxDSkaj5F_clhOCgo-LSaMg,9910
8
8
  emu_sv/sv_backend.py,sha256=-soOkSEzEBK1dCKnYnbtvYjmNZtZra1_4jP3H1ROOtM,737
9
9
  emu_sv/sv_backend_impl.py,sha256=-xWE30B5RI32nOG2pUR8lL3q-wufwvzxegiJexW5g4w,8952
10
- emu_sv/sv_config.py,sha256=xgKyEPOGzqM-jC_xJ5VYJak4CNntbp2wywbdYqCGEoM,6318
10
+ emu_sv/sv_config.py,sha256=o1esIqflxfN1ZtdwoVBAIWlzZIf9B5X9pvsQe1zHfdg,5433
11
11
  emu_sv/time_evolution.py,sha256=Uy3qMdt3BlLB6Aq1-o5uajRTu_3fPuBCtcusHxFPPJc,13545
12
12
  emu_sv/utils.py,sha256=t0nMDVo6DF5bQW-vbsyRMCmvkyNxCU-v0Enmns9aOAU,1151
13
- emu_sv-2.4.3.dist-info/METADATA,sha256=LRwdllrphDzFnmvyIlZZP6PuqfEH81RRXrmkRTvAG4c,3595
14
- emu_sv-2.4.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- emu_sv-2.4.3.dist-info/RECORD,,
13
+ emu_sv-2.4.4.dist-info/METADATA,sha256=BzxpLGED8LO4VQTR_51t5w4kwNDodUT2Z7c7rFt4boE,3595
14
+ emu_sv-2.4.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ emu_sv-2.4.4.dist-info/RECORD,,
File without changes