Preparando MOJI

OR oracle

1000ms 262144K

Description:

Implement a quantum oracle on $$$N$$$ qubits which implements the following function: $$$$$$f(\vec{x}) = x_0 \vee x_1 \vee \dotsb \vee x_{N-1}$$$$$$

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

  • an array of $$$N$$$ ($$$1 \le N \le 8$$$) qubits $$$x$$$ in an arbitrary state (input register),
  • a qubit $$$y$$$ in an arbitrary state (output qubit),

and performs a transformation $$$|x\rangle|y\rangle \rightarrow |x\rangle|y \oplus f(x)\rangle$$$. 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) : Unit {
body (...) {
// your code here
}
adjoint auto;
}
}

Informação

Codeforces

Provedor Codeforces

Código CF1115G2

Tags

*special

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 09:44:44

Relacionados

Nada ainda