We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 938bb67 commit c711146Copy full SHA for c711146
src/bloqade/noise/native/model.py
@@ -1,4 +1,5 @@
1
import abc
2
+from itertools import product
3
from dataclasses import field, dataclass
4
5
@@ -241,14 +242,11 @@ def join_channels(
241
242
p2_dict = {"I": 1 - (px_2 + py_2 + pz_2), "X": px_2, "Y": py_2, "Z": pz_2}
243
p_out = {}
244
- for key1, key2 in zip(p1_dict.keys(), p2_dict.keys()):
245
+ for key1, key2 in product(p1_dict.keys(), p2_dict.keys()):
246
key = cls.PAULI_RULE[key1 + key2]
247
if key == "I":
248
continue
-
249
- p_out[key] = p_out.setdefault(key, 0.0) + cls.join_binary_probs(
250
- p1_dict[key1], p2_dict[key2]
251
- )
+ p_out[key] = p_out.setdefault(key, 0.0) + p1_dict[key1] * p2_dict[key2]
252
253
return (
254
p_out["X"],
0 commit comments