Preparando MOJI

Oracle for majority function

1000ms 262144K

Description:

Implement a quantum oracle on 3 qubits which implements a majority function. Majority function on 3-bit vectors is defined as follows: if vector has two or three 1s, and 0 if it has zero or one 1s.

For an explanation on how this type of quantum oracles works, see Introduction to quantum oracles.

You have to implement an operation which takes the following inputs:

  • an array of 3 qubits x in arbitrary state (input register),
  • a qubit y in arbitrary state (output qubit).

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 (x : Qubit[], y : Qubit) : ()
{
body
{
// your code here
}
}
}

Informação

Codeforces

Provedor Codeforces

Código CF1002D3

Tags

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 09:36:19

Relacionados

Nada ainda