emu-mps 2.0.3__py3-none-any.whl → 2.0.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_mps/__init__.py CHANGED
@@ -37,4 +37,4 @@ __all__ = [
37
37
  "EntanglementEntropy",
38
38
  ]
39
39
 
40
- __version__ = "2.0.3"
40
+ __version__ = "2.0.4"
@@ -24,7 +24,8 @@ from emu_mps.hamiltonian import make_H, update_H
24
24
  from emu_mps.mpo import MPO
25
25
  from emu_mps.mps import MPS
26
26
  from emu_mps.mps_config import MPSConfig
27
- from emu_mps.noise import compute_noise_from_lindbladians, pick_well_prepared_qubits
27
+ from emu_mps.noise import pick_well_prepared_qubits
28
+ from emu_base.jump_lindblad_operators import compute_noise_from_lindbladians
28
29
  import emu_mps.optimatrix as optimat
29
30
  from emu_mps.tdvp import (
30
31
  evolve_pair,
@@ -563,7 +564,7 @@ def permute_bitstrings(results: Results, perm: torch.Tensor) -> None:
563
564
  def permute_occupations_and_correlations(results: Results, perm: torch.Tensor) -> None:
564
565
  for corr in ["occupation", "correlation_matrix"]:
565
566
  if corr not in results.get_result_tags():
566
- return
567
+ continue
567
568
 
568
569
  uuid_corr = results._find_uuid(corr)
569
570
  corrs = results._results[uuid_corr]
emu_mps/noise.py CHANGED
@@ -1,26 +1,6 @@
1
- import torch
2
1
  import random
3
2
 
4
3
 
5
- def compute_noise_from_lindbladians(lindbladians: list[torch.Tensor]) -> torch.Tensor:
6
- """
7
- Compute the single-qubit Hamiltonian noise term -0.5i∑L†L from all the given lindbladians.
8
- """
9
-
10
- assert all(
11
- lindbladian.shape == (2, 2) for lindbladian in lindbladians
12
- ), "Only single-qubit lindblad operators are supported"
13
-
14
- return (
15
- -1j
16
- / 2.0
17
- * sum(
18
- (lindbladian.T.conj() @ lindbladian for lindbladian in lindbladians),
19
- start=torch.zeros(2, 2, dtype=torch.complex128),
20
- )
21
- )
22
-
23
-
24
4
  def pick_well_prepared_qubits(eta: float, n: int) -> list[bool]:
25
5
  """
26
6
  Randomly pick n booleans such that ℙ(False) = eta.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: emu-mps
3
- Version: 2.0.3
3
+ Version: 2.0.4
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.0.3
28
+ Requires-Dist: emu-base==2.0.4
29
29
  Description-Content-Type: text/markdown
30
30
 
31
31
  <div align="center">
@@ -1,19 +1,19 @@
1
- emu_mps/__init__.py,sha256=wGG0u1wHUcq_MuDjygyApshJY_ome-TZMVggIfHcgns,734
1
+ emu_mps/__init__.py,sha256=K556l0ESPENNk_HUeBzdsP2viJKqMt7eeN0TKilKmFo,734
2
2
  emu_mps/algebra.py,sha256=ngPtTH-j2ZCBWoaJZXlkUyIlug7dY7Q92gzfnRlpPMA,5485
3
3
  emu_mps/custom_callback_implementations.py,sha256=CUs0kW3HRaPE7UeFNQOFbeWJMsz4hS2q4rgS57BBp-A,2411
4
4
  emu_mps/hamiltonian.py,sha256=gOPxNOBmk6jRPPjevERuCP_scGv0EKYeAJ0uxooihes,15622
5
5
  emu_mps/mpo.py,sha256=1ogQ25GZCwMzZ_m449oGHcYyDKrofBCr1eyzzrIPMhQ,8824
6
6
  emu_mps/mps.py,sha256=GIiWxctNmHARgf-PgQc6IHKNCe5HYSnbtlXI6Hc-0wI,20085
7
7
  emu_mps/mps_backend.py,sha256=bS83qFxvdoK-c12_1WaPw6O7xUc7vdWifZNHUzNP5sM,2091
8
- emu_mps/mps_backend_impl.py,sha256=8aPSn6ZGFf4DtTodzajX6WJtQHI9F8eMUN1AbrPzbgw,25611
8
+ emu_mps/mps_backend_impl.py,sha256=CLWbtzDLLYh92xD9_GLQVteSYGd_kylSh6DwnDbf0K8,25657
9
9
  emu_mps/mps_config.py,sha256=JCK_frUVyMRJjI0NPU-dpCg-uO3JKeVzQMOLDkQ9XVk,8104
10
- emu_mps/noise.py,sha256=h4X2EFjoC_Ok0gZ8I9wN77RANXaVehTBbjkcbY_GAmY,784
10
+ emu_mps/noise.py,sha256=5BXthepWLKnuSTJfIFuPl2AcYPxUeTJdRc2b28ekkhg,208
11
11
  emu_mps/observables.py,sha256=7GQDH5kyaVNrwckk2f8ZJRV9Ca4jKhWWDsOCqYWsoEk,1349
12
12
  emu_mps/tdvp.py,sha256=0qTw9qhg0WbaAyBgeTpULHrNL0ytj80ZUb1P6GKD7Ww,6172
13
13
  emu_mps/utils.py,sha256=BqRJYAcXqprtZVJ0V_j954ON2bhTdtZiaTojsYyrWrg,8193
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.0.3.dist-info/METADATA,sha256=ZU1USoiZ12em9lo4GgAWFiGE0oBT83yXitpm2fx8LvA,3505
18
- emu_mps-2.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
19
- emu_mps-2.0.3.dist-info/RECORD,,
17
+ emu_mps-2.0.4.dist-info/METADATA,sha256=nbKzGgXJPvZO4u0PL8zXN6H-9lV6VRsp__-FCD4c3Xs,3505
18
+ emu_mps-2.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
19
+ emu_mps-2.0.4.dist-info/RECORD,,