Preparando MOJI

Generate plus state or minus state

1000ms 262144K

Description:

You are given a qubit in state and an integer sign.

Your task is to convert the given qubit to state if sign = 1 or if sign =  - 1.

Input:

You have to implement an operation which takes a qubit and an integer as an input and has no output. The "output" of your solution is the state in which it left the input qubit.

Your code should have the following signature:

namespace Solution {
open Microsoft.Quantum.Primitive;
open Microsoft.Quantum.Canon;

operation Solve (q : Qubit, sign : Int) : ()
{
body
{
// your code here
}
}
}

Informação

Codeforces

Provedor Codeforces

Código CF1001A

Tags

*special

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 09:35:41

Relacionados

Nada ainda