Skip to content

Commit c711146

Browse files
committed
updating joining probabilities
1 parent 938bb67 commit c711146

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/bloqade/noise/native/model.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import abc
2+
from itertools import product
23
from dataclasses import field, dataclass
34

45

@@ -241,14 +242,11 @@ def join_channels(
241242
p2_dict = {"I": 1 - (px_2 + py_2 + pz_2), "X": px_2, "Y": py_2, "Z": pz_2}
242243
p_out = {}
243244

244-
for key1, key2 in zip(p1_dict.keys(), p2_dict.keys()):
245+
for key1, key2 in product(p1_dict.keys(), p2_dict.keys()):
245246
key = cls.PAULI_RULE[key1 + key2]
246247
if key == "I":
247248
continue
248-
249-
p_out[key] = p_out.setdefault(key, 0.0) + cls.join_binary_probs(
250-
p1_dict[key1], p2_dict[key2]
251-
)
249+
p_out[key] = p_out.setdefault(key, 0.0) + p1_dict[key1] * p2_dict[key2]
252250

253251
return (
254252
p_out["X"],

0 commit comments

Comments
 (0)