emu-sv 2.4.4__py3-none-any.whl → 2.5.1__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.4"
41
+ __version__ = "2.5.1"
emu_sv/state_vector.py CHANGED
@@ -66,7 +66,8 @@ class StateVector(State[complex, torch.Tensor]):
66
66
 
67
67
  norm = torch.linalg.vector_norm(self.vector)
68
68
 
69
- if not torch.allclose(norm, torch.ones_like(norm)):
69
+ # This must duplicate the tolerance in pulsers State._to_abstract_repr
70
+ if abs(self.norm() ** 4 - 1.0) > 1e-12:
70
71
  self.vector = self.vector / norm
71
72
 
72
73
  @classmethod
@@ -268,7 +269,7 @@ class StateVector(State[complex, torch.Tensor]):
268
269
  bin_to_int = int(
269
270
  state.replace(one, "1").replace("g", "0"), 2
270
271
  ) # "0" basis is already in "0"
271
- accum_state.vector[bin_to_int] = torch.tensor([amplitude])
272
+ accum_state.vector[bin_to_int] = amplitude # type: ignore [assignment]
272
273
 
273
274
  accum_state._normalize()
274
275
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: emu-sv
3
- Version: 2.4.4
3
+ Version: 2.5.1
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.4
28
+ Requires-Dist: emu-base==2.5.1
29
29
  Description-Content-Type: text/markdown
30
30
 
31
31
  <div align="center">
@@ -1,15 +1,15 @@
1
- emu_sv/__init__.py,sha256=5KQywugp66X9l0iIKKn8Rr26KU0RxrY6sZ1RGzrbcpc,771
1
+ emu_sv/__init__.py,sha256=1ivRLU63LbUtgOdxldhEaw5RX_5RpC4HvSu_NQm0Ei8,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
5
5
  emu_sv/hamiltonian.py,sha256=CqNGuWJlO2ZljK47wt130s-5uKiOldQUsC3tjwk1mKA,6106
6
6
  emu_sv/lindblad_operator.py,sha256=pgjRNLBcvEM2-qxM8uy9wL74OtrD4A8trQeERi_AXH8,8892
7
- emu_sv/state_vector.py,sha256=Ookw_BDqzs9OFppQd7kaMxDSkaj5F_clhOCgo-LSaMg,9910
7
+ emu_sv/state_vector.py,sha256=v4rqC_qBGc5vO5EMHcHR6BdASjeKujO6_sCdd3pGd0c,9990
8
8
  emu_sv/sv_backend.py,sha256=-soOkSEzEBK1dCKnYnbtvYjmNZtZra1_4jP3H1ROOtM,737
9
9
  emu_sv/sv_backend_impl.py,sha256=-xWE30B5RI32nOG2pUR8lL3q-wufwvzxegiJexW5g4w,8952
10
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.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,,
13
+ emu_sv-2.5.1.dist-info/METADATA,sha256=w55nOTevr_aCUsni08uNOcks62kWPiJdYIQFMnadtIQ,3595
14
+ emu_sv-2.5.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
15
+ emu_sv-2.5.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any