Problem E

Statement
Copy Copied
Description:
You are given two qubits which are guaranteed to be in one of the Bell states:

- $${ \left| B_{ 0 } \right\rangle } = { \frac { 1 } { \sqrt { 2 } } } ( { \left| 0 0 \right\rangle } + { \left| 1 1 \right\rangle } )$$
- $${ \left| B _ { 1 } \right\rangle } = { \frac { 1 } { \sqrt { 2 } } } ( { \left| 0 0 \right\rangle } - { \left| 1 1 \right\rangle } )$$
- $${ \left| B_{ 2 } \right\rangle } = { \frac { 1 } { \sqrt { 2 } } } ( { \left| 0 1 \right\rangle } + { \left| 1 0 \right\rangle } )$$
- $${ \left| B_{ 3 } \right\rangle } = { \frac { 1 } { \sqrt { 2 } } } ( { \left| 0 1 \right\rangle } - { \left| 1 0 \right\rangle } )$$

Your task is to perform necessary operations and measurements to figure out which state it was and to return the index of that state (0 for $$| B_{0} \rangle$$, 1 for $$\left|B_{1}\right\rangle$$ etc.). The state of the qubits after the operations does not matter.

Input Format:
You have to implement an operation which takes an array of two qubits as an input and returns an integer.

Your code should have the following signature:

Output Format:
None

Note:
None