Skip to main content
IBM Quantum Platform
이 페이지는 Qiskit SDK 의 이전 버전에서 가져온 것으로, 최신 버전에는 존재하지 않습니다. 최신 버전으로 업데이트하시기를 권장합니다. 자세한 정보는 릴리스 정보를 참조하십시오.

AbelianGrouper

class qiskit.opflow.converters.AbelianGrouper(traverse=True)

GitHub

Bases: ConverterBase

Deprecated: The AbelianGrouper converts SummedOps into a sum of Abelian sums.

Meaning, it will traverse the Operator, and when it finds a SummedOp, it will evaluate which of the summed sub-Operators commute with one another. It will then convert each of the groups of commuting Operators into their own SummedOps, and return the sum-of-commuting-SummedOps. This is particularly useful for cases where mutually commuting groups can be handled similarly, as in the case of Pauli Expectations, where commuting Paulis have the same diagonalizing circuit rotation, or Pauli Evolutions, where commuting Paulis can be diagonalized together.

Deprecated since version 0.24.0

The class qiskit.opflow.converters.abelian_grouper.AbelianGrouper is deprecated as of qiskit-terra 0.24.0. It will be removed in the Qiskit 1.0 release. For code migration guidelines, visit https://qisk.it/opflow_migration.

Parameters

traverse (bool) – Whether to convert only the Operator passed to convert, or traverse down that Operator.


Methods

convert

convert(operator)

Check if operator is a SummedOp, in which case covert it into a sum of mutually commuting sums, or if the Operator contains sub-Operators and traverse is True, attempt to convert any sub-Operators.

Parameters

operator (OperatorBase) – The Operator to attempt to convert.

Returns

The converted Operator.

Return type

OperatorBase

group_subops

classmethod group_subops(list_op)

Given a ListOp, attempt to group into Abelian ListOps of the same type.

Parameters

list_op (ListOp |PauliSumOp) – The Operator to group into Abelian groups

Returns

The grouped Operator.

Raises

OpflowError – If any of list_op’s sub-ops is not PauliOp.

Return type

ListOp

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.