Preparando MOJI

Power of quantum Fourier transform

2000ms 262144K

Description:

Implement an operation that is equivalent to the operation QFT$$$^P$$$, where QFT is the quantum Fourier transform.

Your operation should take the following inputs:

  • an integer $$$P$$$ ($$$2 \le P \le 2.1\cdot 10^6$$$).
  • a register of type LittleEndian - a wrapper type for an array of qubits that encodes an unsigned integer in little-endian format, with the least significant bit written first (corresponding to the array element with index 0). (If you need to, you can convert it to an array type using unwrap operator: let qubitArray = inputRegister!;)

The "output" of your solution is the state in which it left the input qubits.

Your code should have the following signature (note that your operation should have Adjoint and Controlled variants defined for it; is Adj+Ctl in the operation signature will generate them automatically based on your code):

namespace Solution {
open Microsoft.Quantum.Arithmetic;
open Microsoft.Quantum.Intrinsic;

operation Solve (p : Int, inputRegister : LittleEndian) : Unit is Adj+Ctl {
// your code here
}
}

You can learn more about QFT in this kata. You are allowed to take advantage of library operations, including QFTLE which implements the necessary transform in the first power.

Informação

Codeforces

Provedor Codeforces

Código CF1357E1

Tags

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 10:02:39

Relacionados

Nada ainda