You are given two qubits in state $$$|00 \rangle$$$. Your task is to prepare the following state on them:
$$$$$$\frac{1}{\sqrt{3}} \big( |01 \rangle + |10 \rangle + |11 \rangle)$$$$$$
This task is very similar to problem A1 of the Winter 2019 contest, but this time you are not allowed to use any gates except the Pauli gates (X, Y and Z), the Hadamard gate and the controlled versions of those. However, you are allowed to use measurements.
You have to implement an operation which takes an array of 2 qubits as an input and has no output. The "output" of your solution is the state in which it left the input qubits.
Your code should have the following signature:
namespace Solution {
open Microsoft.Quantum.Intrinsic;
operation Solve (qs : Qubit[]) : Unit {
// your code here
}
}
Название |
---|