emu-mps 2.5.0__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_mps/__init__.py
CHANGED
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
|
-
|
|
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.
|
|
3
|
+
Version: 2.5.1
|
|
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.
|
|
28
|
+
Requires-Dist: emu-base==2.5.1
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
|
|
31
31
|
<div align="center">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
emu_mps/__init__.py,sha256=
|
|
1
|
+
emu_mps/__init__.py,sha256=k9ufwCRkS0Y_-jMXmLg8XJVg7ZjG4Y4hEWTdyfA-Qws,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=
|
|
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.
|
|
18
|
-
emu_mps-2.5.
|
|
19
|
-
emu_mps-2.5.
|
|
17
|
+
emu_mps-2.5.1.dist-info/METADATA,sha256=YxHxr2OczYsHmsBXmP0k8SUuTlpx96W2fj0jlqJIBZE,3587
|
|
18
|
+
emu_mps-2.5.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
19
|
+
emu_mps-2.5.1.dist-info/RECORD,,
|