Description:
You are given N qubits (1 ≤ N ≤ 8) in zero state $${\left|0\dots0\right\rangle}$$. You are also given two bitstrings bits0 and bits1 which describe two different basis states on N qubits $${ \left| \psi _ { 0 } \right> }$$ and $$\left|\psi_{1}\right\rangle$$.
Your task is to generate a state which is an equal superposition of the given basis states:
$${ \left| S \right\rangle } = { \frac { 1 } { \sqrt { 2 } } } ( { \left| \psi _ { 0 } \right\rangle } + { \left| \psi _ { 1 } \right\rangle } )$$
You have to implement an operation which takes the following inputs:
- an array of qubits qs,
- two arrays of Boolean values bits0 and bits1 representing the basis states $${ \left| \psi _ { 0 } \right> }$$ and $$\left|\psi_{1}\right\rangle$$. These arrays will have the same length as the array of qubits. bits0 and bits1 will differ in at least one position.
The operation doesn't have an output; its "output" is the state in which it leaves the qubits.
Your code should have the following signature:
Input Format:
None
Output Format:
None
Note:
None