Preparando MOJI

Generate GHZ state

1000ms 262144K

Description:

You are given N qubits (1 ≤ N ≤ 8) in zero state . Your task is to create Greenberger–Horne–Zeilinger (GHZ) state on them:

Note that for N = 1 and N = 2 GHZ state becomes states and from the previous tasks, respectively.

Input:

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

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

Informação

Codeforces

Provedor Codeforces

Código CF1001C

Tags

*special

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 09:35:46

Relacionados

Nada ainda