Problem Statement
You are given integers , and .
Implement an oracle satisfying the following transition on a quantum circuit with qubits.
- For arbitrary integer satisfying , the oracle satisfies
- For arbitrary integer satisfying , the oracle satisfies
Constraints
- 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, s: int, t: int) -> QuantumCircuit:
qc = QuantumCircuit(n + 1)
# Write your code here:
return qc
Hints
Open
- You can consider the way to apply the solution of problem B3.