Problem Statement
Implement the operation of swapping two qubit states on a quantum circuit with qubits.
More precisely, implement the operation defined as
where represents arbitrary probability amplitudes.
Constraints
- You cannnot use Qiskit's SwapGate in this problem.
- Global phase is ignored in judge.
- The submitted code must follow the specified format:
from qiskit import QuantumCircuit
def solve() -> QuantumCircuit:
qc = QuantumCircuit(2)
# Write your code here:
return qc