**Input**: Two qubits stored in an array which are guaranteed to be either in a superposition of the states $\ket{++}$ and $\ket{--}$ or in a superposition of states $\ket{+-}$ and $\ket{-+}$.

**Output**: 0 if qubits were in the first superposition, 1 if they were in the second superposition.  
The state of the qubits at the end of the operation should be the same as the starting state.
