Олимпиадный тренинг

Задача . B. Generate Bell state


You are given two qubits in state and an integer index. Your task is to create one of the Bell states on them according to the index:

Input

You have to implement an operation which takes an array of 2 qubits and an integer 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.Primitive;
open Microsoft.Quantum.Canon;

operation Solve (qs : Qubit[], index : Int) : ()
{
body
{
// your code here
}
}
}

time 1000 ms
memory 256 Mb
Правила оформления программ и список ошибок при автоматической проверке задач

Статистика успешных решений по компиляторам
Комментарий учителя