You are given $$$N$$$ qubits in the zero state $$$|0...0 \rangle$$$. You are also given four distinct bit vectors which describe four different basis states on $$$N$$$ qubits $$$|\psi_i \rangle$$$.
Your task is to generate a state which is an equal superposition of the given basis states:
$$$$$$|S \rangle = \frac{1}{2} \big( |\psi_0 \rangle + |\psi_1 \rangle + |\psi_2 \rangle + |\psi_3 \rangle \big)$$$$$$
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[], bits : Bool[][]) : Unit {
// your code here
}
}
Название |
---|