emu-base 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_base/__init__.py +1 -1
- emu_base/jump_lindblad_operators.py +17 -15
- emu_base/pulser_adapter.py +1 -0
- {emu_base-2.4.4.dist-info → emu_base-2.5.1.dist-info}/METADATA +1 -1
- {emu_base-2.4.4.dist-info → emu_base-2.5.1.dist-info}/RECORD +6 -6
- {emu_base-2.4.4.dist-info → emu_base-2.5.1.dist-info}/WHEEL +1 -1
emu_base/__init__.py
CHANGED
|
@@ -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(
|
|
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
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
|
emu_base/pulser_adapter.py
CHANGED
|
@@ -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,7 +1,7 @@
|
|
|
1
|
-
emu_base/__init__.py,sha256=
|
|
1
|
+
emu_base/__init__.py,sha256=gzORtin5IjJa4eHKvMS8lpoFOkqnyg6gjK2I7Ro1lII,759
|
|
2
2
|
emu_base/constants.py,sha256=41LYkKLUCz-oxPbd-j7nUDZuhIbUrnez6prT0uR0jcE,56
|
|
3
|
-
emu_base/jump_lindblad_operators.py,sha256=
|
|
4
|
-
emu_base/pulser_adapter.py,sha256=
|
|
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.
|
|
13
|
-
emu_base-2.
|
|
14
|
-
emu_base-2.
|
|
12
|
+
emu_base-2.5.1.dist-info/METADATA,sha256=x9PuTCLmGou-o1mkLRjOldScvaAX9uj4-e7xXViefbs,3604
|
|
13
|
+
emu_base-2.5.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
14
|
+
emu_base-2.5.1.dist-info/RECORD,,
|