Skip to content

Commit 4414820

Browse files
committed
doc: add get_pauli_grouping docstring
1 parent af205e9 commit 4414820

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

mpqp/core/instruction/measurement/expectation_value.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,17 @@ def get_pauli_grouping(
402402
"full_clique", "full_greedy", "qubit_wise_clique"
403403
] = "full_greedy",
404404
) -> list[set[PauliStringMonomial]]:
405-
"""
406-
TODO: decompose the observables, regroup the pauli measurements by commutativity relation,
407-
and return the measurements to be performed.
405+
"""Decompose the observables, regroup the pauli measurements by commutativity relation,
406+
and return the measurements to be performed.
407+
408+
Args:
409+
method: The grouping method to use.
410+
- "full_clique": Finds the largest possible commuting groups (cliques).
411+
- "full_greedy": Uses a greedy algorithm to iteratively build commuting groups.
412+
- "qubit_wise_clique": Groups Pauli strings based on qubit-wise commutativity.
413+
408414
Returns:
415+
A list of sets, where each set contains Pauli strings that can be measured simultaneously.
409416
410417
"""
411418
...

0 commit comments

Comments
 (0)