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
andother
implement the same operation but differ in the representation (e.g. different type of summands)equals
will evaluate toFalse
.- 매개변수
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