Problem Statement
You are given integers and . Implement the oracle on a quantum circuit with qubits, which multiplies all the probability amplitudes of by .
Constraints
- The circuit depth must not exceed .
- Global phase is ignored in judge.
- Integers must be encoded by little-endian.
- The submitted code must follow the specified format:
from qiskit import QuantumCircuit
def solve(n: int, L: int) -> QuantumCircuit:
qc = QuantumCircuit(n)
# Write your code here:
return qc
Sample Input
- : The implemented oracle should perform the following transformation.