Problem Statement
You are given an integer and an oracle . There exists an integer such that , and the oracle satisfies
for any integer satisfying .
Implement an operation on a quantum circuit with qubits that prepares a quantum state from the zero state, such that is observed with a probability of at least upon measurement.
More Precise Problem Statement
Define the state prepared by as
where denotes the probability amplitude of the computational basis state .
Implement satisfying following condition:
Constraints
- Integers must be encoded by little-endian notation, i.e., .
- Global phase is ignored in judge.
- The submitted code must follow the specified format: