qrisp.QuantumArray.__ne__#
- QuantumArray.__ne__(other: QuantumArray) QuantumArray[source]#
Performs element-wise
!=comparison.- Parameters:
- otherQuantumArray
The QuantumArray to be compared to.
- Returns:
- QuantumArray
A new QuantumArray of QuantumBools containing the result of element-wise
!=.
Examples
>>> import numpy as np >>> from qrisp import QuantumArray, QuantumFloat >>> a_array = QuantumArray(QuantumFloat(2), shape=(2,2)) >>> b_array = QuantumArray(QuantumFloat(2), shape=(2,2)) >>> a_array[:] = np.eye(2) >>> b_array[:] = np.eye(2) >>> r_array = a_array != b_array >>> print(r_array) # {OutcomeArray([[False, False], [False, False]], dtype=object): 1.0}