Problem Statement
You are given an integer and an oracle . For any pair of integers satisfying and , the oracle satisfies
where denotes the XOR operator, and is a function that returns either or for any integer with .
Implement an operation on a quantum circuit that satisfies
for any integer satisfying .
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:
Sample Input
- : Implemented circuit should perform the following transformation.