Problem Statement
You are given an integer .
Implement the following operation on a quantum circuit with qubits for an arbitrary bit string.
Constraints
- The circuit depth must not exceed .
- Global phase is ignored in judge.
- You cannnot use Qiskit's SwapGate in this problem.
- The submitted code must follow the specified format:
from qiskit import QuantumCircuit
def solve(n: int) -> QuantumCircuit:
qc = QuantumCircuit(n)
# Write your code here:
return qc
Sample Input
- : Implemented circuit should perform the following transformation.