Problem Statement
You are given an integer . Implement the quantum Fourier transform (QFT) for qubits.
The quantum Fourier transform is defined as a -qubit oracle acting on computational basis states as
for any integer such that .
Constraints
- The circuit depth must not exceed .
- Integers are encoded by little-endian notation, i.e., .
- Global phase is ignored in judge.
- The submitted code must follow the specified format:
Sample Input
- : Implemented circuit should perform the following transformation.
Hints
Open
- Please be aware that the circuit must be implemented assuming little-endian.