emu-base 2.4.4__py3-none-any.whl → 2.5.0__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_base/__init__.py CHANGED
@@ -22,4 +22,4 @@ __all__ = [
22
22
  "init_logging",
23
23
  ]
24
24
 
25
- __version__ = "2.4.4"
25
+ __version__ = "2.5.0"
@@ -23,7 +23,9 @@ def get_lindblad_operators(
23
23
 
24
24
  if noise_type == "dephasing":
25
25
  if noise_model.hyperfine_dephasing_rate != 0.0:
26
- raise NotImplementedError("hyperfine_dephasing_rate is unsupported")
26
+ raise NotImplementedError(
27
+ "hyperfine_dephasing_rate is supported only in the digital basis"
28
+ )
27
29
 
28
30
  c = math.sqrt(noise_model.dephasing_rate / 2)
29
31
  dephasing = torch.zeros(dim, dim, dtype=dtype)
@@ -55,23 +57,23 @@ def get_lindblad_operators(
55
57
  for op in noise_model.eff_noise_opers
56
58
  ):
57
59
  raise ValueError(
58
- "Only 2 by 2 or 3 by 3 effective noise operator matrices are "
60
+ f"Only {dim} by {dim} effective noise operator matrices are "
59
61
  "supported and it should be given as torch tensors "
60
62
  )
63
+
64
+ lindblad_ops = [ # lindblad operators with XY pulser basis are fine
65
+ math.sqrt(rate) * torch.as_tensor(op)
66
+ for rate, op in zip(noise_model.eff_noise_rates, noise_model.eff_noise_opers)
67
+ ]
68
+
69
+ # pulser ising basis changing to emu-mps ising basis
61
70
  if interact_type == "ising":
62
- return [ # lindblad operators in pulser ising basis
63
- math.sqrt(rate) * torch.flip(torch.as_tensor(op), (0, 1))
64
- for rate, op in zip(
65
- noise_model.eff_noise_rates, noise_model.eff_noise_opers
66
- )
67
- ]
68
- elif interact_type == "XY":
69
- return [ # lindblad operators in pulser XY basis
70
- math.sqrt(rate) * torch.as_tensor(op)
71
- for rate, op in zip(
72
- noise_model.eff_noise_rates, noise_model.eff_noise_opers
73
- )
74
- ]
71
+ for tensor in lindblad_ops:
72
+ tensor[:2, :2] = torch.flip(tensor[:2, :2], (0, 1))
73
+
74
+ return lindblad_ops
75
+ if noise_type == "leakage": # leakage operators are eff_noise
76
+ return []
75
77
 
76
78
  raise ValueError(f"Unknown noise type: {noise_type}")
77
79
 
@@ -153,6 +153,7 @@ class PulserData:
153
153
  self.omega, self.delta, self.phi = _extract_omega_delta_phi(
154
154
  self.hamiltonian.noisy_samples, self.qubit_ids, self.target_times
155
155
  )
156
+ self.eigenstates = self.hamiltonian.eigenbasis
156
157
 
157
158
  int_type = self.hamiltonian.interaction_type
158
159
  self.dim = self.hamiltonian.dim
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: emu-base
3
- Version: 2.4.4
3
+ Version: 2.5.0
4
4
  Summary: Pasqal base classes for emulators
5
5
  Project-URL: Documentation, https://pasqal-io.github.io/emulators/
6
6
  Project-URL: Repository, https://github.com/pasqal-io/emulators
@@ -1,7 +1,7 @@
1
- emu_base/__init__.py,sha256=D7NkoAkHyN0qILkIdfrzfs5-C2yl381TySMHwEWj14c,759
1
+ emu_base/__init__.py,sha256=0gT5wd46vY1MykuZ-E1-h9Ev1fOXE_tu59FzRDH9PCM,759
2
2
  emu_base/constants.py,sha256=41LYkKLUCz-oxPbd-j7nUDZuhIbUrnez6prT0uR0jcE,56
3
- emu_base/jump_lindblad_operators.py,sha256=Wioao_EohYXBrIRZ1yd_qD9K4rPx9_B0NBKKKwiYr18,3033
4
- emu_base/pulser_adapter.py,sha256=W5e1NLqqrXwCbGAkUdww7DneDaYX981II5chifB89ek,7219
3
+ emu_base/jump_lindblad_operators.py,sha256=F_C-1aruXY_SLzw0m_HD5loqRGdjgsLHEzttlMzWNEw,3015
4
+ emu_base/pulser_adapter.py,sha256=o30fm2soOXr7y2hvoZKLC24oi-FW0_6RmSgrsSWu_y4,7274
5
5
  emu_base/utils.py,sha256=kXfRFq31r_dfLbBC0SHiPpvf7Wll4behd2vqQJsTrVo,3553
6
6
  emu_base/math/__init__.py,sha256=6BbIytYV5uC-e5jLMtIErkcUl_PvfSNnhmVFY9Il8uQ,97
7
7
  emu_base/math/brents_root_finding.py,sha256=AVx6L1Il6rpPJWrLJ7cn6oNmJyZOPRgEaaZaubC9lsU,3711
@@ -9,6 +9,6 @@ emu_base/math/double_krylov.py,sha256=X16dyCbyzdP7fFK-hmKS03Q-DJtC6TZ8sJrGTJ6akI
9
9
  emu_base/math/krylov_energy_min.py,sha256=iR4hmE0eXptbAg3opikd5d4Zv7dhnDrawH-n_4KG-cc,4009
10
10
  emu_base/math/krylov_exp.py,sha256=mGFddVQ8mEbwypbZtnlRPFpi4Nf8JZT6OKLHloIwCDQ,3934
11
11
  emu_base/math/matmul.py,sha256=lEAnV0b5z_f1xEA-9p-WXxA8bM3QbShiHdXQ3ZkZFcQ,877
12
- emu_base-2.4.4.dist-info/METADATA,sha256=e_i4b_tVdN2PTfEs12pUYGZgICeNUbAIzKpNAFBlsfU,3604
13
- emu_base-2.4.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
- emu_base-2.4.4.dist-info/RECORD,,
12
+ emu_base-2.5.0.dist-info/METADATA,sha256=U1_pInFyZ7gjemxHzZjX1F4y3hfhkw174NjuPVw47gI,3604
13
+ emu_base-2.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
+ emu_base-2.5.0.dist-info/RECORD,,