Skip to content

Commit a7b1aba

Browse files
chore: Files formated
1 parent 1c95da1 commit a7b1aba

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

mpqp/core/instruction/measurement/expectation_value.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ class to define your observable, and a :class:`ExpectationMeasure` to perform
1616

1717
from mpqp.core.instruction.gates.native_gates import SWAP
1818
from mpqp.core.instruction.measurement.measure import Measure
19-
from mpqp.core.instruction.measurement.pauli_string import PauliString, PauliStringMonomial
19+
from mpqp.core.instruction.measurement.pauli_string import (
20+
PauliString,
21+
PauliStringMonomial,
22+
)
2023
from mpqp.core.languages import Language
2124
from mpqp.tools.display import one_lined_repr
2225
from mpqp.tools.errors import NumberQubitsError
@@ -370,7 +373,7 @@ def _check_targets_order(self):
370373
)
371374

372375
def get_pauli_grouping(
373-
self, method: Literal["full_commutative_graph", "b"] = "full_commutative_graph"
376+
self, method: Literal["full_commutative_graph", "b"] = "full_commutative_graph"
374377
) -> list[set[PauliStringMonomial]]:
375378
"""
376379
TODO: decompose the observables, regroup the pauli measurements by commutativity relation,

mpqp/tools/pauli_grouping.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
def full_commutation_pauli_grouping(monomials: set[PauliStringMonomial]):
55
pass
66

7+
78
def qubit_wise_commutation_pauli_grouping(monomials: set[PauliStringMonomial]):
89
pass

tests/execution/test_multi_observable.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ def list_circuits():
1515

1616

1717
def list_observables():
18-
return [[
19-
Observable(np.ones((4, 4))),
20-
Observable(np.diag([1, 2, -3, 4])),
21-
# TODO add random observable ?
22-
]]
18+
return [
19+
[
20+
Observable(np.ones((4, 4))),
21+
Observable(np.diag([1, 2, -3, 4])),
22+
# TODO add random observable ?
23+
]
24+
]
2325

2426

2527
def list_devices():
26-
return [
27-
IBMDevice.AER_SIMULATOR
28-
]
28+
return [IBMDevice.AER_SIMULATOR]
2929

3030

3131
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)