Problem Statement
You are given integers , and a real number . Implement the oracle on a quantum circuit with qubits acting on computational basis states as
for any integer such that .
Constraints
- Integers must be encoded by little-endian.
- Global phase is ignored in judge.
- The submitted code must follow the specified format:
from qiskit import QuantumCircuit
def solve(n: int, L: int, theta: float) -> QuantumCircuit:
qc = QuantumCircuit(n)
# Write your code here:
return qc
Sample Input
- : Implemented circuit should perform the following transformation.