Skip to content

Commit c85ac49

Browse files
Merge remote-tracking branch 'origin/feat-multi-observable' into feat-multi-observable
2 parents a65b777 + e9ec5f1 commit c85ac49

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

mpqp/core/instruction/measurement/pauli_string.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,9 @@ def to_other_language(
12651265

12661266
_allow_atom_creation = True
12671267

1268-
I = PauliStringAtom("I", np.eye(2, dtype=np.complex64), [1, 1], np.array([[1, 0], [0, 1]]), [])
1268+
I = PauliStringAtom(
1269+
"I", np.eye(2, dtype=np.complex64), [1, 1], np.array([[1, 0], [0, 1]]), []
1270+
)
12691271
r"""Pauli-I atom representing the identity operator in a Pauli monomial or string.
12701272
Matrix representation:
12711273
`\begin{pmatrix}1&0\\0&1\end{pmatrix}`
@@ -1275,7 +1277,7 @@ def to_other_language(
12751277
1 - np.eye(2, dtype=np.complex64),
12761278
[1, -1],
12771279
(1 / np.sqrt(2)) * np.array([[1, 1], [1, -1]]),
1278-
[H]
1280+
[H],
12791281
)
12801282
r"""Pauli-X atom representing the X operator in a Pauli monomial or string.
12811283
Matrix representation:
@@ -1287,7 +1289,7 @@ def to_other_language(
12871289
np.fliplr(np.diag([1j, -1j])),
12881290
[1, -1],
12891291
(1 / np.sqrt(2)) * np.array([[1, 1j], [1, -1j]]),
1290-
[S_dagger, H]
1292+
[S_dagger, H],
12911293
)
12921294
r"""Pauli-Y atom representing the Y operator in a Pauli monomial or string.
12931295
Matrix representation:

tests/noise/test_noisy_execution.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ def test_all_native_gates_local_noise(
137137
circuit.add(
138138
[
139139
BasisMeasure([0, 1, 2], shots=1023),
140-
Depolarizing(0.23, [0, 2], gates=[H, X, Y, Z, S, S_dagger, T, Rx, Ry, Rz, Rk, P, U]),
140+
Depolarizing(
141+
0.23, [0, 2], gates=[H, X, Y, Z, S, S_dagger, T, Rx, Ry, Rz, Rk, P, U]
142+
),
141143
Depolarizing(0.23, [0, 1], dimension=2, gates=[SWAP, CNOT, CZ]),
142144
BitFlip(0.2, [0, 2]),
143145
BitFlip(0.1, [0, 1], gates=[CNOT, H]),

0 commit comments

Comments
 (0)