You are given N qubits (1 ≤ N ≤ 8) in zero state . You are also given two bitstrings bits0 and bits1 which describe two different basis states on N qubits and .
Your task is to generate a state which is an equal superposition of the given basis states:
You have to implement an operation which takes the following inputs:
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:
namespace Solution {
open Microsoft.Quantum.Primitive;
open Microsoft.Quantum.Canon;
operation Solve (qs : Qubit[], bits0 : Bool[], bits1 : Bool[]) : ()
{
body
{
// your code here
}
}
}
Name |
---|