qiskit.quantum_info.PauliList.group_commuting¶
- PauliList.group_commuting(qubit_wise=False)[código fonte]¶
Partition a PauliList into sets of commuting Pauli strings.
- Parâmetros
qubit_wise (bool) –
whether the commutation rule is applied to the whole operator, or on a per-qubit basis. For example:
>>> from qiskit.quantum_info import PauliList >>> op = PauliList(["XX", "YY", "IZ", "ZZ"]) >>> op.group_commuting() [PauliList(['XX', 'YY']), PauliList(['IZ', 'ZZ'])] >>> op.group_commuting(qubit_wise=True) [PauliList(['XX']), PauliList(['YY']), PauliList(['IZ', 'ZZ'])]
- Retorno
List of PauliLists where each PauliList contains commuting Pauli operators.
- Tipo de retorno
List[PauliList]