Implement an operation that is equivalent to the operation QFT$$$^{1/P}$$$, where QFT is the quantum Fourier transform. In other words, your operation, applied $$$P$$$ times, should have the same effect as applying QFT. You can implement the required transformation up to a global phase.
Your operation should take the following inputs:
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.
Название |
---|