Japanese
言語
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.opflow.list_ops.SummedOp.equals

SummedOp.equals(other)[ソース]

Check if other is equal to self.

注釈

This is not a mathematical check for equality. If self and other implement the same operation but differ in the representation (e.g. different type of summands) equals will evaluate to False.

パラメータ

other (OperatorBase) – The other operator to check for equality.

戻り値

True, if other and self are equal, otherwise False.

戻り値の型

bool

サンプル

>>> from qiskit.opflow import X, Z
>>> 2 * X == X + X
True
>>> X + Z == Z + X
True