emu-mps 2.5.0__py3-none-any.whl → 2.5.2__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_mps/__init__.py CHANGED
@@ -36,4 +36,4 @@ __all__ = [
36
36
  "EntanglementEntropy",
37
37
  ]
38
38
 
39
- __version__ = "2.5.0"
39
+ __version__ = "2.5.2"
emu_mps/mps.py CHANGED
@@ -1,5 +1,4 @@
1
1
  from __future__ import annotations
2
- import math
3
2
  from collections import Counter
4
3
  from typing import List, Optional, Sequence, TypeVar, Mapping
5
4
  import logging
@@ -479,8 +478,10 @@ class MPS(State[complex, torch.Tensor]):
479
478
  else:
480
479
  factors.append(basis_0)
481
480
  accum_mps += amplitude * MPS(factors, eigenstates=eigenstates)
481
+
482
482
  norm = accum_mps.norm()
483
- if not math.isclose(1.0, norm, rel_tol=1e-5, abs_tol=0.0):
483
+ # This must duplicate the tolerance in pulsers State._to_abstract_repr
484
+ if abs(norm**4 - 1.0) > 1e-12:
484
485
  logging.getLogger("emulators").warning(
485
486
  "\nThe state is not normalized, normalizing it for you."
486
487
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: emu-mps
3
- Version: 2.5.0
3
+ Version: 2.5.2
4
4
  Summary: Pasqal MPS 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.5.0
28
+ Requires-Dist: emu-base==2.5.2
29
29
  Description-Content-Type: text/markdown
30
30
 
31
31
  <div align="center">
@@ -1,9 +1,9 @@
1
- emu_mps/__init__.py,sha256=att-gSzRc9t4OvllrmSVf_vPjP2WlmqT_sBJ020sv0c,708
1
+ emu_mps/__init__.py,sha256=c-uUpZ6sKJuu0iXuCH5Rle7jHpyadqG_j9qgNH9t5bQ,708
2
2
  emu_mps/algebra.py,sha256=VZ5uaX5PYWGqDCpRKKr819BLMMtT0pKDxc2HrlLCdgU,5423
3
3
  emu_mps/custom_callback_implementations.py,sha256=WeczmO6qkvBIipvXLqX45i3D7M4ovOrepusIGs6d2Ts,2420
4
4
  emu_mps/hamiltonian.py,sha256=OM0bPNZV7J5Egk6aTUwt4GaWqiUOP68ujZBTuqlBY1k,16289
5
5
  emu_mps/mpo.py,sha256=WmGDGkCMhlODmydd0b09YcSRlsk6Bg5xYQ4rXSNJvnY,9703
6
- emu_mps/mps.py,sha256=9LcneNCGMLYQJfiTQrDzBKz-YQmcL76P9l-A-3_bXOI,21707
6
+ emu_mps/mps.py,sha256=aIWbd3s4c2lqhzR1IukxOAmRK7kfUFBPHkOOCS3dcPM,21747
7
7
  emu_mps/mps_backend.py,sha256=dXcW5Fa2AAL_WlHUgr30WS2l3qiDJgBVebiVpyYWpPM,2064
8
8
  emu_mps/mps_backend_impl.py,sha256=WyB1PpC61rzrnr_c3epVZOhDtXLOdhQLsMgUtZQWCYg,30851
9
9
  emu_mps/mps_config.py,sha256=btlygf6VDFna9TQus-zOmUqB6pfe_aoQmNoivfvxABk,8251
@@ -14,6 +14,6 @@ emu_mps/utils.py,sha256=rL75H55hB5lDMjy8a_O2PpJq51iZKjSx91X4euxB3mY,7293
14
14
  emu_mps/optimatrix/__init__.py,sha256=fBXQ7-rgDro4hcaBijCGhx3J69W96qcw5_3mWc7tND4,364
15
15
  emu_mps/optimatrix/optimiser.py,sha256=k9suYmKLKlaZ7ozFuIqvXHyCBoCtGgkX1mpen9GOdOo,6977
16
16
  emu_mps/optimatrix/permutations.py,sha256=9DDMZtrGGZ01b9F3GkzHR3paX4qNtZiPoI7Z_Kia3Lc,3727
17
- emu_mps-2.5.0.dist-info/METADATA,sha256=La-IngskVDu8pMUaqmyqS_4Fe1qPAnOKfErnPsVpAiQ,3587
18
- emu_mps-2.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
19
- emu_mps-2.5.0.dist-info/RECORD,,
17
+ emu_mps-2.5.2.dist-info/METADATA,sha256=7i0nH79Bhe-S22wxLyixahqIo94zoCFvQHFyJxKXMps,3587
18
+ emu_mps-2.5.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
19
+ emu_mps-2.5.2.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