Check if other is equal to self.
This is not a mathematical check for equality. If
otherimplement the same operation but differ in the representation (e.g. different type of summands)
equalswill evaluate to
other (OperatorBase) – The other operator to check for equality.
True, if other and self are equal, otherwise False.
- 반환 형식
>>> from qiskit.opflow import X, Z >>> 2 * X == X + X True >>> X + Z == Z + X True